# Math Help - 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

$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?