The sum and product rules of probability
10 questions on joint, marginal and conditional probability and the two rules that connect them. With worked explanations.
- 10 questions
- Stopwatch
- Instant feedback
Sample questions
Play now ↑Answers stay hidden. Start the quiz to play them.
Sample 1
Of 200 customers, 80 bought online. Of those 80, one in four returned an item. What share of all customers both bought online and returned an item?
- 10%
- 25%
- 40%
Sample 2
In a screening programme, 1 person in 100 has a condition. The test is positive for 90% of people who have it and for 5% of people who don't. Roughly what share of everyone screened tests positive?
- About 1%
- About 90%
- About 6%
How it works
- One question per screen. An answer is final once sent.
- You see right away whether you were right, with a short explanation.
- The stopwatch runs: on equal scores, the faster player ranks first.
- Only your best attempt counts, so replaying is never risky.
About this quiz
Almost everything in statistics and machine learning rests on two short rules about probability. One tells you how to get the probability of a single thing by adding up the ways it can happen alongside other things. The other tells you how to build the probability of two things happening together out of the probability of one and the chance of the other once the first is known. Everything else, including the famous theorem named after Thomas Bayes, is a consequence of these two. If you are comfortable with them, you can reason through a surprising number of everyday puzzles without memorising any formulas.
This quiz makes the rules concrete using tables of counts. When two things are recorded for every case, for example whether a customer bought online and whether they returned an item, you can lay the counts out in a grid. The share of all cases in one cell is a joint probability. The share of all cases in a whole column, ignoring the other variable, is a marginal probability. The share of a column's cases that fall in one cell is a conditional probability. Seeing all three in one picture takes most of the mystery out of the words.
The questions then put the rules to work. You will combine a conditional probability with a marginal one to find the chance of two events together, and add up across the ways something can happen to find an overall rate, such as the share of defective parts coming from several machines, or the share of people who test positive in a screening programme. They show why a test can flag far more people than actually have a condition. They also check an easily missed point: conditional probabilities of the different outcomes must add up to one, but you cannot swap the two sides of a conditional and expect the same number.
Mistakes in this area are surprisingly common, even among people who use numbers every day. A frequent one is to treat « the probability of A given B » and « the probability of B given A » as interchangeable. Another is to forget to add the contribution of every route to an outcome. A third is to read a percentage without asking which group it refers to. This quiz is a gentle way to build the habit of asking « out of whom? » every time a probability appears in a report. The same question protects you from headlines that quote a rate without saying which group it was measured in.
The quiz suits students meeting probability for the first time, analysts who want a sturdy foundation before moving on to Bayes' theorem, and anyone who reads test results or risk figures. It needs only simple arithmetic. There are 10 questions and every answer is explained, so it takes about four minutes.
Questions and answers
›How long does the quiz take?
About 3 to 4 minutes for 10 questions, at roughly 20 seconds each. Each answer comes with a short explanation.
›Do I need to know any formulas?
No. The questions use small, round numbers that you can work out in your head, and every explanation shows the reasoning in words. The rules themselves are described in plain language rather than symbols.
›What is the difference between joint, marginal and conditional probability?
A joint probability is the chance that two things happen together. A marginal probability is the chance of one thing, with the other ignored. A conditional probability is the chance of one thing among only those cases in which the other is known to hold. They are three different views of the same underlying table of counts.
›What does the sum rule tell me?
It says that you can find the probability of one variable taking a value by adding up the joint probabilities across all values of the other variable. People call this marginalising, or summing out, the variable you are not interested in. It simply reflects that every case must fall into exactly one of the possibilities.
›What does the product rule tell me?
It says that the probability of two things happening together equals the probability of the first multiplied by the probability of the second once the first is known. It is how you build a joint probability from simpler pieces, and it can be applied in either order, because the joint does not depend on which one you mention first.
›Why do conditional probabilities add up to one?
Because once the condition is fixed, the other variable still has to take some value. If a test gives a wrong positive result in some share of healthy people, all the remaining healthy people must get a correct negative result, so the two shares of that group make up the whole of it.
›Why is P(A given B) usually different from P(B given A)?
They answer questions about different groups. The first looks only at cases where B holds, and the second only at cases where A holds. Most men are not footballers, even though most footballers are men. The size of each group is what links the two numbers, and that link is Bayes' theorem.
›Where are these rules used in machine learning?
Everywhere that a model deals with uncertainty. Classifiers combine conditional probabilities, language models multiply them to score whole sentences, and training methods add them up over hidden possibilities. The two rules are the basic operations that all of this machinery is built from. Learning to read a table of counts in all three ways is therefore good preparation for far more advanced topics, such as how a network can be asked for the probability of each possible answer instead of a single guess.