Usually, errors are found in 10% of lines of code written by software engineers at Error Free Code, Inc. What is the probability that in a randomly selected sample of 5 lines of code 2 of them have errors?

Respuesta :

Answer: The required probability is 0.008.

Step-by-step explanation:

Since we have given that

Probability of getting codes having no error = 10% = q

Probability of getting codes having error = 100-10=90%.= q

So, sample n = 5

X = 2 (i.e. code 2 of them have errors)

Using "Binomial theorem":

[tex]P(X=n)^nC_xp^xq^{n-x}[/tex]

[tex]P(X=2)=^5C_2(0.9)^2(0.10)^3=0.008[/tex]

Hence, the required probability is 0.008.