# Calculating Probability of Multiple Independent Events

#### NativoTulipan

##### New Member
Hello there,

I have been working on producing an excel spreadsheet to automatically calculate probability values for multiple independent events occurring.
Hopefully I find assistance in confirmation that the results acquired are correct - or at least on the right lines.

I do not come from a statistics background, so apologies in advance for any errors.

The spreadsheet can calculate the probability that either 2 or 3 events occur, from a total of up to 10 events. The calculations include multiplying each independent event (i.e. P(A n B) , P(A n B n C) .
Where 10 events are being calculated, the inputs rise dramatically - in line with the total number of events.
With this, the final calculation utilises probabilities of each 2-occurring/3-occurring combination. These probabilities are added together to produce a final probability value.

The best way to confirm accuracy/inaccuracy is to post an example calculation.
The below example contains 5 independent events, with probability displayed in decimal format.

Event 1 probability: 0.0333
Event 2 probability: 0.5000
Event 3 probability: 0.2325
Event 4 probability: 0.3077
Event 5 probability: 0.2222

The calculator produces the following values (again displayed as decimal probability):

Probability of any 2 events occurring: 0.6149
Probability of any 3 events occurring: 0.1308

These values appear extremely high, which is making me doubt the calculation.

Please may I request assistance in validating/altering the calculations to produce accurate probability values.

Sincerely,
Tulipan

#### katxt

##### Active Member
Does "any 2" mean 2 or more? or exactly 2

#### katxt

##### Active Member
multiplying each independent event (i.e. P(A n B) , P(A n B n C) .
Did you include the ones which didn't occur? P1&2 = P1*P2*(1-P3)*(1-P4)*(1-P5)?

#### NativoTulipan

##### New Member
Does "any 2" mean 2 or more? or exactly 2
Apologies, good point. with the calculation used, I believe it would calculate 'Any 2', whereas I would want it to calculate 2 or more.

#### NativoTulipan

##### New Member
Did you include the ones which didn't occur? P1&2 = P1*P2*(1-P3)*(1-P4)*(1-P5)?
I did not include this. I don't really understand what this calculation entails.

It is suggesting to me that the probability of both 1&2 occurring is dependent on P3,P4 & P5. Is that a correct assumption?
All events calculated are independent of each other.

#### katxt

##### Active Member
To get 1 and 2 only, you also have to get not 3, not 4 and not 5.
Or have Interpreted the question wrong? I read it as there are 5 things that may or not happen. What is the probability that exactly 2 of them will happen, given the probability of each individual thing.

Last edited:

#### NativoTulipan

##### New Member
To get 1 and 2 only, you also have to get not 3, not 4 and not 5.
Or have Interpreted the question wrong? I read it as there are 5 things that may or not happen. What is the probability that exactly 2 of them will happen, given the probability of each individual thing.
Ah okay, that makes sense.
You are correct in that 5 things may or may not happen.

I am looking to calculate that 2 or more occur. In my mind, the probability of Event 1 (A) and Event 2 (B) occurring is independent of the results of 3/4/5 (C,D,E).
However this raises an interesting point, 2 or more will occur if A,B,C,D & E occur.

So my current calculation, let's say 2 or more occurring from 3 events:
P(A n B) + P(A n C) + P(B n C).
However, is it correct to say that 2 or more occurring from 3 events is actually:
P(A n B) + P(A n C) + P(B n C) + P(A n B n C). ?

I appreciate your time & effort in assisting.

Last edited:

#### katxt

##### Active Member
Let's try the 5 event case. A B C D E can happen with probabilities a b c d e.
There are 2^5 = 32 possibilities from 0 to 5 events happening. The probability of each possibility is the product of 5 other probabilities. The sum of these 32 possibilities will total 1.
So, for instance, take B&C. This is shorthand for notA&B&C&notD&notE. It might be convenient to regard this as 01100. The count of these happenings is 2 (the B and the C). The probability of this possibility is (1-a)*b*c*(1-d)*(1-e)
So we can make a table for the 32 possibilities from 00000, ... 01100, ..., 11111 with their count numbers and probabilities. The total of the probabilities should be 1. You should have 1 5 10 10 5 and 1 (total 32) of the counts 0 1 2 3 4 5 so there are a total of 10 happenings like B&C that have exactly two hits.
If you want the probability of 2 or more hits, add all the probabilities where the count value is 2 or more. You can also collate the 32 row table into a smaller 6 row table if you want.
Depending on your programming or spreadsheet skills, this would probably need to be automated because for 10 events you would need a 1024 row table.
If you don't need an absolutely exact answer, then a simulation would be an easy way to find the probabilities you need. kat

#### NativoTulipan

##### New Member
Thank you very much! This helps greatly.

I now understand how to calculate how many values will be required per calculation.
Also, the binary system will definitely make it easier.

I do intent to manually produce a 1024 row table. My current calculations used ~600 (which explains why my values were off).

Truly appreciate your help & time.

Tulipan,,

#### katxt

##### Active Member
OK Good luck. Actually, now that I have thought a little more about it, 1024 rows (or more) can probably be done in Excel in about 5 minutes. Just a few formulas and copying.

#### NativoTulipan

##### New Member
OK Good luck. Actually, now that I have thought a little more about it, 1024 rows (or more) can probably be done in Excel in about 5 minutes. Just a few formulas and copying.
I've made a good start on the calculations. I have inputted formulae to calculate both 2 or 3 events occurring from a total of 3,4 & 5 events.

I am noticing a few issues though.

Firstly, as the number of total events is increasing my total probability calculated strays away from 1. For example, for 3 events, the total probability is exactly 1. This is the same for 4 events. However, for 5 events, the probability ranges from 0.95 - 1.35, depending on the probability of each outcome.
I have checked my calculations numerous times and see no errors. Any idea?

Secondly, looking at your calculation above. I understand that the total number of calculations is defined as: Number of events occurring required'^'number of total events. i.e. 2^5 = 32.
However, I do not understand from this how you calculated 1,5,10,10,5 - for the number of calculations per event occurring.

Thanks,
Tulipan