1. ## Mean and Variance

A secretary was given n passwords and tries the passwords at random. Exactly one password will permit access to a computer file. Find the mean and variance of Y, the number of trials required to open the file, if unsuccessful passwords are eliminated.
What I have for this question is that the probability of getting the password right on:
the 1st try=1/n
2nd try=1/n
3rd try=1/n
so thus the mean is:
=1(1/n)+2(1/n)+3(1/n)+y(1/n)
= 1+2+3+4+y
n
is this right or can i go further?
thanks

2. $\displaystyle \sum\limits_{k = 1}^n {k\left( {\frac{1} {n}} \right)} = \left( {\frac{1} {n}} \right)\sum\limits_{k = 1}^n k = \left( {\frac{1} {n}} \right)\left( {\frac{{n\left( {n + 1} \right)}} {2}} \right) = \frac{{\left( {n + 1} \right)}} {2}$

$\displaystyle \sum\limits_{k = 1}^n {k^2 \left( {\frac{1} {n}} \right)} = \left( {\frac{1} {n}} \right)\sum\limits_{k = 1}^n {k^2 } = \left( {\frac{1} {n}} \right)\left( {\frac{{n\left( {n + 1} \right)\left( {2n + 1} \right)}} {6}} \right)$

Use these to find E & V.