AP · Statistics · Probability

Conditional Probability and Independence

13 min readUpdated November 30, 2026FreeAP Statistics, Probability, Random Variables and Probability Distributions

A conditional probability P(A∣B)P(A \mid B) is the probability of AA once you know BB has happened, so you restrict attention to BB: P(A∣B)=P(A and B)P(B)P(A \mid B) = \dfrac{P(A \text{ and } B)}{P(B)}. Multiplying along the branches of a tree handles chance in stages, and two events are independent when knowing one does not change the probability of the other.

Quick check

  1. For two events, P(A)=0.4P(A) = 0.4, P(B)=0.5P(B) = 0.5 and P(A and B)=0.1P(A \text{ and } B) = 0.1. What is P(A or B)P(A \text{ or } B)?Show answerHide answer

    0.4+0.5−0.1=0.80.4 + 0.5 - 0.1 = 0.8, by the general addition rule from the note on Probability Rules.

  2. In a hypothetical class, 12 of the 30 students are seniors, and 3 of those seniors walk to school. What proportion of the seniors walk?Show answerHide answer

    312=0.25\dfrac{3}{12} = 0.25. Looking only at the seniors is exactly what a conditional probability does.

Know these already? Jump to the practice questions

What you'll be able to do

  • Calculate a conditional probability from a two-way table or with the formula.
  • Calculate probabilities for multi-stage processes with the multiplication rule and a tree diagram.
  • Determine whether two events are independent, and justify it with probabilities.
  • Calculate the probability of at least one success by using the complement.

Key terms

Conditional probability

P(A∣B)P(A \mid B) is the probability that AA happens given that BB has happened.

In plain English
Only look at the cases where BB is true.
Don't write
"P(A∣B)P(A \mid B) is the same as P(B∣A)P(B \mid A)"; they usually differ.

Independent events

AA and BB are independent if knowing whether one happens does not change the probability of the other: P(A∣B)=P(A)P(A \mid B) = P(A).

In plain English
One tells you nothing about the other.
Don't write
"independent means mutually exclusive"; mutually exclusive events with nonzero probabilities are always dependent.

Tree diagram

A diagram that shows each stage of a chance process as branches labeled with probabilities, where later branches are conditional on earlier ones.

In plain English
A map of every path the process can take.
Don't write
"the second-stage branches are always the same"; they change when stages depend on each other.

What does "given" do to a probability?

On the formula sheet:

P(A∣B)=P(A∩B)P(B)P(A \mid B) = \frac{P(A \cap B)}{P(B)}

"Given BB" shrinks the sample space to BB. In a two-way table, use only the row or column for BB.

In a hypothetical group of 300 adults, 120 exercise regularly, and 84 of those sleep at least 7 hours. So

P(7+ hours∣exercises)=84120=0.7P(\text{7+ hours} \mid \text{exercises}) = \frac{84}{120} = 0.7

The formula gives the same result: 84/300120/300=0.280.4=0.7\dfrac{84/300}{120/300} = \dfrac{0.28}{0.4} = 0.7.

Key idea

The event after the bar is the condition: its total goes in the denominator.

Check yourself

P(A and B)=0.12P(A \text{ and } B) = 0.12 and P(B)=0.3P(B) = 0.3. Find P(A∣B)P(A \mid B).
Show answerHide answer

0.120.3=0.4\dfrac{0.12}{0.3} = 0.4.

How do you multiply along a tree?

