0

You roll a die until you get the number five. What is the expected value of the maximum roll you see(don't include 5, we only consider rolls upto and before the 5). I created a solution to this problem, although I am still confused because of the dependency on the number of rolls. Any commentary would be appreciated

Suppose that it takes $n$ rolls to see a 5. Then $E(n) = \frac{1}{6}^n \cdot 1 + \frac{1}{6} \cdot n \cdot \frac{2}{6}^{n-1} \cdot 2 + \frac{1}{6} \cdot n \cdot \frac{3}{6}^{n-1} \cdot 3 + \frac{1}{6} \cdot n \cdot \frac{4}{6}^{n-1} \cdot 4 + (1-\frac{5}{6}^n) \cdot 6$. The probabilities in the expected value function are computed as the probability that number will be the highest out of n rolls. For instance for 2 being the highest roll, we have to have two appear in the sequence of $n$ rolls, and then have all the other rolls be two or less, which corresponds to probability $\frac{1}{6} \cdot n \cdot \frac{2}{6}^{n-1}$. Now my question is how this depends on the number of rolls. For the overall expected value do we simply use the expected number of flips to roll a five, which is six, and then plug 5 into the equation to get the overall expected value? (when I do I get 4.42)

(as another thought, should i integrate the expected value function from $n=0$ to $\infty$?)

GTOgod
  • 570
  • Please define your X – Mathemagical Nov 29 '17 at 01:46
  • Sorry, it should be n – GTOgod Nov 29 '17 at 01:46
  • 1
    You have confusion between minimum and maximum in your question. You start with the minimum but then talk about $2$ being the highest roll. It can't be highest because you know you throw a $5$. – Ross Millikan Nov 29 '17 at 01:48
  • I am just considering rolls up until the point that a 5 is rolled. The 5 isn't part of the values considered. I'll edit the question – GTOgod Nov 29 '17 at 01:50
  • @GTOgod thanks. So is that it (just finding the expected number of rolls until you hit a 5, or are you still working on the problem of the minimum? What do you have so far on that front? – Mathemagical Nov 29 '17 at 02:22
  • I changed the problem to the maximum, because my work represented that, although minimum would not be too hard to come up with after solving this version. So thinking about it I think I have to associate the probability of that $n$ rolls occurs and multiply that by the $E(n)$ function and sum up all the (countably many) values from 0 to infinity. This makes me think that $E(5)$ is not a bad estimate, but it's probably not correct considering the distribution of the n rolls – GTOgod Nov 29 '17 at 02:24

3 Answers3

0

Let's assume you have a five-sided die, with faces $\{1,2,3,4,6\}$. You roll it $k$ times. What is the expected value of the max roll? Well, it's going to depend on $k$. \begin{equation} P(max=1) = \frac{1}{5^k} \end{equation} \begin{equation} P(max=2) = \left(\frac{2}{5}\right)^k - \frac{1}{5^k} \end{equation} \begin{equation} P(max=3) = \left(\frac{3}{5}\right)^k - \left(\frac{2}{5}\right)^k \end{equation} \begin{equation} P(max=4) = \left(\frac{4}{5}\right)^k - \left(\frac{3}{5}\right)^k \end{equation} \begin{equation} P(max=6) = 1 - \left(\frac{4}{5}\right)^k \end{equation} \begin{equation} E[max] = 6 - 2 \left(\frac{4}{5}\right)^k - \left(\frac{3}{5}\right)^k - \left(\frac{2}{5}\right)^k - \frac{1}{5^k} \end{equation} Basically, the probability that the $m$th highest value is the maximum is the probability that all the rolls were at most that large, minus the probability that all the rolls were smaller than that value.

Now, we want to sum over $k$, using the probability that the $k+1$st roll is a 5 and none of the others are. \begin{equation} E = \sum_{k=0}^\infty \left( 6 - 2 \left(\frac{4}{5}\right)^k - \left(\frac{3}{5}\right)^k - \left(\frac{2}{5}\right)^k - \frac{1}{5^k} \right) * \left( \frac{5}{6} \right)^k \frac{1}{6} = \frac{1}{6} * \left( 6 * 6 - 2 * 3 - 2 - \frac{3}{2} - \frac{6}{5} \right) = \frac{1}{6} * ( 25.3 ) \approx 4.2167 \end{equation}

Craig
  • 3,536
  • I don't think the final expected value in the problem depends on $k$. Simply because we can correlate a probability for each $k$ meaning we can sum over all k to get the total EV – GTOgod Nov 29 '17 at 03:55
  • Sorry, I was in the middle of my derivation when I clicked submit -- I did finish it up shortly thereafter. – Craig Nov 29 '17 at 17:54
0

There is an incompleteness in the statement of the problem. Since the maximum is taken over the values seen only in throws prior to the appearance of the 5, it needs to be specified what will be declared as the “maximum” if the very first throw is a 5 (which can happen with probability of 1/6 ). Happy to edit the answer once you provide that specification, which will be needed in the last step below.

Let t be the throw when you first hit a 5. Then $P(t=k)=\frac{1}{6}{(\frac{5}{6}})^{k-1}$.

Now, we can consider the maximum of the set of throws, $M$. Conditional on $t$ taking the value $k$, $M$ can take values 1,2,3,4 and 6 according to the following distribution function $$F(M=1|t=k)=(\frac{1}{5} )^{k-1}$$ $$F(M=2|t=k)=(\frac{2}{5} )^{k-1}$$ $$F(M=3|t=k)=(\frac{3}{5} )^{k-1}$$ $$F(M=4|t=k)=(\frac{4}{5} )^{k-1}$$ $$F(M=6|t=k)=(\frac{5}{5} )^{k-1}$$

By differencing these, we get the conditional probability masses $P(M=m|t=k)$. For example, $$P(M=6|t=k)=\frac{5^{k-1}-4^{k-1}}{5^{k-1}}$$

Now, we can compute the distribution of $M$ itself. $$P(M=m)=\sum_{k=2}^{\infty} P(M=m|t=k) P(t=k)$$ For example $$P(M=4)= \sum_{k=2}^{\infty} \frac{4^{k-1}-3^{k-1}}{5^k} \frac{1}{6}{(\frac{5}{6}})^{k-1}= \sum_{k=2}^{\infty} \frac{4^{k-1}-3^{k-1}}{6^k}$$

Note that these probabilities sum only to 5/6 because 1/6 of the probability lies in the case $k=1$ where $M$ has not been defined. (You could choose to define it any way. Zero would be a reasonable definition, if you are going to give away a prize equal to $M$ dollars when the game ends by 5 being hit. If 5 is hit on the first try, no payout is made).

Now, the expectation is simple to compute because each term is the sum of a geometric series.

$$E(M)= \sum_{m \in \{1,2,3,4,6\} } m P(M=m)$$

$$E(M)=1 \sum_{k=2}^{\infty} \frac{1}{6^k}+2 \sum_{k=2}^{\infty} \frac{2^{k-1}-1^{k-1}}{6^k}+3 \sum_{k=2}^{\infty} \frac{3^{k-1}-2^{k-1}}{6^k}+4 \sum_{k=2}^{\infty} \frac{4^{k-1}-3^{k-1}}{6^k}+6 \sum_{k=2}^{\infty} \frac{5^{k-1}-4^{k-1}}{6^k}$$ This comes out to be $$\frac{1}{6}[30 - 0.2 - 0.5 -1 - 4] = 4.05$$

This is also the final answer if you choose to define $M$ as 0 for the case $k=1$

Note: If, for some reason, you decide that in the case of hitting 5 on the first try, you want to declare $M$ to be 1 (can’t see a good reason to do that), then the computation of the expectation will have one additional term $1 \times \frac{1}{6}$, which makes the expectation equal to $4.216667$.

Mathemagical
  • 3,489
-2

Let $P_k$ be the probability that the first instnace to see a 5 was the kth roll, then $E=\sum_{k=1}^\infty kP_k\ where\ P_k=\frac{1}{6} (\frac{5}{6})^{k-1}$