LessonThis is a lesson restated in new words. Any figure in it is an example from the source, not this desk's record.
Flip n coins. Each time the current flip and the one before it are both heads, receive a payout D. The expected total payout is (n minus 1) times p squared times D, where p is the probability of heads. For a fair coin, p is 1/2, and for D equal to 1 the expectation is 0.25 on two flips, 0.5 on three, 2.25 on ten, and 24.75 on one hundred. A 10,000-trial simulation in the lecture landed on those figures, including about 2.24 against 2.25 and about 24.7 against 24.75. The fair price of the game, before any charge for offering it, is that expectation. The expectation is a probability-weighted payout, so it is allowed to exceed 1.
Why it matters
The first flip can never pay, because “consecutive” needs a predecessor. After that, every new flip is a chance to extend a streak, and the chance depends on the flip you just saw. Writing out all sequences works for two flips and collapses for ten. The lecture’s route is a conditional expectation that becomes a recursion, then a closed form. They treat the question as the sort of process puzzle that shows up in quantitative interviews, worked out on paper and checked in Python. The check is the simulation. The price is the formula.
The idea in plain words
Let each flip be 1 for heads and 0 for tails, with probabilities p and 1 minus p. Let T at step n be the cumulative payout after n flips. On the first flip, whether it is heads or tails, no pair exists, so T at 1 is 0 and its expectation is 0. A constant has expectation equal to itself.
At the second flip, condition on the first. If the first was tails, the second cannot complete a pair of heads, so the conditional expectation is 0. If the first was heads, the second pays D with probability p and pays 0 with probability 1 minus p, so the conditional expectation is p times D. Weight those two conditionals by the probability of the first flip. The tails branch contributes nothing. The heads branch contributes p times p D. The expectation at step 2 is p squared times D. For a fair coin that is one fourth of D. Counting sequences agrees: four equally likely pairs, and only heads-heads pays, so the average is D over 4.
How to use it
Plug n, p, and D into (n minus 1) p squared D and treat the result as the break-even price of one play, the G in the lecture’s wording. If you are offering the game and you want an edge, the lecture’s remark is that you would charge more than this expectation. That remark is about the offerer’s spread over a fair value. It is not a claim that a player has a method to beat the formula.
What usually goes wrong
Listing all 2 to the n sequences and dividing counts only the fair-coin case, and it is what the lecture abandoned after two flips. It also breaks as soon as p is not 1/2, because the sequences are not equally likely. The recursion already has p in it.
Questions people ask
What is the expected payout after n flips?
(n minus 1) times p squared times D. The first flip never pays. Each later flip adds an expected p squared D under the recursion they derived.
What do a fair coin and a one-dollar prize pay?
0 at one flip, 0.25 at two, 0.5 at three, 2.25 at ten, and 24.75 at one hundred. A 10,000-path simulation came back near those numbers, about 2.24 and about 24.7 at the two larger sizes.
Why can the fair price exceed one dollar?
Because D can be earned more than once in a long sequence. The result is an expected payout, not a probability. The lecture’s hundred-flip case is 24.75 dollars when each pair pays one dollar.