Learn this (the formula sheet's conditional formula, rearranged): the general multiplication rule

P(A and B)=P(A)×P(B∣A)P(A \text{ and } B) = P(A) \times P(B \mid A)

A tree diagram applies it stage by stage:

  1. Draw the first-stage branches with their probabilities.
  2. From each, draw the second-stage branches with probabilities conditional on that first branch.
  3. Multiply along a path to get the probability of that whole path.
  4. Add the paths that make up the event you want.

To reverse a condition, such as finding the probability of a first-stage outcome given what happened second, divide that path's probability by the total probability of the second-stage outcome. Worked example 2 does this.

Check yourself

P(A)=0.6P(A) = 0.6 and P(B∣A)=0.25P(B \mid A) = 0.25. Find P(A and B)P(A \text{ and } B).
Show answerHide answer

0.6×0.25=0.150.6 \times 0.25 = 0.15.

How do you check independence?

Compare P(A∣B)P(A \mid B) with P(A)P(A). If they are equal, knowing BB changes nothing and the events are independent. If they differ, the events are dependent.

In the exercise example, 180 of the 300 adults sleep at least 7 hours, so P(7+ hours)=0.6P(\text{7+ hours}) = 0.6. But P(7+ hours∣exercises)=0.7P(\text{7+ hours} \mid \text{exercises}) = 0.7. Since 0.7≠0.60.7 \neq 0.6, sleep and exercise are not independent in this group.

For independent events the multiplication rule simplifies to P(A and B)=P(A)×P(B)P(A \text{ and } B) = P(A) \times P(B) (Learn this), and that equation is an equivalent test.

Examiner's eye

Marks go to independence answers that quote two probabilities, such as P(A∣B)P(A \mid B) and P(A)P(A), and compare them. "They don't affect each other" earns nothing.

Check yourself

P(A)=0.5P(A) = 0.5, P(B)=0.4P(B) = 0.4 and P(A and B)=0.2P(A \text{ and } B) = 0.2. Are AA and BB independent?
Show answerHide answer

Yes. P(A∣B)=0.20.4=0.5=P(A)P(A \mid B) = \dfrac{0.2}{0.4} = 0.5 = P(A).

How do you find the probability of at least one?

"At least one" covers many cases, but its complement is a single case: none.

P(at least one)=1−P(none)P(\text{at least one}) = 1 - P(\text{none})

For nn independent trials that each succeed with probability pp, P(none)=(1−p)nP(\text{none}) = (1 - p)^n. Three hypothetical smoke alarms each work with probability 0.9, independently, so P(at least one works)=1−0.13=0.999P(\text{at least one works}) = 1 - 0.1^3 = 0.999.

Check yourself

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

1−(56)4=0.51771 - \left(\dfrac{5}{6}\right)^4 = 0.5177.

Worked example 1: Conditional probability from a table

Question: A hypothetical school surveys 400 students.

Plays an instrumentDoes notTotal
Grade 945105150
Grade 1255195250
Total100300400

Find (a) P(instrument∣grade 9)P(\text{instrument} \mid \text{grade 9}) and (b) P(grade 9∣instrument)P(\text{grade 9} \mid \text{instrument}). (c) Are "plays an instrument" and "grade 9" independent?

What tells you the method

"given" (the bar), and a table of counts.

  1. Step 1: Restrict to grade 9.

    P(instrument∣grade 9)=45150=0.3P(\text{instrument} \mid \text{grade 9}) = \dfrac{45}{150} = 0.3.

    Why

    The condition is grade 9, so its row total is the denominator.

  2. Step 2: Restrict to instrument players.

    P(grade 9∣instrument)=45100=0.45P(\text{grade 9} \mid \text{instrument}) = \dfrac{45}{100} = 0.45.

    Why

    Now the condition is playing an instrument, so its column total is the denominator.

  3. Step 3: Compare with the overall probability.

    P(instrument)=100400=0.25P(\text{instrument}) = \dfrac{100}{400} = 0.25, but P(instrument∣grade 9)=0.3P(\text{instrument} \mid \text{grade 9}) = 0.3.

    Why

    Independence needs these to be equal.

Check it

(a) and (b) share the numerator 45 but have different denominators, which is why they differ.

Answer

(a) 0.30.3 (b) 0.450.45 (c) Not independent, because P(instrument∣grade 9)=0.3≠0.25=P(instrument)P(\text{instrument} \mid \text{grade 9}) = 0.3 \neq 0.25 = P(\text{instrument}).

Worked example 2: A tree, then a reversed condition

Question: In a hypothetical factory, machine A makes 60 percent of the parts and machine B the rest. Of machine A's parts, 3 percent are defective; of machine B's, 5 percent. A part is chosen at random. (a) Find the probability that it is defective. (b) Given that it is defective, find the probability that machine A made it.

What tells you the method

Two stages (machine, then defective or not) with conditional percentages, and a "given" that reverses the order.

  1. Step 1: Draw the tree.

    First stage: A 0.6, B 0.4. Second stage: defective 0.03 after A and 0.05 after B, as in the tree diagram for parts from machines A and B.

    Why

    The defect rates are conditional on the machine.

  2. Step 2: Multiply along the defective paths and add.

    P(A and defective)=0.6×0.03=0.018P(\text{A and defective}) = 0.6 \times 0.03 = 0.018 and P(B and defective)=0.4×0.05=0.02P(\text{B and defective}) = 0.4 \times 0.05 = 0.02, so P(defective)=0.038P(\text{defective}) = 0.038.

    Why

    A defective part comes from one of two paths.

  3. Step 3: Reverse the condition.

    P(A∣defective)=0.0180.038=0.4737P(\text{A} \mid \text{defective}) = \dfrac{0.018}{0.038} = 0.4737.

    Why

    Restrict to the defective parts, then ask what share came through machine A.

Check it

P(B∣defective)=0.020.038=0.5263P(\text{B} \mid \text{defective}) = \dfrac{0.02}{0.038} = 0.5263, and 0.4737+0.5263=10.4737 + 0.5263 = 1.

Answer

(a) 0.0380.038 (b) 0.47370.4737

Your turn

Question: A hypothetical bag holds 5 red and 3 blue counters. Two are drawn at random without replacement. Find the probability that both are the same color.

  1. Step 1:

    First draw: P(red)=58P(\text{red}) = \dfrac{5}{8} and P(blue)=38P(\text{blue}) = \dfrac{3}{8}.

  2. Step 2:

    Red then red: 58×47=2056\dfrac{5}{8} \times \dfrac{4}{7} = \dfrac{20}{56}, because one red counter is gone for the second draw.

  3. Step 3: Your go: find blue then blue, and add the two paths.

Show the full solutionHide the solution

Blue then blue: 38×27=656\dfrac{3}{8} \times \dfrac{2}{7} = \dfrac{6}{56}.

Same color: 2056+656=2656=1328≈0.4643\dfrac{20}{56} + \dfrac{6}{56} = \dfrac{26}{56} = \dfrac{13}{28} \approx 0.4643.

Answer: The probability is 1328≈0.4643\dfrac{13}{28} \approx 0.4643.

Traps

Trap

Treating P(A∣B)P(A \mid B) and P(B∣A)P(B \mid A) as the same probability.

It seems right because both involve the same two events. But the condition sets the denominator, so the two use different totals: in Worked example 1, P(instrument∣grade 9)=0.3P(\text{instrument} \mid \text{grade 9}) = 0.3 while P(grade 9∣instrument)=0.45P(\text{grade 9} \mid \text{instrument}) = 0.45.

Check yourself

In Worked example 2, P(defective∣A)=0.03P(\text{defective} \mid \text{A}) = 0.03. Is P(A∣defective)P(\text{A} \mid \text{defective}) also 0.03?
Show answerHide answer

No. It is 0.47370.4737: about 47 percent of defective parts come from machine A, even though only 3 percent of machine A's parts are defective.

Trap

Thinking that mutually exclusive events are independent.

It seems right because "separate" events sound unconnected. But if AA and BB cannot happen together, learning that BB happened makes P(A∣B)=0P(A \mid B) = 0, which differs from P(A)P(A) whenever P(A)>0P(A) > 0. So they are dependent.

Check yourself

P(A)=0.3P(A) = 0.3, P(B)=0.2P(B) = 0.2, and AA and BB are mutually exclusive. Are they independent?
Show answerHide answer

No. P(A∣B)=00.2=0P(A \mid B) = \dfrac{0}{0.2} = 0, but P(A)=0.3P(A) = 0.3.

What's examined

Conditional probability and independence are tested on the AP® Statistics exam (Probability), in multiple-choice and free-response questions, often from a two-way table or a tree. The conditional probability formula is on the formula sheet; the multiplication rules and the "at least one" method are yours to learn. Independence must be justified with probabilities, not intuition.

Practice questions

  1. Recall P(A and B)=0.18P(A \text{ and } B) = 0.18 and P(B)=0.45P(B) = 0.45. What is P(A∣B)P(A \mid B)?
    • A) 0.081
    • B) 0.27
    • C) 0.4
    • D) 0.63
