• I flip $N$ coins.
  • The $n^{th}$ coin flip has probability $p_n$ to be head.
  • If the $n^{th}$ coin flip is head, I add $c_n$ to the total sum S.

How to calculate/approximate the expectation of $S$ quickly? Is it possible to simplify the following?

The number of coin flip is about 10.

Let $\vec{c} = (c_1, c_2, ..., c_N)$

Let $\vec{a} = (a_1, a_2, ..., a_N)$ be the result of the coin flips.

$a_n$ is 1 if the $n^{th}$ coin flip is head and is 0 otherwise.

The expectation is:

$E\lbrace S \rbrace = \sum_{a_{1}, ... a_{n}} \vec{c} \cdot \vec{a} \prod_{n = 1}^{N} a_n p_n + (1 - a_n)(1 - p_n) $

But that involves enumerating all cases of $\vec{a}$, which is not quite practical for my case because I need to calculate this for many times.

The $p_n$ are different for different coins.


1 Answer 1


By linearity of expectation, the expected value of the sum is

$$ \mathsf E[S]=\mathsf E\left[\vec c\cdot\vec a\right]=\vec c\cdot\mathsf E\left[\vec a\right]=\vec c\cdot\vec p\;. $$

  • $\begingroup$ duh. I feel dumb. Let me check again to see if this fit into the whole thing. Thanks. $\endgroup$
    – R zu
    Aug 30, 2018 at 19:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .