# Thread: The expected value and variance

1. ## The expected value and variance

A new secretary has been given n computer passwords, only one of which will permit access to a computer file. Because the secretary has no idea which password is correct, he chooses one of the password a random and tries it. If the password is incorrect, he discards it and randomly selects another password from among those remaining. Find the mean and the variance of Y, the number of trials required to open the file, if unsuccessful passwords are eliminated.

Here is what I've done so far:

This problem is tricky and I know the probability that he gets the right password on the first try is 1/n, but so is the probability he gets the right password on the second, third and so on... so its 1/n.

Wouldn't the E(y) then be ?
and how to find variance here

2. Look at this link: http://www.mathhelpforum.com/math-he...tml#post116546

$\displaystyle V(X) = E\left( {X^2 } \right) - E^2 (X)$

3. Yes, thank you Plato, I know about that formula, but what about my answer to the E(y) is it correct at all?

4. Originally Posted by somestudent2
what about my answer to the E(y) is it correct at all?
Did you see the same in my link?
The answer is yes.

5. Originally Posted by somestudent2
Yes, thank you Plato, I know about that formula, but what about my answer to the E(y) is it correct at all?
Did you read the link?? If so, you should know the answer to your question immediately ....

Plato used the symbol k in his/her summation, you're using the symbol y. The choice of symbol doesn't matter since the answer is in terms of n only.

### a new secretary has

Click on a term to search for related topics.