Advanced Mathematics

Conditional Probability

The probability of one event once you know another has happened, and what it means for two events to be independent.

Needs a step first: 3

Knowing that BB happened shrinks the world to BB, so P(A∣B)=P(A∩B)P(B)P(A\mid B)=\frac{P(A\cap B)}{P(B)}. Turned around, P(A∩B)=P(B) P(A∣B)P(A\cap B)=P(B)\,P(A\mid B), which is what multiplying along the branches of a probability tree does. AA and BB are independent when knowing one tells you nothing about the other: P(A∣B)=P(A)P(A\mid B)=P(A). Confusing P(A∣B)P(A\mid B) with P(B∣A)P(B\mid A) is the commonest error in reasoning about evidence, and Bayes' theorem is the cure.

Where it shows up: A language model is a machine for conditional probabilities: the chance of each possible next word, given the words so far.

How to hold it: In your head

See conditioning as shrinking the world to what you know happened, and never mix up P(A∣B)P(A\mid B) with P(B∣A)P(B\mid A).

What knowing it looks like

  • Compute a conditional probability from a two-way table or a tree.
  • Test two events for independence by checking whether P(A∩B)=P(A)P(B)P(A\cap B)=P(A)P(B).
  • Show with an example that P(A∣B)P(A\mid B) and P(B∣A)P(B\mid A) can be very different.

Test yourself

In a school, 60%60\% of students study French, 30%30\% study Spanish and 20%20\% study both. A student who studies Spanish is chosen. What is the probability they also study French? Are studying French and studying Spanish independent?
Show the worked answer
P(F∣S)=P(F∩S)P(S)=0.20.3=23P(F\mid S)=\frac{P(F\cap S)}{P(S)}=\frac{0.2}{0.3}=\frac23. Independence would need P(F∩S)=P(F)P(S)=0.6×0.3=0.18P(F\cap S)=P(F)P(S)=0.6\times0.3=0.18, but it is 0.20.2, so they are not independent: Spanish students are more likely than average to take French. Note that P(S∣F)=0.20.6=13P(S\mid F)=\frac{0.2}{0.6}=\frac13, a different number.

Needs a step first: 3

Learn it with an AI

Copy this prompt into any AI assistant. It will take you through step by step at your level and finish with the test above.

Be my maths tutor. I'm learning "Conditional Probability" (Bridge tier): The probability of one event once you know another has happened, and what it means for two events to be independent.
I already know: Permutations and Combinations.
Teach it Socratically: first ask what I already know; then explain the core idea with one concrete example and why it's true; then give me three problems, one at a time, easy to hard. Wait for my answer, check every step, and point out mistakes without giving the answer away.
Finish by testing me with this: In a school, $60\%$ of students study French, $30\%$ study Spanish and $20\%$ study both. A student who studies Spanish is chosen. What is the probability they also study French? Are studying French and studying Spanish independent?
Use LaTeX for formulas. When you say where it's used later (machine learning, quantum mechanics), be specific.

On the way to

Recommended