JC1 H3 Mathematics Tutor Bukit Timah | Bayes Theorem and Conditional Probability. Did you know? A quality-control alert can be correct most of the time when an item really is faulty, yet most alerts can still concern perfectly good items. The missing information is how common faults were before the alert.
Bayes’ theorem explains how to reverse a conditional probability when new information arrives. For a JC1 Mathematics student in Bukit Timah, Beauty World or Sixth Avenue, the key is to build an accurate sample space, distinguish what was given from what is being asked, and calculate the total probability of the observed event.
The 2027 H3 Mathematics syllabus 9820 assumes H2 probability and counting, while emphasizing proof, problem formulation and interpreting results. Bayes’ theorem is developed here as an H2-foundation and non-routine probability application, not claimed as a separately named new H3 topic. These are hypothetical teaching examples, not official examination questions or current school-admissions guidance.
The quick answer: Bayes’ formula
- Conditional probability: P(A given B)=P(A∩B)/P(B), provided P(B)>0.
- Bayes’ theorem: P(A|B)=P(B|A)P(A)/P(B).
- Total probability: if A and its complement partition the sample space, P(B)=P(B|A)P(A)+P(B|Aᶜ)P(Aᶜ).
- Direction: P(B|A) and P(A|B) are generally different; Bayes’ theorem relates them.
- Interpretation: multiply each prior category’s frequency by its likelihood of producing the observation, then divide the relevant part by the total observation frequency.
The most reliable approach is to define A and B explicitly. For example A might mean “selected from production line A”, while B means “the item is flagged”. P(B|A) asks how likely a flag is among A-items. P(A|B) asks what fraction of all flagged items came from line A. The denominators are not the same.
A complete example: two boxes and a red object
Box A is selected with probability 1/3 and contains red objects with probability 3/4. Box B is selected with probability 2/3 and contains red objects with probability 1/4. After selecting a box and drawing one object, the object is red. What is the probability that Box A was selected?
The path through A and red has probability (1/3)(3/4)=1/4. The path through B and red has probability (2/3)(1/4)=1/6. So the total chance of a red object is 1/4+1/6=5/12. The wanted conditional probability is (1/4)/(5/12)=3/5.
Notice the reversal. The chance of red given A was 3/4, but the chance of A given red is 3/5. The larger prior probability of Box B makes a difference even though its red rate is lower.
Original worked examples: conditional directions and base rates
Worked example 1: An event and its conditioning set
Suppose a uniform six-sided die is rolled. Let A mean “the result is even” and B mean “the result is greater than four”. Event B contains {5,6}; only the six is even, so P(A|B)=1/2.
Reversing gives P(B|A)=1/3 because A contains {2,4,6} and only six exceeds four. These values differ. The example is deliberately small so the denominator change can be checked by listing the permitted outcomes.
Worked example 2: Drawing two cards without replacement
From a standard 52-card deck, suppose the first card is known to be an ace. Three aces remain among 51 cards, so the conditional probability the second card is an ace is 3/51=1/17.
This is not the unconditional probability 4/52=1/13 for a card in a given position. Observing an ace on the first draw changes the remaining deck, and sampling without replacement creates dependence.
Worked example 3: A small bag of coloured counters
A bag contains three red and two blue distinct counters. Draw twice without replacement. Given that the first is red, two red remain among four counters.
Hence P(second red|first red)=2/4=1/2. The probability of two red draws in sequence is (3/5)(2/4)=3/10. The second calculation includes the probability of the condition itself; the first conditions on it already having occurred.
Worked example 4: Replacement changes the calculation
A bag contains five red and three blue counters. With replacement between draws, the probability of a red second draw given a red first draw remains 5/8.
Without replacement it becomes 4/7. The counts and colours have not changed initially, but the sampling mechanism has. Always state whether objects are replaced or removed when computing conditional probabilities.
Worked example 5: An independent pair of coin tosses
Two fair coin tosses are independent. Let A mean the first toss is heads and B mean the second is heads. Then P(A|B)=P(A)=1/2, since knowing the second toss tells nothing about the first.
Independence is a specific condition, not a general feature of events. In other examples, learning B changes the relative frequencies of A and not A, so the conditional probability differs from the prior.
Worked example 6: A coin toss with an observation
Two fair coin tosses have four equally likely ordered outcomes: HH, HT, TH, TT. Suppose the observation is at least one head, leaving HH, HT, TH.
Given that observation, P(first toss heads)=2/3 because HH and HT qualify. Without the observation, the chance is 1/2. The condition changes the sample space, even though the coin remains fair.
Worked example 7: A class survey with reversed conditions
In a hypothetical group of 40 students, 24 study subject A and 20 study subject B, with 12 studying both. Then P(B|A)=12/24=1/2.
However P(A|B)=12/20=3/5. The same overlap numerator appears in both fractions, but the denominator must be the number in the group we are conditioning on. This is a reliable check for wording errors.
Worked example 8: Two suppliers and one faulty item
Suppose a hypothetical supplier A provides 60% of items with 2% defective, while supplier B provides 40% with 5% defective. The total defective probability is 0.6×0.02+0.4×0.05=0.032.
Given an item is defective, the chance it came from supplier B is 0.4×0.05/0.032=0.625=5/8. Supplier B’s prior share was only 40%, but its higher fault rate changes the posterior share of faulty items.
Worked example 9: Which supplier was more likely?
In the previous invented supplier example, P(A|defective)=0.6×0.02/0.032=0.012/0.032=3/8. The probabilities for A and B after the observation are 3/8 and 5/8.
These add to one, a useful audit because the two suppliers form a complete and mutually exclusive partition. If the posterior probabilities did not sum to one, an arithmetic or denominator error would be likely.
Worked example 10: A quality-alert base-rate example
In a hypothetical batch, 10% of items are defective. An inspection flags 90% of defective items and incorrectly flags 20% of good items. The flagged defective share is 0.10×0.90=0.09.
The flagged good share is 0.90×0.20=0.18. Among all flagged items, the defective fraction is 0.09/(0.09+0.18)=1/3. A 90% detection rate does not mean 90% of flags concern defects.
Worked example 11: Translate the quality example into counts
Imagine 1000 items with exactly 100 defective and 900 good, matching the hypothetical rates. The inspection flags 90 defective items and 180 good items.
Among the 270 flagged items, exactly 90 are defective, giving 90/270=1/3. The count interpretation makes the Bayes denominator concrete. These are stipulated teaching numbers, not a measurement of an actual factory.
Worked example 12: A clean inspection result
Continue with 10% defective, 90% detection and 20% false positive rates. A defective item is missed with probability 10%, contributing 0.10×0.10=0.01 to all unflagged outcomes.
A good item is unflagged with probability 80%, contributing 0.90×0.80=0.72. Given no flag, the defective probability is 0.01/(0.01+0.72)=1/73. The observation can lower a prior probability substantially.
Worked example 13: A rare-event quality alert
Suppose only 1% of items are faulty. An alert flags 95% of faulty items and mistakenly flags 5% of sound items. The faulty-and-flagged proportion is 0.01×0.95=0.0095.
The sound-and-flagged proportion is 0.99×0.05=0.0495. The posterior fault probability after a flag is 0.0095/(0.0095+0.0495)=19/118, about 16.1%. The rare prior rate matters.
Worked example 14: Change the prior, not the sensor
Keep the hypothetical alert accuracy at 95% detection and 5% false positives, but suppose the prior fault rate rises to 20%. The defective-and-flagged proportion is 0.2×0.95=0.19; the sound-and-flagged proportion is 0.8×0.05=0.04.
The posterior fault probability is 0.19/0.23=19/23, about 82.6%. The same evidence can lead to a different posterior when the prior population changes. This is the purpose of base-rate reasoning.
Worked example 15: Three production sources
Suppose supplier A provides 50% of items and has 1% defective, B provides 30% with 2% defective, and C provides 20% with 5% defective. The defective contributions are 0.005, 0.006 and 0.010.
The total defective probability is 0.021. Given a defective item, the chance it came from C is 0.010/0.021=10/21. The posterior shares from A,B,C are 5/21,6/21,10/21, summing exactly to one.
Worked example 16: Two boxes selected equally often
Suppose Box A and Box B are each selected with probability 1/2. A contains two red objects among three; B contains one red among three. The total chance of red is (1/2)(2/3)+(1/2)(1/3)=1/2.
Given red, P(A|red)=(1/2)(2/3)/(1/2)=2/3. The box probabilities started equal, but the observed red object favours the box with the greater red proportion.
Worked example 17: A reverse conditional with a different denominator
For the equal-box example, P(red|A)=2/3 and P(A|red)=2/3 happen to be numerically equal. That coincidence is not a general rule.
Changing the box selection probabilities or object composition can break the equality immediately. The correct habit is to compute the joint event and total observed-event probability every time, not to infer equality from a favourable example.
Worked example 18: An event with zero probability cannot condition normally
The elementary expression P(A|B)=P(A∩B)/P(B) requires P(B)>0. If B is impossible in a finite sample space, its probability is zero and the ratio would divide by zero.
A learner should not assign an arbitrary number to such a conditional event. More advanced probability theory has special treatments of conditioning, but they are outside this elementary finite-event formula.
Worked example 19: The multiplication rule
From the definition of conditional probability, P(A∩B)=P(A|B)P(B) whenever P(B)>0. Reversing labels also gives P(A∩B)=P(B|A)P(A) when P(A)>0.
Equating the two expressions produces Bayes’ theorem. This derivation is shorter and more trustworthy than memorising a formula whose condition order might be reversed.
Worked example 20: A tree diagram and its branch weights
A probability tree first branches into A and Aᶜ with probabilities p and 1−p. Its next branches indicate B or Bᶜ conditional on the first state. Multiplying along one path gives a joint event probability.
Adding all paths ending in B gives P(B). The posterior P(A|B) is the A-and-B path divided by that total. A tree is not just artwork: it encodes the conditional sample space.
Further Bayes applications: odds, repeated evidence and diagnostic checks
Advanced worked example 1: Posterior odds from prior odds
Bayes’ theorem can also be expressed as posterior odds equals prior odds multiplied by a likelihood ratio: P(A|B)/P(Aᶜ|B)=[P(A)/P(Aᶜ)]×[P(B|A)/P(B|Aᶜ)].
For the Box A versus Box B red-object example, the prior odds A:B were (1/3):(2/3)=1:2, and red was three times as likely under A as B. The posterior odds become 3:2, giving P(A|red)=3/5. This is an alternative exact calculation, not a new assumption.
Advanced worked example 2: Quality-inspection odds
Return to the hypothetical supplier example: supplier A provides 60% of items with 2% defects, while B provides 40% with 5% defects. The prior odds A:B are 3:2.
The defect likelihood ratio A:B is 0.02:0.05=2:5, so posterior odds after observing a defect are (3/2)(2/5)=3:5. Thus P(A|defect)=3/8 and P(B|defect)=5/8. The odds method confirms the earlier total-probability method.
Advanced worked example 3: A fair coin or a two-headed coin
An experiment selects a fair coin or a hypothetical double-headed coin with equal probability, then tosses it once. Given heads, the fair coin path has probability (1/2)(1/2)=1/4; the double-headed path has probability (1/2)(1)=1/2.
Therefore the probability that the double-headed coin was chosen is (1/2)/(3/4)=2/3. The observation heads increases the probability of the double-headed coin, but it does not prove its identity.
Advanced worked example 4: Two heads with a hidden coin type
Continue the equal-prior fair-versus-double-headed coin model. Given two heads in two tosses of the selected coin, the fair-coin likelihood is 1/4 and the double-headed likelihood is one.
Bayes gives P(double-headed|HH)=(1/2×1)/(1/2×1+1/2×1/4)=4/5. The model assumes the coin type stays the same and successive fair-coin tosses are independent conditional on that type.
Advanced worked example 5: A fair die or a fixed-six die
Suppose a fair six-sided die and a hypothetical die that always shows six are chosen with equal probability. The observed result is six. The fair-die path has probability (1/2)(1/6)=1/12, while the fixed-six path has probability 1/2.
The posterior probability of the fixed-six die is (1/2)/(1/12+1/2)=6/7. This calculation is not a statement about real dice; it shows how a more likely observation changes a prior category probability.
Advanced worked example 6: Bayes across three categories
Imagine three production lines with prior shares 1/2, 3/10 and 1/5 and fault likelihoods 1/100,2/100 and5/100. The three contributions to a defective observation are 0.005,0.006,0.010.
The total is 0.021, so their posterior shares given a defect are 5/21,6/21,10/21. These add to one. A three-category problem is solved with the same principle: divide each observed path weight by the sum of all relevant path weights.
Advanced worked example 7: The probability a good item came from A
In that same three-line model, P(good)=1−0.021=0.979. The chance of a good item from line A is 0.5×0.99=0.495.
Therefore P(A|good)=0.495/0.979=495/979, approximately 50.56%. The event good changes the denominator and uses good-item likelihoods, not the defect likelihoods from the earlier question.
Advanced worked example 8: The complement of a posterior
If A and Aᶜ form a complete partition and B has positive probability, then P(A|B)+P(Aᶜ|B)=1. This follows by partitioning B into the disjoint events A∩B and Aᶜ∩B.
In the 10%-defective quality example, P(defective|flag)=1/3, so P(good|flag)=2/3. This complement check is often quicker than recomputing the second ratio and can expose an inconsistent answer.
Advanced worked example 9: Two independent alerts conditional on item quality
Consider again 10% defective, 90% flagging of defects and 20% false positives. Suppose two inspectors act independently conditional on whether an item is defective. The chance of two flags from a defective item is 0.9²=0.81.
The defective-and-two-flags probability is 0.1×0.81=0.081; good-and-two-flags is 0.9×0.2²=0.036. Thus P(defective|two flags)=0.081/0.117=9/13. The conditional-independence assumption is essential.
Advanced worked example 10: Two clean observations
Under the same hypothetical conditional-independence assumption, a defective item avoids each alert with probability 0.1, while a good one avoids each with probability 0.8.
The chance of two clean results from a defective item is 0.1×0.1²=0.001, and from a good item it is 0.9×0.8²=0.576. Thus P(defective|two clean)=0.001/0.577=1/577.
Advanced worked example 11: Why two alerts are not generally independent
The two inspection results in the previous model share an unobserved cause: whether the item is truly defective. Even if they are independent conditional on that cause, they need not be independent when the cause is unknown.
This is an important distinction. Multiplying the unconditional flag rate by itself without verifying independence can give a wrong total probability, even when each inspector’s individual accuracy is specified.
Advanced worked example 12: An event that is given, not generated
If a question says “given the first draw is red,” it is not asking you to multiply by P(first red) again. That probability has already been accounted for by restricting the sample space.
For a bag with three red and two blue counters, the second-red conditional probability without replacement is 2/4=1/2, while the joint probability of both red is (3/5)(2/4)=3/10. They answer different questions.
Advanced worked example 13: Reverse the coloured-draw condition
With three red and two blue counters drawn without replacement, P(first red and second red)=3/10. By symmetry the marginal probability that the second is red is 3/5.
Therefore P(first red|second red)=(3/10)/(3/5)=1/2. Here both directions of the red–red condition happen to give 1/2, but that is due to exchangeability in this specific experiment, not a universal identity for conditional probabilities.
Advanced worked example 14: An exclusive event cannot be independent when both are possible
If A and B are disjoint events with P(A)>0 and P(B)>0, then P(A∩B)=0. Independence would require P(A∩B)=P(A)P(B)>0.
This contradiction shows disjoint nonzero-probability events are not independent. Two mathematical words that both suggest separation in ordinary English describe different relationships in probability.
Advanced worked example 15: The difference between independence and conditional independence
Events A and B are independent when P(A∩B)=P(A)P(B). They are conditionally independent given C when P(A∩B|C)=P(A|C)P(B|C), provided P(C)>0.
Neither condition automatically implies the other. When a word problem says observations are independent only given a hidden category, its tree calculation must reflect that exact assumption.
Advanced worked example 16: An observed event with probability zero
The elementary conditional formula is undefined if the conditioning event has probability zero. For a fair die, conditioning on a roll of seven is not an event with a valid positive denominator.
A correct solution states that the requested elementary ratio is undefined under this sample space. Assigning zero or one arbitrarily would not follow from the standard probability definition.
Advanced worked example 17: Posterior information does not establish causation
Bayes’ theorem updates probability about a category after an observation. It does not by itself prove the category causes the observation or that taking an action will change the observed outcome.
For an invented quality-control model, a higher posterior defect rate among flagged items does not identify the manufacturing mechanism. The model only describes how prior and likelihood information combine.
Advanced worked example 18: A sensitivity check on the prior
If a flag detects 90% of faulty items and falsely flags 20% of good items, the posterior defect rate is p×0.9/[p×0.9+(1−p)×0.2] when the prior defect rate is p.
For p=0.10 the result is 1/3. For p=0.50 it is 0.9/(0.9+0.2)=9/11, about 81.8%. The same flag rates support different posteriors across different populations.
Advanced worked example 19: A sensitivity check on false positives
Hold the hypothetical prior defect rate at 10% and detection at 90%. If the false-positive rate drops from 20% to 5%, the defective-and-flagged contribution remains 0.09 while good-and-flagged falls to 0.9×0.05=0.045.
The posterior defect rate becomes 0.09/(0.09+0.045)=2/3. This isolates how one assumption changes the answer, rather than treating a single computed probability as universal.
Advanced worked example 20: A frequency table verifies the algebra
Suppose a survey has 200 items from category A and 300 from B. Among those, 80 A-items and 60 B-items carry a certain label. The label appears on 140 items total.
Given the label, the probability the item came from A in a uniformly selected labelled item is 80/140=4/7. The prior A fraction among all 500 items is 200/500=2/5. This example makes the denominator shift visible without decimal probabilities.
Advanced worked example 21: Conditioning changes the proportions
In the same survey, P(label|A)=80/200=2/5, while P(A|label)=80/140=4/7. The numerator counts the same 80 overlapping items, but the denominator changes according to which population is known.
Swapping the condition words is an easy mistake in a word problem. Mark the event after the vertical bar before doing arithmetic, then check which group determines the denominator.
Advanced worked example 22: A tree’s branches must total one
At the first stage of a probability tree, category probabilities must add to one. At each later node, conditional branches covering all possible observations must also sum to one.
If the tree accidentally assigns 0.7 and 0.4 to two exhaustive outcomes, it is not a valid probability model. Finding an impossible branch total is a useful structural audit before multiplying path probabilities.
Advanced worked example 23: Sequential observations and updating
Bayes’ theorem may be applied after a first observation to produce a posterior, then that posterior may serve as the prior for another observation. The second update uses the correct conditional likelihood for the new evidence.
This procedure is sound only if the statistical model explains the relationship between observations. Assuming independent evidence merely because the observations were recorded at different times can invalidate the calculation.
Advanced worked example 24: A full path to a conditional answer
A reliable solution labels categories, multiplies prior and likelihood along each path to obtain joint probabilities, adds paths that produce the observed event, and divides the desired path by that total.
For the supplier example, this gives P(B and defective)=0.020, P(defective)=0.032, hence P(B|defective)=0.625. Writing the path labels next to the arithmetic makes the answer easier to verify and harder to reverse accidentally.
A six-step conditional probability checklist
- Define the hidden or prior category and the observed event in words and symbols.
- Check the prior categories are mutually exclusive and exhaustive, with probabilities adding to one.
- Multiply the prior probability by each conditional likelihood to produce joint path probabilities.
- Add all paths that yield the observation to obtain the correct denominator.
- Divide the relevant path probability by that denominator; check the result lies between zero and one.
- Interpret the answer in the correct direction, and name any independence or sampling assumptions.
Independent practice and worked answers
- A: Two boxes are equally likely; Box A is 2/3 red and Box B is 1/3 red. Given a red item, find P(A|red).
- B: A supplier sends 60% of goods with 2% faults; another 40% with 5% faults. Given a fault, find P(second supplier).
- C: In a bag of three red and two blue objects, draw without replacement. Given first red, find P(second red).
- D: For two fair coin tosses, given at least one head, find the probability the first is heads.
- E: Explain why P(A|B) and P(B|A) are not generally equal.
A: (1/2×2/3)/(1/2×2/3+1/2×1/3)=2/3. B: 0.020/(0.012+0.020)=5/8. C: 2/4=1/2. D: 2/3. E: the conditions produce different denominators—B versus A—and Bayes’ theorem relates them using priors.
Frequently asked questions
Is Bayes’ theorem a separately named new 2027 H3 Mathematics topic?
The 2027 H3 Mathematics syllabus 9820 assumes H2 probability and counting and assesses problem formulation and reasoning. This is H2-based enrichment rather than a separately claimed additional H3 subtopic.
What is the most common Bayes error?
Confusing P(observation|category) with P(category|observation). The latter requires weighting by prior frequencies and dividing by the total frequency of the observation.
Does an accurate inspection result guarantee the hidden state?
No. A posterior remains a probability under the specified model. The prior prevalence and the chance of the observation under alternative states both influence it.
Can I multiply probabilities along a tree?
Yes, when each branch represents the correct conditional probability given the earlier path. Do not assume unconditional independence if the problem has not supplied or justified it.
Official references and Bukit Timah Mathematics teaching
Read the SEAB 2027 A-Level syllabus directory, the combinatorial proofs guide and the inclusion–exclusion guide for related H2 and H3 reasoning.
The unchanged eduKateSG Mathematics reference describes its three-student approach near Sixth Avenue MRT, not an assured specialist JC1 H3 class. Enquire directly about suitable JC Mathematics tutors, current expertise, group times and fees.
Did you know? Conditional probability becomes much clearer when the question is translated into a table of counts or a tree of paths. The formula is then a precise way of dividing one relevant path by the total evidence, not a mysterious reversal trick.
