Consider Bob, an absent-minded student. Bob has a set of 6 passwords that he uses for all his login needs. He often forgets which password matches with which website so his strategy is to try all of them. Specifically, from his set of passwords he picks one uniformly at random and enters it. If he succeeds – all is well; if he fails – he removes the password from the set and repeats the process.
a. Suppose Bob has to log on to a website he hasn’t used for some time. Define X as the random variable equal to the number of times Bob enters a password before he can log on to the site. Describe the probability distribution of X and compute $E[X]$.
b. It turns out that the website has a policy that if a user fails to enter the correct password for k consecutive times, it will delay logging in the user by 2k seconds. For example, if Bob gets the password right the first time, Bob experiences a delay of $2^0 = 1$ second before he is logged on to the website. If Bob gets the password right the second time, he experiences a delay of $2^1 = 2$ seconds before he is logged on to the website, etc. Let Y be the random variable equal to delay time Bob experiences. Describe the probability distribution of Y and compute $E[Y ]$.
I have attempted to solve this problem but seem to lack any understanding of what I am really supposed to do or how to check my work. Is it asking for how many ways I can arrange passwords, or how many times I can get it wrong then right? I feel like its something like $(\frac56)(\frac16)$ would be him failing the first time and then getting it the second time but im not sure I should be using something quite like that, and how it would affect time.
For part (a), $X \in \{ 1, 2, 3, 4, 5, 6 \}$
$P(X = 1) = \frac{1}{6}$
$P(X = 2) = (\frac{5}{6})(\frac{1}{5})= \frac{1}{6}$
$P(X = 3) = (\frac{5}{6})(\frac{4}{5})(\frac{1}{4})= \frac{1}{6}$
$P(X = 4) = (\frac{5}{6})(\frac{4}{5})(\frac{3}{4})(\frac{1}{3})= \frac{1}{6}$
$P(X = 5) = (\frac{5}{6})(\frac{4}{5})(\frac{3}{4})(\frac{2}{3})(\frac{1}{2})= \frac{1}{6}$
$P(X = 6) = (\frac{5}{6})(\frac{4}{5})(\frac{3}{4})(\frac{2}{3})(\frac{1}{2})(\frac{1}{1})= \frac{1}{6}$
$P(X=x) = 0$ for $x\notin \{1, 2, 3, 4, 5, 6\}$
$E(X) = \sum_{x=1}^6 xP(X=x) = 3.5$
For part (b), the delay is 2k seconds which would mean that $Y=2(X-1)$
Since, $X \in \{ 1, 2, 3, 4, 5, 6 \}$ this means $Y \in \{0, 2, 4, 6, 8, 10\}$
$P(Y = 0) = P(X=1)=\frac{1}{6}$
$P(Y = 2) = P(X=2)=\frac{1}{6}$
$P(Y = 4) = P(X=3)=\frac{1}{6}$
$P(Y = 6) = P(X=4)=\frac{1}{6}$
$P(Y = 8) = P(X=5)=\frac{1}{6}$
$P(Y = 10) = P(X=6)=\frac{1}{6}$
$P(Y = y) = 0$ for $y\notin \{0, 2, 4, 6, 8, 10\}$
$E(Y) = E(2(X-1))=2E(X)-2=2(3.5)-2 = 5$