There is one error in one of five blocks of a program. To find the error, we test three randomly selected blocks. Let X be the number of errors in these three blocks. Compute E(X) and Var(X)
Probability(error in one block)= 1/5
Probability(error in 3 blocks)= 3*(1/5)= 0.6
Let,
0 = No error
1 = error
Hence.
E(x) = 0.4 x 0 x+0.6 + 1
= 1.6
Answer with explanation:
Number of Blocks in the program =5
Number of errors in the Program =1
Probability of an event
\(=\frac{\text{Total favorable outcome}}{\text{Total possible outcome}}\)
Probability of getting an error in a program out of five programs
\(=\frac{1}{5}\)
Now, three programs are selected randomly
Required probability that is Expectation E(x)
=1 ×Error in first one and No error in last two +2×Error in Second one and No error in first and last +3×Error in Third one and No error first and Second one
\(E(x=1,2,3)=1 \times \frac{1}{5}\times \frac{4}{5}\times \frac{4}{5}+2 \times \frac{4}{5}\times \frac{1}{5}\times \frac{4}{5}+3 \times \frac{4}{5}\times\frac{4}{5}\times \frac{1}{5}\\\\=\frac{16}{125}+\frac{32}{125}+\frac{48}{125}\\\\ =\frac{96}{125}\)
→E(x²)
\(E(x=1^2,2^2,3^2)\\\\E(x=1,4,9)=1 \times \frac{1}{5}\times \frac{4}{5}\times \frac{4}{5}+4 \times \frac{4}{5}\times \frac{1}{5}\times \frac{4}{5}+9 \times \frac{4}{5}\times\frac{4}{5}\times \frac{1}{5}\\\\=\frac{16}{125}+\frac{64}{125}+\frac{144}{125}\\\\ =\frac{224}{125}\)
Variance (x)
=E(x²)-E(x)
\(=\frac{224}{125}-\frac{96}{125}\\\\=\frac{128}{125}\\\\=1.024\)