Probability

How to Calculate Probability — Rules, Tree Diagrams, Examples

How to calculate probability: sample space, the complement and addition rules, independent events, tree and Venn diagrams, conditional probability. 13 examples.

To calculate a probability when all outcomes are equally likely, divide the number of favorable outcomes by the total number of possible outcomes: \( P(A) = \frac{\text{favorable outcomes}}{\text{total outcomes}} \). Every probability is a number from 0 (impossible) to 1 (certain). For combined events you add probabilities for "or" (taking away any overlap) and multiply them for "and" (adjusting the second probability when the first event changes the situation). After this lesson you will be able to list a sample space, use the complement rule for "at least one" questions, apply the addition and multiplication rules, draw tree diagrams and Venn diagrams, handle drawing with and without replacement, find a simple conditional probability, and tell theoretical from experimental probability.

What is probability?

Probability measures how likely something is to happen. Before you can calculate anything, you need three words.

When every outcome in the sample space is equally likely, the probability of an event \( A \) is

\[ P(A) = \frac{\text{number of outcomes in } A}{\text{number of outcomes in the sample space}} \]

This is called theoretical (or classical) probability. Probabilities can be written as fractions, decimals or percentages: \( \frac{1}{4} = 0.25 = 25\% \). If you need a refresher on converting between them, see how to calculate percentages.

Example 1: Rolling one die

A fair six-sided die is rolled. What is the probability that it shows a number greater than 4?

Solution. The sample space is \( \{1, 2, 3, 4, 5, 6\} \), six equally likely outcomes. The favorable outcomes are 5 and 6, so

\[ P(\text{greater than } 4) = \frac{2}{6} = \frac{1}{3}. \]

Answer: \( \frac{1}{3} \).

Example 2: Drawing from a bag

A bag contains 5 red, 3 blue and 2 green marbles. One marble is drawn at random. Find the probability that it is (a) blue; (b) not red.

Solution. There are \( 5 + 3 + 2 = 10 \) marbles, each equally likely to be drawn.

(a) \( P(\text{blue}) = \frac{3}{10} \).

(b) "Not red" means blue or green: \( 3 + 2 = 5 \) marbles, so \( P(\text{not red}) = \frac{5}{10} = \frac{1}{2} \).

Answer: (a) \( \frac{3}{10} \); (b) \( \frac{1}{2} \).

How do you list the sample space?

For a single die or a single draw the sample space is easy to write down. For two-step experiments, a systematic list stops you from missing or double-counting outcomes. Two tools do almost all the work: a grid (also called a sample space diagram or a two-way table) when there are two stages, and a tree diagram when there are several stages or the probabilities change.

Example 3: The sum of two dice

Two fair dice are rolled. Find the probability that the sum is (a) 7; (b) 8; (c) at least 10.

Solution. Each die has 6 outcomes, so there are \( 6 \cdot 6 = 36 \) equally likely ordered pairs. Treat the dice as different (say red and blue): a red 2 with a blue 5 is a different outcome from a red 5 with a blue 2.

(a) Sum 7: \( (1,6), (2,5), (3,4), (4,3), (5,2), (6,1) \), six outcomes. \( P = \frac{6}{36} = \frac{1}{6} \).

(b) Sum 8: \( (2,6), (3,5), (4,4), (5,3), (6,2) \), five outcomes. \( P = \frac{5}{36} \).

(c) Sum 10, 11 or 12: \( (4,6), (5,5), (6,4), (5,6), (6,5), (6,6) \), six outcomes. \( P = \frac{6}{36} = \frac{1}{6} \).

Answer: (a) \( \frac{1}{6} \); (b) \( \frac{5}{36} \); (c) \( \frac{1}{6} \).

Grid of the 36 outcomes of rolling a red die and a blue die, each cell showing the sum; the six cells with sum 7 lie on one diagonal and are highlighted234567345678456789567891067891011789101112112233445566blue dieredsum 7 in 6 of 36 cells: P = 1/6
Sample space for two dice: 36 equally likely outcomes, six of them with sum 7

The grid makes it clear why 7 is the most likely sum: it lies on the longest diagonal. It also shows the classic trap. There are 11 possible sums (2 to 12), but they are not equally likely, so \( P(\text{sum} = 7) \) is not \( \frac{1}{11} \).

What are the basic probability rules?

Two rules handle most questions about a single experiment: the complement rule and the addition rule.

The complement rule

