EZ Statistics

Basic Probability Calculator

Calculator

Calculates P(A|B) and/or P(B|A) given P(A) and/or P(B), and P(A∩B). Enter as many values as you have.

Learn More

Conditional Probability

The probability of an event occurring given that another event has already occurred. It is denoted as P(AB)P(A|B) (read as "P A given B"), where AA is the event and BB is the condition. For example, the probability of rolling a 6 () given that the die roll is even () is:

Even numbers highlighted, 6 emphasized

P(6Even)=13=0.333 P(6|\text{Even}) = \frac{1}{3} = 0.333

The formal definition of conditional probability is given by the formula:

P(AB)=P(AB)P(B) P(A|B) = \frac{P(A \cap B)}{P(B)} By rearranging the formula, we can obtain the joint probability of AA and BB , which is also known as the multiplication rule:P(AB)=P(AB)×P(B) P(A \cap B) = P(A|B) \times P(B)

If events AA and BB are independent, then the conditional probability of AA given BB is equal to the probability of AA: P(AB)=P(A)P(A|B) = P(A). Moreover, if AA and BB are mutually exclusive, then the conditional probability of AA given BB is zero: P(AB)=0P(A|B) = 0.

Addition Rule (Union)

The probability that either of two events occurs (AA or BB) is the sum of their individual probabilities, minus the probability of both occurring together (if they can overlap).P(AB)=P(A)+P(B)P(AB) P(A \cup B) = P(A) + P(B) - P(A \cap B) For example, let AA be the event of rolling an odd number(,,) and BB be the event of rolling a number greater than 4 ().

First Die: rolling an odd number

Second Die: rolling a number greater than 4

The probability of rolling an odd number or a number greater than 4 is:P(AB)=P(A)+P(B)P(AB)=36+2616=23=0.667 P(A \cup B) = P(A) + P(B) - P(A \cap B) = \frac{3}{6} + \frac{2}{6} - \frac{1}{6} = \frac{2}{3} = 0.667

Combination

A combination is a selection of objects where order doesn't matter. The number of combinations of nn distinct objects taken rr at a time is denoted as C(n,r)C(n,r) or nCr^nC_r or(nr)\binom{n} {r} and is calculated as:C(n,r)=(nr)=n!r!(nr)! C(n,r) = \binom{n}{r} = \frac{n!}{r!(n-r)!}
For example, let's consider selecting 2 different even numbers from the set 6. The number of ways to do this is:C(3,2)=(32)=3!2!(32)!=3×22×1=3 C(3,2) = \binom{3}{2} = \frac{3!}{2!(3-2)!} = \frac{3 \times 2}{2 \times 1} = 3

This means there are 3 different ways to select 2 even numbers from 2, 4, and 6:

which are:

The order doesn't matter because () is considered the same as ().

Permutation

A permutation is an arrangement of objects where order matters. For example, (1, 2) is different from (2, 1). The number of permutations of nn distinct objects taken rr at a time is denoted as P(n,r)P(n,r) or nPr^nP_r and is calculated as:P(n,r)=n!(nr)! P(n,r) = \frac{n!}{(n-r)!}
For example, let's consider rolling three dice and getting different even numbers (2, 4, 6) on each die. The number of ways to do this is:P(3,3)=3!(33)!=3!=3×2×1=6 P(3,3) = \frac{3!}{(3-3)!} = 3! = 3 \times 2 \times 1 = 6

This means there are 6 different ways to arrange the even numbers 2, 4, and 6 on three dice:

which are:

The order matters because (2, 4, 6), (4, 6, 2), and (6, 2, 4) are all considered different arrangements.

Related Links

Birthday Paradox Simulation

Monte Carlo Simulation

Normal Distribution Calculator

Binomial Distribution Calculator