Show answer

Answer: C) 0.4

Marking points:

  • P(A∣B)=0.180.45=0.4P(A \mid B) = \dfrac{0.18}{0.45} = 0.4.
  • A multiplies, B subtracts, and D adds the two probabilities.
  1. Exam-style On a hypothetical commute, the probability of rain is 0.3. When it rains, a student is late with probability 0.4; when it does not, with probability 0.1. (a) Find the probability that the student is late. (b) Given that the student is late, find the probability that it rained.
Show answer

Answer: (a) 0.190.19 (b) 0.63160.6316

Marking points:

  • Tree: rain 0.3 then late 0.4; no rain 0.7 then late 0.1.
  • (a) 0.3×0.4+0.7×0.1=0.12+0.07=0.190.3 \times 0.4 + 0.7 \times 0.1 = 0.12 + 0.07 = 0.19.
  • (b) 0.120.19=0.6316\dfrac{0.12}{0.19} = 0.6316.
  1. Apply P(A)=0.4P(A) = 0.4 and P(B)=0.5P(B) = 0.5. Which value of P(A and B)P(A \text{ and } B) makes AA and BB independent?
    • A) 0.9
    • B) 0.1
    • C) 0
    • D) 0.2
Show answer

Answer: D) 0.2

Marking points:

  • Independent events have P(A and B)=P(A)×P(B)=0.4×0.5=0.2P(A \text{ and } B) = P(A) \times P(B) = 0.4 \times 0.5 = 0.2.
  • A adds the probabilities. B subtracts them. C would make the events mutually exclusive, which makes them dependent.
  1. Exam-style Each hypothetical sales call succeeds with probability 0.2, independently. (a) Find the probability of at least one success in 5 calls. (b) What is the smallest number of calls that gives at least a 0.95 probability of at least one success?
