Expectation of a die roll summed I know this problem involves conditional probability, but I'm confused as to how to tackle it.
Assume a die is rolled over and over, where the total is summed. If the die's roll is $\geq 3$ the game stops and the summed total is read out. What is the expectation of the total? What is the expected number of times the die was rolled?
 A: The total number of rolls follows a geometric law of parameter $p=\dfrac{4}{6}=\dfrac{2}{3}$. Therefore the expected number of rolls is $1/p=\color{red}{1.5}$.
Therefore the expected total is $(1/p-1)\cdot 1.5 + 4.5=\color{red}{5.25}$, because $1.5$ is the mean of a roll between $1$ and $2$ (and you have an average of $1/p -1$ rolls between $1$ and $2$) and $4.5$ is the mean of the last roll (between $3$ and $6$).
By the way you can easily verify your results for this kind of problem with a simple python code:
import random as random

nb_trials = 10000
tot = 0

for i in range(nb_trials):
    sum_value = 0
    b = True
    while b:
        a = random.randint(1,6)
        if a >=3:
            b = False
        sum_value += a
    tot += sum_value 

average = tot * 1.0 / nb_trials
print(average)

Try it online!
A: The game will stop after $1$ roll with a probability $2/3$. It will stop after $2$ rolls with a probability  $1/3 \times 2/3$.  ... It will stop after $n$ rolls with a probability  $(1/3)^{n-1} \times 2/3$. So the expected number of rolls is given by the sum
\begin{eqnarray*}
\sum_{n=1}^{\infty} n \frac{2}{3} \left( \frac{1}{3} \right)^{n-1} = \frac{2}{3} \sum_{n=1}^{\infty} n  \left( \frac{1}{3} \right)^{n-1}
\end{eqnarray*}
Now use the well known formula $\sum_{n=1}^{\infty} n  x^{n-1}= \frac{1}{(1-x)^2}$ and we have $3/2$. So you would expect the games to last for one and a half rolls.
A: You have $p=1/3$ to roll a die and get only $1$ or $2$.
So you have $P(n)=p^n q=p^n (1-p)$ to roll the die $n$ times getting less than $3$, and then more or equal $3$ at the $n+1$-th roll.
We include $n=0$, meaning that you get $\ge 3$ at the first roll.
The sum P(n)  over $0 \le n < \infty$ correctly gives $1$.
Now, the expected number of less than $3$ rolls will be
$$
\eqalign{
  & E(n) = \sum\limits_{0\; \le \,n\,} {n\,P(n)}  = (1 - p)\sum\limits_{0\; \le \,n\,} {n\,p^{\,n} }  =   \cr 
  &  = (1 - p)p{d \over {dp}}{1 \over {1 - p}} = {p \over {1 - p}} = {1 \over 2} \cr} 
$$
while the expected number of total rolls, of course is
$$
E(n + 1) = {3 \over 2}
$$
At each less than $3$ roll you can get,  with same probability, a 1 or a 2, thus in average $3/2$.
So espected sum of the rolls before stopping is $3/2E(n)=3/4$.
A: Another way of looking at it:
If you roll a 3,4,5, or 6 on the first roll (1/6 chance each), then the expected total will be that number (3, 4, 5, or 6).
If you roll a 1 or a 2, (also 1/6 chance each), then the expected roll is 1 or 2, PLUS the total expected roll.
So the total expected roll $T$ should be:
\begin{aligned}
T &= \frac{1+T}{6} + \frac{2+T}{6} + \frac{3}{6} + \frac{4}{6} + \frac{5}{6} + \frac{6}{6} \\
T &= \frac{1+2+3+4+5+6}{6} + \frac{2T}{6} \\
T &= \frac{7}{2} + \frac{T}{3}  & \text{(multiply by 3)} \\
3T &= \frac{21}{2} + T & \text{(subtract $T$)}\\
2T &= \frac{21}{2} & \text{(divide by 2)}\\
T &= \frac{21}{4} = 5.25
\end{aligned}
