Average of dice roll with chance of rerolling My question regards a simple dice game. You roll one six sided die and win, say, a dollar for each dot on the roll. e.g. five dollars for rolling a five, two dollars for rolling a two, etc.
You are given the option to reroll once.
Letting $X$ be the outcome of the first roll, and $Y$ be the outcome of the (potential) second roll, consider the strategy $W$
\begin{equation}
  W=\begin{cases}
  X&\text{if $X\geq 4$}\\
  Y&\text{if $X< 4$}
  \end{cases}
 \end{equation}
I.e. if you roll 4 or higher on first try you keep it, if you roll lower you try again.
What is the average winnings using this strategy?
Solution
My issue here is, really, that I don't have more mathematically stringent way to prove this, and I got the answer rather intuitively.
I consider two "macroscopic" outcomes;

*

*a) We roll a 4, 5, or 6 in the first attempt and stop.

*b) We take a second attempt, and roll either 1, 2, 3, 4, 5, or 6.

The average winnings is the average of these two options, which in itself is the average of a roll of 4/5/6 and the average of a roll of 1/2/3/4/5/6. That is
\begin{equation}
E[W] = (4+5+6)\frac{1}{6}+(1+2+3+4+5+6)\frac{1}{2} = \frac{15}{6} + \frac{3.5}{2} = 4.25
\end{equation}
Which indeed is a higher expectation than winning than rolling the die just once ($\mu=3.5$)
I feel like my argumentation is mostly just intuition, and could benefit from a more mathematically sound description.
 A: First note that $$E[Y]=\sum_{k=1}^6 k P[Y=k] = \frac{1}{6}\sum_{k=1}^6 k = \frac{7}{2}.$$
Now apply the law of total expectation:
\begin{align}
E[W] &= E[E[W|X]] \\
&= \sum_{k=1}^6 E[W|X=k] P[X=k] \\
&= \frac{1}{6} \sum_{k=1}^6 E[W|X=k] \\
&= \frac{1}{6} \sum_{k=4}^6 E[W|X=k] + \frac{1}{6} \sum_{k=1}^3 E[W|X=k] \\
&= \frac{1}{6} \sum_{k=4}^6 E[X|X=k] + \frac{1}{6} \sum_{k=1}^3 E[Y|X=k] \\
&= \frac{1}{6} \sum_{k=4}^6 k + \frac{1}{6} \sum_{k=1}^3 E[Y] \\
&= \frac{15}{6} + \frac{3}{6}\cdot \frac{7}{2} \\
&= \frac{17}{4}
\end{align}
A: The first term of your $E(W)$ represents the contribution to the expectation of rolling at least a $4$ and is correct.  The second term should be $\frac 12 \cdot \frac 16(1+2+3+4+5+6)$ where the factor $\frac 12$ represents the chance that you roll less than $4$ and then accept the second roll.  This correction would give you $\frac {15}6+\frac {3.5}2$, which does equal $4.25$.  Your second term comes out to $\frac {15}6$, then your addition is not correct as it should come out $\frac {18.5}6 \approx 3.0833$
