# Analytic approach to find probability and total value of a set of independent events

I have a forecasting worksheet which describes a set (worksheet) of independent events, all of which have a likelihood of happening given as a probability (e.g. 0.7). Every event also has a yield value associated with it. There are about 30 items in the table.

The table looks like this:

Name    P     Yield-value
Event1  0.3   120
Event2  0.7   70
Event3  0.1   310
Event4  0.9   40


The table is read so that Event1 has 30% chance of happening, which would yield a value of 120. So the event either happens or not, but if it does, it yields a value 120.

My question is how can I know the total yield value of the table, which has a likelihood of a given probability? For example, at 50% probability, what is the total yield of the event set?

I did solve the problem using a Monte Carlo simulation, in where I did Bernoulli trials over the set using a lot (millions) of different scenarios, however I'm interested to know if there is also an analytic approach.

For each $i = 1, 2, \ldots, n$, let $X_i \sim {\rm Bernoulli}(p_i)$ be a Bernoulli random variable with $\Pr[X_i = 1] = p_i$. Then the yield associated with observing $X_i$ is $Y_i = c_i X_i$, where $c_1, c_2, \ldots, c_n$ are fixed constants. That is to say, we assume the yield is zero if the $i^{\rm th}$ event does not occur.
Then the total yield is simply $S = \sum_{i=1}^n Y_i$ and its expected value is $${\rm E}[S] = \sum_{i=1}^n c_i p_i.$$ The variance, if the individual events are independent, is $${\rm Var}[S] = \sum_{i=1}^n c_i^2 {\rm Var}[X_i] = \sum_{i=1}^n c_i^2 p_i(1-p_i).$$