Expected value of n coin tosses, if n is a random variable?

48 Views Asked by At

Imagine I have n coin tosses, let X be the number of heads. Since they're independent, I have $E\{X\} = np_{heads}$.

But what happens if $n$ is a random variable that depends on a certain parameter $a$ for example, but we know its expected value $E\{n\}$?

Intuitively I would say, $E\{X\} = E\{n\}p_{heads}$, but I can't find a quick way to show this.

Thanks!

1

There are 1 best solutions below

2
On BEST ANSWER

Your intuition is okay.

If there are $N$ tosses where $N$ is a random variable taking values in $\mathbb N$ then in order to find the expectation of $X$ we usually apply the rule: $$\mathbb EX=\mathbb E[\mathbb E[X\mid N]]=\mathbb E[Np_{\text{heads}}]=p_{\text{heads}}\mathbb EN$$