# Probability of N unrelated events, each with different probabilities, what is the chance X number of outcomes occur

Given the probability of N unrelated events, each with different probabilities, what is the chance X number of outcomes occur?

Said specifically there are 8 unrelated contracts, what is the chance a company wins 1,2,3,4,5,6,7, and 8 of them?

P(Winning Contract1) = 70% P (Winning Contract 2) = 45% P(C3)= 30% P(C4)=50% P(C5)=55% P(C6)=610% P(C7)=2% P(C8)= 2%

Since there are (I think?) 8 choose 4 or 70 possible ways to win 4 contracts, and you have to sum those probabilities.

P(Winning one contract; not necessarily contract 1, but either 1, or 2, or 3, 4, or..) = ? P (Winning two contracts) =? P (Winning three contracts) = ? P (Winning four contracts) = ? … P (Winning 8 contracts)?

Having a bit of trouble with this, help would be appreciated.

This sort of calculation can be substantially facilitated using generating functions. The probability generating function for the $i$-th contract is $1-p_i+p_ix$, where $p_i$ is the probability to win the contract and the coefficient of $x^k$ is the probability to win $k$ contracts. Then the probability generating function for all contracts together is the product

$$\prod_{i=1}^N\left(1-p_i+p_ix\right)\;.$$

I'll assume that where it says $610\%$ in your example you meant $10\%$. Then the probability generating function for your example is

$$(0.3+0.7x)(0.55+0.45x)(0.7+0.3x)(0.5+0.5x)(0.45+0.55x)(0.9+0.1x)(0.98+0.02x)^2\\\approx0.0000010395 x^8+0.000117258 x^7+0.00407098 x^6+0.0436603 x^5+0.17417 x^4+0.322475 x^3+0.299295 x^2+0.133747 x+0.0224626$$

(Wolfram|Alpha calculation). Thus, for instance, the probability to win exactly $2$ contracts is about $29.9\%$.

These calculations are time consuming. I give you an examplary calculation. Let´s calculate the probability of winning 7 contracts. We have 8 different situations.

• Not winning contract 1 but winning the other contracts

The probability is $(1-0.7)\cdot 0.45 \cdot 0.3\cdot 0.5 \cdot 0.55 \cdot 0.61\cdot 0.02\cdot 0.02$

• Not winning contract 2 but winning the other contracts

The probability is $0.7\cdot (1-0.45) \cdot 0.3\cdot 0.5 \cdot 0.55 \cdot 0.61\cdot 0.02\cdot 0.02$

• Not winning contract 3 but winning the other contracts

The probability is $0.7\cdot 0.45 \cdot (1-0.3)\cdot 0.5 \cdot 0.55 \cdot 0.61\cdot 0.02\cdot 0.02$

• Not winning contract 4 but winning the other contracts

The probability is $0.7\cdot 0.45 \cdot 0.3\cdot (1-0.5) \cdot 0.55 \cdot 0.61\cdot 0.02\cdot 0.02$

• Not winning contract 5 but winning the other contracts

The probability is $0.7\cdot 0.45 \cdot 0.3\cdot 0.5 \cdot (1-0.55) \cdot 0.61\cdot 0.02\cdot 0.02$

• Not winning contract 6 but winning the other contracts

The probability is $0.7\cdot 0.45 \cdot 0.3\cdot 0.5 \cdot 0.55 \cdot (1-0.61)\cdot 0.02\cdot 0.02$

• Not winning contract 7 but winning the other contracts

The probability is $0.7\cdot 0.45 \cdot 0.3\cdot 0.5 \cdot 0.55 \cdot 0.61\cdot (1-0.02)\cdot 0.02$

• Not winning contract 8 but winning the other contracts

The probability is $0.7\cdot 0.45 \cdot 0.3\cdot 0.5 \cdot 0.55 \cdot 0.61\cdot 0.02\cdot (1-0.02)$

Now all the probabilities have to be summed up to get the probability of winning 7 contracts.

In the case of not winning 4 contracts but winning 4 contracts ${8 \choose 4}=70$ situations have to be calculated.