The complement of an event \( A \), written "not \( A \)" (or \( A' \), \( A^c \), \( \bar{A} \)), happens exactly when \( A \) does not. Since one of them must happen,

\[ P(\text{not } A) = 1 - P(A) \]

The complement rule is the fastest way to answer any question containing "at least one". Instead of adding up all the ways to get one, two, three or more, you subtract the single case "none" from 1.

Example 4: At least one six

A fair die is rolled 4 times. What is the probability of getting at least one six?

Solution. The complement of "at least one six" is "no sixes at all". The rolls are independent, and each roll avoids a six with probability \( \frac{5}{6} \), so

\[ P(\text{no sixes}) = \left(\frac{5}{6}\right)^4 = \frac{625}{1296}, \qquad P(\text{at least one six}) = 1 - \frac{625}{1296} = \frac{671}{1296} \approx 0.518. \]

Answer: \( \frac{671}{1296} \approx 0.518 \), a little better than an even chance.

A common wrong answer is \( 4 \cdot \frac{1}{6} = \frac{2}{3} \). That reasoning would give a probability of \( \frac{7}{6} > 1 \) for seven rolls, which is impossible; it counts the outcomes with two or more sixes more than once.

The addition rule

For "\( A \) or \( B \)" (meaning \( A \), \( B \), or both), add the two probabilities and subtract the overlap, which would otherwise be counted twice:

\[ P(A \text{ or } B) = P(A) + P(B) - P(A \text{ and } B) \]

If \( A \) and \( B \) cannot happen together, they are mutually exclusive, the overlap is 0, and the rule simplifies to \( P(A \text{ or } B) = P(A) + P(B) \).

Example 5: A heart or a king

One card is drawn at random from a standard 52-card deck. What is the probability that it is a heart or a king?

Solution. There are 13 hearts and 4 kings, and one card, the king of hearts, is both. So

\[ P(\text{heart or king}) = \frac{13}{52} + \frac{4}{52} - \frac{1}{52} = \frac{16}{52} = \frac{4}{13}. \]

Answer: \( \frac{4}{13} \). Without the subtraction you would get \( \frac{17}{52} \), counting the king of hearts twice.

Example 6: A Venn diagram

In a class of 30 students, 18 play soccer, 12 play basketball and 7 play both. A student is chosen at random. Find the probability that the student plays (a) neither sport; (b) basketball only.

Solution. Fill a Venn diagram from the inside out. The overlap is 7. Soccer only: \( 18 - 7 = 11 \). Basketball only: \( 12 - 7 = 5 \). At least one sport: \( 11 + 7 + 5 = 23 \), which agrees with the addition rule \( 18 + 12 - 7 = 23 \). Neither: \( 30 - 23 = 7 \).

(a) \( P(\text{neither}) = \frac{7}{30} \).

(b) \( P(\text{basketball only}) = \frac{5}{30} = \frac{1}{6} \).

Answer: (a) \( \frac{7}{30} \); (b) \( \frac{1}{6} \).

Venn diagram for 30 students: 11 play soccer only, 7 play both sports, 5 play basketball only and 7, outside both circles, play neither11757soccer (18)basketball (12)class of 30
Venn diagram for Example 6: fill the overlap first, then the rest of each circle, then the outside

How do you find the probability of two events both happening?

For "\( A \) and \( B \)" you multiply, but what you multiply depends on whether the first event affects the second.

Separate coin tosses, separate rolls of a die and draws with replacement are independent. Draws without replacement are not: once an item is removed, the contents of the bag have changed.

Example 7: A coin and a die

A fair coin is tossed and a fair die is rolled. What is the probability of getting heads and a six?

Solution. The two results are independent, so \( P = \frac{1}{2} \cdot \frac{1}{6} = \frac{1}{12} \). You can check with the sample space: 12 equally likely pairs (H1, ..., H6, T1, ..., T6), exactly one of which is H6.

Answer: \( \frac{1}{12} \).

Tree diagrams

A tree diagram shows a multi-stage experiment branch by branch. Write the probability on each branch, then:

  1. Multiply along a path to get the probability of that whole sequence of outcomes.
  2. Add the probabilities of all the paths that make up your event.
  3. Check that the probabilities on the branches leaving any point add up to 1, and that all the end-of-path probabilities add up to 1.

Example 8: Three coin tosses

A fair coin is tossed three times. Find the probability of (a) exactly two heads; (b) at least one head.

Solution. The tree has \( 2 \cdot 2 \cdot 2 = 8 \) paths, each with probability \( \left(\frac{1}{2}\right)^3 = \frac{1}{8} \): HHH, HHT, HTH, HTT, THH, THT, TTH, TTT.

(a) Exactly two heads: HHT, HTH, THH, so \( P = \frac{3}{8} \).

(b) Use the complement: the only path with no heads is TTT, so \( P = 1 - \frac{1}{8} = \frac{7}{8} \).

Answer: (a) \( \frac{3}{8} \); (b) \( \frac{7}{8} \).

Example 9: Two draws without replacement

A bag contains 4 red and 6 blue counters. Two counters are taken out one after the other, without replacement. Find the probability that (a) both are red; (b) one is red and one is blue.

Solution. On the first draw, \( P(\text{red}) = \frac{4}{10} \) and \( P(\text{blue}) = \frac{6}{10} \). After the first draw only 9 counters are left, and the second-stage probabilities depend on what was taken.

(a) \( P(\text{red, red}) = \frac{4}{10} \cdot \frac{3}{9} = \frac{12}{90} = \frac{2}{15} \).

(b) "One of each" can happen in two orders, so add two paths:

\[ P = \frac{4}{10} \cdot \frac{6}{9} + \frac{6}{10} \cdot \frac{4}{9} = \frac{24}{90} + \frac{24}{90} = \frac{48}{90} = \frac{8}{15}. \]

Check: \( P(\text{blue, blue}) = \frac{6}{10} \cdot \frac{5}{9} = \frac{30}{90} = \frac{1}{3} \), and \( \frac{2}{15} + \frac{8}{15} + \frac{5}{15} = 1 \).

Answer: (a) \( \frac{2}{15} \); (b) \( \frac{8}{15} \).

Tree diagram for two draws without replacement from 4 red and 6 blue counters: first draw red 4/10 or blue 6/10; after red, red 3/9 or blue 6/9; after blue, red 4/9 or blue 5/9; path products 12/90, 24/90, 24/90, 30/904/10red6/10blue3/9red= 12/906/9blue= 24/904/9red= 24/905/9blue= 30/90
Without replacement the second-stage probabilities change: multiply along each path

Example 10: The same draws with replacement

Repeat part (a) of Example 9, but this time the first counter is put back before the second draw.

Solution. Now the draws are independent and the bag is the same both times: \( P(\text{red, red}) = \frac{4}{10} \cdot \frac{4}{10} = \frac{16}{100} = \frac{4}{25} = 0.16 \).

Answer: \( \frac{4}{25} \). It is higher than \( \frac{2}{15} \approx 0.133 \) because a red counter drawn first is available again.

Example 11: Shared birth months (exam level)

Three people are chosen at random. Assuming each person is equally likely to be born in any of the 12 months, independently of the others, what is the probability that at least two of them share a birth month?

Solution. Use the complement: "all three months are different". The first person can have any month. The second must avoid that month (11 out of 12), and the third must avoid both (10 out of 12):

\[ P(\text{all different}) = \frac{12}{12} \cdot \frac{11}{12} \cdot \frac{10}{12} = \frac{1320}{1728} = \frac{55}{72}. \]

So \( P(\text{at least two share}) = 1 - \frac{55}{72} = \frac{17}{72} \approx 0.236 \).

Answer: \( \frac{17}{72} \approx 0.236 \). (Real birth months are not exactly equally likely, so this is a model, not an exact fact about people.)

How to approach any probability question

  1. Describe a single outcome precisely, and decide whether all outcomes are equally likely.
  2. Decide whether the stages are independent, and whether items are replaced.
  3. Choose a tool: a list or grid for two simple stages, a tree for several stages or changing probabilities, a Venn diagram for overlapping groups.
  4. Look for the words "at least one" or "not": they usually mean the complement is the shortest route.
  5. Combine with the rules: add for "or" (minus the overlap), multiply along branches for "and".
  6. Check that the answer is between 0 and 1, simplify the fraction, and, if you can, confirm it another way (for example, by checking that all the cases add up to 1).

What is conditional probability?

Sometimes you are told that one event has already happened. The conditional probability of \( A \) given \( B \), written \( P(A \mid B) \), is the probability of \( A \) when you restrict attention to the outcomes in \( B \):

\[ P(A \mid B) = \frac{P(A \text{ and } B)}{P(B)} \]

With counts, this is simply \( \frac{\text{number in both}}{\text{number in } B} \): the condition shrinks the sample space to \( B \). You already used the idea in Example 9: the second-draw probability \( \frac{3}{9} \) is \( P(\text{second red} \mid \text{first red}) \).

Example 12: Reading a survey

In a survey of 200 students, 80 take Spanish, 70 take music, and 30 take both. A student is chosen at random. Find (a) the probability that the student takes music, given that they take Spanish; (b) the probability that the student takes Spanish, given that they take music.

Solution. (a) Restrict to the 80 Spanish students, of whom 30 take music: \( P(\text{music} \mid \text{Spanish}) = \frac{30}{80} = \frac{3}{8} \).

(b) Restrict to the 70 music students, of whom 30 take Spanish: \( P(\text{Spanish} \mid \text{music}) = \frac{30}{70} = \frac{3}{7} \).

Answer: (a) \( \frac{3}{8} \); (b) \( \frac{3}{7} \). The two conditional probabilities are different: \( P(A \mid B) \) and \( P(B \mid A) \) are not the same thing, and confusing them is one of the most common reasoning errors with probability.

What is the difference between theoretical and experimental probability?

Theoretical probability comes from reasoning about equally likely outcomes, as in all the examples so far. Experimental probability (also called relative frequency or empirical probability) comes from data:

\[ \text{experimental probability} = \frac{\text{number of times the event happened}}{\text{number of trials}} \]

For a fair die, the theoretical probability of a six is \( \frac{1}{6} \), but in 60 rolls you might see 7 sixes or 13. As the number of trials grows, the relative frequency tends to settle close to the theoretical probability; this is the law of large numbers. It does not mean that results "even out" in the short run: a die has no memory, and after five rolls without a six the next roll still shows a six with probability \( \frac{1}{6} \).

Going the other way, the expected number of times an event happens in \( n \) trials is \( n \cdot P(A) \). In 120 rolls of a fair die you expect \( 120 \cdot \frac{1}{6} = 20 \) sixes, though the actual count will usually differ a little.

Example 13: Estimating a probability from data

A thumbtack is dropped 200 times and lands point up 62 times. Estimate the probability that it lands point up, and the number of times it would land point up in 500 drops.

Solution. The relative frequency is \( \frac{62}{200} = 0.31 \). There are no equally likely outcomes to count here, so this estimate is the best we can do. In 500 drops we would expect about \( 500 \cdot 0.31 = 155 \) to land point up.

Answer: about 0.31; about 155 times out of 500.

What are the most common probability mistakes?

  • Assuming outcomes are equally likely when they are not. The sums of two dice, or "win, lose, draw" in a match, are not equally likely just because there are a few of them.
  • Forgetting the overlap in "or" questions. Subtract \( P(A \text{ and } B) \) unless the events are mutually exclusive.
  • Multiplying probabilities of dependent events as if they were independent. Without replacement, the second-stage probabilities change.
  • Adding instead of using the complement for "at least one". \( 1 - P(\text{none}) \) is almost always quicker and safer.
  • Counting only one order. "One red and one blue" includes red-then-blue and blue-then-red.
  • Mixing up \( P(A \mid B) \) and \( P(B \mid A) \). Ask yourself which group the condition restricts you to.
  • Believing in the gambler's fallacy. Independent trials have no memory: a fair coin that has landed heads five times in a row still has a \( \frac{1}{2} \) chance of heads next time.

FAQ about probability

What is the difference between "or" and "and" in probability?

"\( A \) or \( B \)" means at least one of them happens, and you use the addition rule. "\( A \) and \( B \)" means both happen, and you use the multiplication rule. In a Venn diagram, "or" is everything inside either circle and "and" is the overlap.

What does it mean for events to be mutually exclusive?

They cannot happen at the same time, such as rolling a 2 and rolling a 5 on a single roll. Mutually exclusive is not the same as independent. In fact, two mutually exclusive events with nonzero probabilities are never independent: if one happens, the other becomes impossible.

Can a probability be written as a percentage?

Yes. \( P = 0.35 \) and \( 35\% \) mean the same thing. In calculations, fractions or decimals are usually easier; percentages are common in final answers and in everyday language ("a 70% chance of rain").

When should I use a tree diagram instead of a grid?

A grid works well for exactly two stages with equally likely outcomes, like two dice. A tree diagram is better for three or more stages, or when the probabilities change from stage to stage, as in drawing without replacement.

Cheat sheet

  • Equally likely outcomes: \( P(A) = \frac{\text{favorable}}{\text{total}} \), always between 0 and 1.
  • Complement: \( P(\text{not } A) = 1 - P(A) \); "at least one" \( = 1 - P(\text{none}) \).
  • Addition rule: \( P(A \text{ or } B) = P(A) + P(B) - P(A \text{ and } B) \); for mutually exclusive events the last term is 0.
  • Independent events: \( P(A \text{ and } B) = P(A) \cdot P(B) \).
  • Tree diagrams: multiply along the branches, add the paths you want.
  • Without replacement: the numerator and denominator change after each draw.
  • Conditional probability: \( P(A \mid B) = \frac{P(A \text{ and } B)}{P(B)} \).
  • Experimental probability \( = \frac{\text{successes}}{\text{trials}} \); expected number \( = n \cdot P(A) \).

Practice

Each problem checks your answer instantly and has a hint and a full solution.

For more, see all probability practice problems or browse the other English lessons.

All math lessons Practice problems by topic