Statistics Kingdom

Choose a probability to calculate and select the relevant data for step by step walkthroughs and solutions

Probability formula

P(E) = n(E) / n(S)

Complement rule

P(A) = 1 - P(A')

Addition rule

P(A∪B) = P(A) + P(B) - P(A∩B)

Conditional probability formula

P(A|B) = P(A∩B) / P(B)

Multiplication rule

P(A∩B) = P(B) * P(A|B)

Bayes' Theorem

P(A|B) = P(B|A) * P(A) / P(B)

Independent events formula

P(A∩B) = P(A) * P(B)

Formula for finding P(A) from

P(B) and P(A∪B)

P(B) and P(A∪B)

P(A) = (P(A∪B) - P(B)) / (1 - P(B))

Yes - use the Single Event calculator. Enter the number of favourable events observed as well as the total number of observations

No - continue

No - use the independent events calculator. Enter the probability you were looking for and the probabilities you have to find the answer.

Yes - continue

Yes - use the Bayes' Theorem calculator. Enter P(A), P(B) and P(B|A) to get P(A|B)

No - use the dependent events calculator. Enter the probability you were looking for and the probabilities you have to find the answer.

- Event - a particular outcome or a set of outcomes. If we rolled a die, then the die showing six or a die showing an even number (including the events 2, 4 and 6) would both be events.
- Probability - a number between 0 and 1 which is used to describe the chance of a particular event occurring.

For any event, E, the probability or the likelihood of that event is written as P(E).

No matter how we choose E, P(E) is always between 0 and 1: 0 ≤ P(E) ≤ 1

If P(E) = 0 then the event will never occur.

If P(E) = 1 then the event is guaranteed to occur.

Usually, P(E) is between these two options so the event may be unlikely to occur, have an even chance of occurring or be likely to occur. - Sample space - the set of all possible outcomes from an experiment.

For example, when rolling a die we have 6 possible results the numbers 1, 2, 3, 4, 5 and 6 on the top face of the die.

When talking about tossing a coin we obviously have to include heads and tails in our sample space.

However, we must also include the coin landing on its side, since it is a distinct possibility

and all the options must be accounted for in the sample space. Since we are listing all of the outcomes in the sample space,

we know that exactly one outcome must be the result. From this we can derive the following rule:

the sum the probabilities of each of the outcomes in the sample space equals 1.

For example, when throwing a regular dice, the possible outcomes are the numbers 1 to 6, so P(1)+P(2)+P(3)+P(4)+P(5)+P(6) = 1. - P(A∩B) (the intersection of A and B)- The probability that both event A and event B will occur.
- P(A∪B) (the union of A and B) - The probability that at least one of events A and B will occur.
- n(E) - the number of outcomes in the event E. For example, if E is an event representing an even roll of a die, then n(E)=3 (2, 4 and 6)
- Mutually exclusive - the two events A and B are mutually exclusive if we can never have both of them occurring at the same time, ie P(A∩B) = 0.

How do we calculate the probability of an event? One way to do this is to find the number of favourable outcomes and to divide it by the total number of outcomes as follows: **P(E) = n(E) / n(S)**

For our event E, where S is the sample space

For example, say we rolled 2 dice and we wanted to obtain a sum of 4.

All the outcomes in the sample space are:

[1,1],[1,2],...[1,6],...,[2,1],[2,2],..[2,6],...[6,1],[6,2],...,[6,6].

36 different outcomes (6 for the first die * 6 for the second die)

so n(S) = 36

the desirable outcomes are [1,3],[2,2],[3,1].

3 different outcomes, so n(sum to 4) = 3

So P(sum to 4) = n(sum to 4)/n(S)

= 3 / 36

= 1 / 12

However, this approach is sometimes naive, because we assume that all of the outcomes are equally likely to occur.

When running an experiment, we cannot always assume that the outcomes are equally likely. For example,

we could roll a biased coin with an 80% chance of tossing a head and a 20% chance of tossing tails. In this case, we cannot regard heads and tails as equally likely outcomes

Sometimes we have the probabilities of A, B and A∩B and we want to find P(A∪B). Instinctively, we might just add P(A) and P(B). However drawing this out we would get

+ =

This is close to the expected result, except we are counting P(A∩B) twice here, once as part of A and once as part of B.

Therefore, to get P(A∪B) we need to subtract the intersection of A and B. This leads us to the addition formula.

P(A∪B) = P(A) + P(B) - P(A∩B)

Are these events dependent or independent?

We can check if two events are independent with the following equations:

P(A∩B) = P(B) * P(A)

P(A|B) = P(A)

If either one of these equations is satisfied then we know that A and B are independent.

If we cannot show that one of these formulas is true then we have to assume that the events are dependent when solving the problem.

What's the multiplication rule?

This is the rule that says that P(A∩B) = P(B) * P(A|B)

It can be loosely read as the chance that both A and B happened is equal to the chance that B happened and in that universe, A also happened.

Since this is precisely the condition under which A∩B is true, this holds for dependent and independent probability calculation.

How does the conditional probability formula work?

Let's say we had 2 events, A and B, and we wanted to calculate the probability of A given B, P(A|B).

We could start by highlighting A, because we are looking at outcomes inside this circle.

However, we have got more information to deal with in the question - we know that B happened.

This means that we can exclude everything which is not in B, since we know that we are looking at outcomes where B happened.

We can represent this in a Venn diagram as follows:

From this, we can see that the chance of A (orange) given B (lighter colours) is P(A∩B)/P(B)

Conditional probability formula:

P(A|B) = P(A∩B) / P(B)

= P(A) * P(B|A) / P(B) from the multiplication rule, subbing in P(A∩B) = P(B) * P(B|A)

Looking at independent events is similar to looking at dependent events except we also know that P(A|B) = P(A),

Since the chance of event A does not depend on event B.

P(A∩B) = P(B) * P(A|B) (from the multiplication rule)

P(A∩B) = P(B) * P(A), since we know that P(A) = P(A|B)