# Coin Betting Expectation

Suppose I have a biased coin with probability of heads p, and tails q=(1-p). It is then used in a game which lasts at most N tosses, and start with a stake of £1. Each time the coin is tails my money is doubled. The first time it comes down heads my money is reduced to £1, and the second time it comes down heads, I lose all my money. The game ends after N tosses, or after the second head. What is the expectation of my money at the end of the game?

-
– Undercover Mathematician Apr 17 '11 at 21:01

1
@Undercover Mathematician In the gambler's ruin problem, there is no limit on the number of coin tosses. So this problem is not quite the same. – Byron Schmuland Apr 17 '11 at 21:13
Ah, you're right. Thanks! – Undercover Mathematician Apr 17 '11 at 21:26

## 2 Answers

With probability $(1-p)^N$ you get no heads, and end up with $2^N$.

For $k=1,..,N$, with probability $p(1-p)^{N-1}$ you get a single "heads" on the $k$th toss. Then you end up with a value of $2^{N-k}$.

Any other result you end up with zero.

So the expected value is:

$$(1-p)^N2^N + p(1-p)^{N-1}(1+2+2^2+...+2^{N-1}) =$$ $$(1-p)^{N-1}[(1-p)2^N+p(2^N-1)]=$$ $$(1-p)^{N-1}(2^N-p)$$

-

Let $m$ be the amount of money you have before your first toss. (The problem specified $m=1$, but I did not notice. So we might as well look at this slightly more general situation.) If you are very lucky, all tails, probability $q^N$, you end up with $m2^N$.

Or else there could be $1$ head and the rest tails. The probability this happens at any particular one of the $N$ tosses is $pq^{N-1}$. Suppose it happens at the last toss. Then you end up with $1$. If it happens at the next to last toss, you end up with $2$. If it happens on the toss before that, you end up with $4$, and so on. Finally, if head happens on the very first toss, you end up with $2^{N-1}$. (Doesn't seem reasonable if $m=1$: the toss was bad but the casino let you keep your $1$ pound!) So the expectation is $$m2^Nq^N+ (1+2+\cdots +2^{N-1})pq^{N-1}$$ The expression can be simplified by noting that $1+2+\cdots+2^{N-1}=2^N-1$.

Now put $m=1$ for the actual problem as asked.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 21, "mathjax_display_tex": 4, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9404526352882385, "perplexity_flag": "head"}