Find the probability that the largest number shown by any throw is r So I have a pretty hard dice question on a past exam that has thrown me a bit:
A dice is rolled a random number $n$ of times. Let $A_i$ be the event that $n=i$ and suppose that $P(A_i)=1/2^i$
a.) How would i find the probability that the largest number shown is $r$?
b.) How to find the probability that $n=2$, given that the sum of the scores is $5$ and the first throw showed $2$.
So for part a.) I have that $P(A_1)=1/2$, $P(A_2)=1/4$, $P(A_3)=1/8$, $P(A_4)=1/16$ $P(A_5)=1/32$, $P(A_6)=1/64$
Is this correct or have I made a huge error? I cannot find any similar style questions about throwing a die a random number $n$ times and am thus struggling to work out how i would solve a question like this.
Many thanks for your help
 A: Hint:  Can you figure out the chance that all $n$ throws are $1$?  That is the chance that $1$ is the largest number.  Then can you figure out the chance that all the throws are $1$ or $2$?  That is the chance the largest number is no larger than $2$, so if you subtract the chance that it is $1$ you have the chance that the largest number is $2$.  Continue.
Added:  the chance you get all $1$'s is $(\frac 16)^n$.  The chance you get all $1$'s and $2$'s is $(\frac 26)^n$, so the chance the highest is a $2$ is $\frac {2^n-1^n}{6^n}$  Similarly, the chance the highest is $k$ is $\frac {k^n-(k-1)^n}{6^n}$
A: An outline of a solution of the first problem has been given by Ross Millikan.  We consider the second problem.
Let $T$ be the event $n=2$. Let $S$ be the event the sum was $5$ and the first throw was $2$. We want $\Pr(T|S)$. We have
$$\Pr(T|S)=\frac{\Pr(T\cap S)}{\Pr(S)}.$$
Now we want to calculate the two probabilities on the right.
For $\Pr(T\cap S)$, note that for this to happen, we must have $n=2$ (probability $\frac{1}{4}$). Given that $n=2$, the probability that the first toss is $2$ and the sum is $5$ is $\frac{1}{6^2}$. Thus $\Pr(T\cap S)=\frac{1}{144}$.
Next we find $\Pr(S)$. The event $S$ can happen in several ways, with (i) $n=2$; (ii) $n=3$; (iii) $n=4$.
We have already calculated the probability of (i). For (ii), we must have $3$ tosses (probability $\frac{1}{8}$), then a $2$ (probability $\frac{1}{6}$), then $1$ and $2$ or $2$ and $1$ (probability $\frac{2}{36}$), for a total of $\frac{1}{8}\cdot \frac{1}{6}\cdot\frac{2}{36}$.
For (iii), we must have $4$ tosses, and the pattern $2,1,1,1$. The probability is $\frac{1}{16}\cdot \left(\frac{1}{6}\right)^4$.
To calculate $\Pr(S)$, add together the probabilities (i), (ii), (iii). Now you have all the ingredients for calculating $\Pr(T|S)$.
A: One approach for (a) would be to calculate the cumulative distribution function for the largest number observed (call it $F_L(r)$) and we can get the probability mass function (call it$f_L(r)$) by noting:
$$f_L(r)=F_L(r)-F_L(r-1)$$ 
Say we roll the dice $n$ times, then the probability that the largest observed value is less than or equal to $r$ is: $\mathbb{Pr}[R \le r]=\left(\frac{r}{6}\right)^n$, where $R$ is the result of one roll.  Each roll is independent and identically distributed so that is why the result is the probability of one roll being $\le r$ to the $n^{th}$ power.  Finally, we want to sum up the probability that all rolls are $\le r$ and that we rolled $1,2,3,...$ times total.  So we have:
$$F_L(r) = \sum_{n=1}^{\infty}\mathbb{Pr}[R \le r]^n\frac{1}{2^n}=\sum_{n=1}^{\infty}\left(\frac{r}{12}\right)^n=\frac{1}{1-\frac{r}{12}}-1=\frac{r}{12-r}$$
Now do the subtraction to get $f_L(r) \ ,r=1,2,3,4,5,6$.
Note: For sanity's sake, the pmf sums to 1 per wolfram alpha
