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