Show answer

Answer: (a) 0.67230.6723 (b) 1414 calls

Marking points:

  • (a) 1−0.85=1−0.32768=0.67231 - 0.8^5 = 1 - 0.32768 = 0.6723.
  • (b) Need 1−0.8n≥0.951 - 0.8^n \geq 0.95. With 13 calls the probability is 0.9450; with 14 it is 0.9560, so 14 calls.
  1. Recall Events AA and BB have P(A)=0.3P(A) = 0.3 and P(B)=0.5P(B) = 0.5 and are mutually exclusive. Which statement is true?
    • A) AA and BB are dependent.
    • B) AA and BB are independent.
    • C) P(A and B)=0.15P(A \text{ and } B) = 0.15
    • D) P(A or B)=0.65P(A \text{ or } B) = 0.65
Show answer

Answer: A) AA and BB are dependent.

Marking points:

  • P(A∣B)=0≠0.3=P(A)P(A \mid B) = 0 \neq 0.3 = P(A), so the events are dependent.
  • B confuses mutually exclusive with independent. C multiplies as if independent. D subtracts 0.15 instead of 0; in fact P(A or B)=0.8P(A \text{ or } B) = 0.8.
  1. Apply A hypothetical box has 10 tickets, 4 of them winners. Two tickets are drawn at random without replacement. What is the probability that both are winners?
    • A) 425\dfrac{4}{25}
    • B) 215\dfrac{2}{15}
    • C) 13\dfrac{1}{3}
    • D) 45\dfrac{4}{5}
Show answer

Answer: B) 215\dfrac{2}{15}

Marking points:

  • 410×39=1290=215\dfrac{4}{10} \times \dfrac{3}{9} = \dfrac{12}{90} = \dfrac{2}{15}, because one winner is gone after the first draw.
  • A uses 410×410\dfrac{4}{10} \times \dfrac{4}{10}, as if drawn with replacement. C is only the second-draw probability, 39\dfrac{3}{9}. D adds 410+410\dfrac{4}{10} + \dfrac{4}{10}.

Key points

Recall, then reveal

Say the main points from memory first, then check them.

Show key pointsHide key points
  • "Given BB" shrinks the sample space to BB: P(A∣B)=P(A and B)P(B)P(A \mid B) = \dfrac{P(A \text{ and } B)}{P(B)}.
  • On a tree, multiply along a path and add the paths that make up the event.
  • To reverse a condition, divide the path probability by the total probability of the known outcome.
  • Independent means P(A∣B)=P(A)P(A \mid B) = P(A); mutually exclusive events with nonzero probabilities are dependent.
  • P(at least one)=1−P(none)P(\text{at least one}) = 1 - P(\text{none}), and for independent trials P(none)=(1−p)nP(\text{none}) = (1 - p)^n.

Figures

A two-stage tree. The first branches are Machine A with probability 0.6 and Machine B with probability 0.4. After Machine A, Defective has probability 0.03 and Not defective 0.97. After Machine B, Defective has probability 0.05 and Not defective 0.95. (open full size in a new tab)
Tree diagram for parts from machines A and B

Keep learning

Prerequisites: Probability Rules

Explore AP Statistics tutoring →

View the full Statistics syllabus →

More in this unit

Probability, Random Variables and Probability Distributions

All Probability notes

Part of Novark's AP Statistics notes