# Math Help - Expectation and Variance

1. ## Expectation and Variance

An electric circuit contains 5 components. It is known that 1 of the components is faulty. To determine the faulty component,all 5 components are tested one by one until the faulty component is found. The random variable X represents the number of tests required to determine the faulty component. If all 5 components have an equal chance of being faulty,find the expectation and variance of X.

Thanks for your help.

2. Originally Posted by cyt91
An electric circuit contains 5 components. It is known that 1 of the components is faulty. To determine the faulty component,all 5 components are tested one by one until the faulty component is found. The random variable X represents the number of tests required to determine the faulty component. If all 5 components have an equal chance of being faulty,find the expectation and variance of X.

Thanks for your help.
The number of tests required follows a geometric distribution .... Look it up.

3. Originally Posted by mr fantastic
The number of tests required follows a geometric distribution .... Look it up.
By "each component has an equal chance of being faulty", do they mean the probability of each component to be faulty is 0.5?

If so, I calculated the mean to be

E(X)= (1)(0.5) + 2(0.25) + 3(0.125) + 4(0.625) +5(0.03125)
= 1.78

Is this correct?

4. I've tried solving the question again.

P(X=1)=1/5

P(X=2)=(1/5)(4/5)
P(X=3)=(1/5)(4/5)^2
P(X=4)=(1/5)(4/5)^3
P(X=5)=(1/5)(4/5)^4

E(X)= (1)(1/5)+(2)(1/5)(4/5)+(3)(1/5)(4/5)^2+(4)(1/5)(4/5)^3+(5)(1/5)(4/5)^4
=1.7232

Is this correct???

5. Originally Posted by cyt91
I've tried solving the question again.

P(X=1)=1/5

P(X=2)=(1/5)(4/5)
P(X=3)=(1/5)(4/5)^2
P(X=4)=(1/5)(4/5)^3
P(X=5)=(1/5)(4/5)^4

E(X)= (1)(1/5)+(2)(1/5)(4/5)+(3)(1/5)(4/5)^2+(4)(1/5)(4/5)^3+(5)(1/5)(4/5)^4
=1.7232

Is this correct???
I made a mistake earlier. It's not geometric.

The probability that you need 1 test (that is, you get the faulty component in the first selection) is 1/5.

The probability that you need 2 tests (that is, you get the faulty component in the second selection) is (4/5)(1/4) = 1/5.

The probability that you need 3 tests (that is, you get the faulty component in the third selection) is (4/5)(3/4)(1/3) = 1/5.

etc.

So E(number of tests) = 1(1/5) + 2(1/5) + 3(1/5) + .... + 5(1/5) = 15/5 = 3.

Get the variance in a similar way.

6. Originally Posted by mr fantastic
I made a mistake earlier. It's not geometric.

The probability that you need 1 test (that is, you get the faulty component in the first selection) is 1/5.

The probability that you need 2 tests (that is, you get the faulty component in the second selection) is (4/5)(1/4) = 1/5.

The probability that you need 3 tests (that is, you get the faulty component in the third selection) is (4/5)(3/4)(1/3) = 1/5.

etc.

So E(number of tests) = 1(1/5) + 2(1/5) + 3(1/5) + .... + 5(1/5) = 15/5 = 3.

Get the variance in a similar way.
Hi. Thanks a lot for taking the time to answer my question.

I've calculated the variance to be:

Var(X) = (1/5){1+4+9+16+25}
=11

I hope this is correct.
Btw, in solving problems of such nature,is it a good practice to draw tree diagrams?