# Expectation of weighted binomial distribution with weighted values

• 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.

• small n. can't use central limit theorem: stats.stackexchange.com/questions/89254/…
– R zu
Aug 30, 2018 at 17:32
• monte carlo for sum of weighted binomial (not the expectation): stats.stackexchange.com/questions/270227/…
– R zu
Aug 30, 2018 at 17:34
• Flipping many coins/Monte carlo are probably slow.
– R zu
Aug 30, 2018 at 17:42
• Why isn't it simply $\Sigma p_i c_i$ Aug 30, 2018 at 18:19

$$\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\;.$$