We start with the classic 100 sided dice game. You roll a fair 100 sided dice (with sides numbered 1 through 100), and get paid the number you land on, in dollars. If you are unhappy with this result, you can pay one dollar to re-roll, and you can re roll as many times as you like. Let $X$ be a random variable denoting how much money you make in one play of the game. What is $\text{Var}(X)$ under the optimal strategy (if you roll 87 or above, keep it, otherwise re-roll, regardless of what happened in the past)? Note the linked post proves that this is the optimal strategy which maximizes $\mathbb{E}[X]$.
We have $\text{Var}(X)=\mathbb{E}[X^2]-\mathbb{E}[X]^2$?. For the second term, we can compute $\mathbb{E}[X]=87+\frac{5}{14}$ using a recurrence, as shown here. How do we get the first term? Recurrence no longer works because of the squared term. We could compute it using something like $$\mathbb{E}[X^2]=\sum_{i=-\infty}^{100}\mathbb{P}(X=i)\cdot i^2$$
but this seems messy (at least I don't see a good way to compute $\mathbb{P}(X=i)$ in general). I coded up a simulation and seems like the variance is around 60, but unsure how to compute an exact value in a clean way. Any thoughts?