Expected coin tosses until at least h heads and t tails are obtained

100 Views Asked by At

I am also wondering about the same question for any Bernoulli variable. I have got as far as saying for any Bernoulli variable: $$ \mathbb{E}[X] = h \sum\limits_{n \geq h + t}^{\infty} {n \choose h} p^h (1-p)^{n-h}+ t \sum\limits_{n \geq h + t}^{\infty} {n \choose t} p^{n-t} (1-p)^t $$ For the case $p = \frac{1}{2}$ (A fair coin), we have: $$ \mathbb{E}[X] = h \sum\limits_{n \geq h + t}^{\infty} {n \choose h} \frac{1}{2^n} + t \sum\limits_{n \geq h + t}^{\infty} {n \choose t} \frac{1}{2^n}$$ Where $X$ is the rv required. I did this by a method analogous to here: Expected value of number of tosses until we get $k$ tails and $k$ heads but the method breaks down at this point if $h \neq t$ (and if $p \neq \frac{1}{2}$). At this point I'm stuck wondering if there's a 'nicer' form to this.

1

There are 1 best solutions below

2
On

I cannot give you a closed form, but I would have thought that if you made $h+t$ tosses and then however many more are needed to get the missing result then the expected total numbe of tosses may be

$$h+t+\sum_{s=0}^{h-1} {h+t \choose s}p^s(1-p)^{h+t-s} \frac{h-s}{p} + \sum_{s=h}^{h+t} {h+t \choose s}p^s(1-p)^{h+t-s} \frac{s-h}{1-p}$$

which with some manipulation may be

$$= \frac{t}{1-p}+\sum_{s=0}^{h-1} {h+t \choose s}p^s(1-p)^{h+t-s}(h-s)\left(\frac1p+\frac1{1-p}\right)$$

only requiring a finite sum. It may be possible to simplify this.

Note that if $\frac{h}{h+t}$ is substantially less than $p$ then the sum will be small so the expectation will be only slightly more than $\frac{t}{1-p}$ and will be equal to that if $h=0$. Similarly if $\frac{h}{h+t}$ is substantially more than $p$ then the expectation will be only slightly more than $\frac{h}{p}$ and will be equal to this if $t=0$