Quiz 2

Statistics I · Week 8 — Conditional probability & Bayes

963 words
5 min read
2026-08-16T00:00:00.000Z
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

P(A|B), independence, total probability, Bayes — concepts, pattern families, and traps for Quiz 2 week 8. # Week 8 — conditional probability & bayes > **Quiz 2 scope:** Weeks 1–8 per IITM May 2026 foundation courses.

Week 8 — conditional probability & bayes

Quiz 2 scope: Weeks 1–8 per IITM May 2026 foundation courses. Source baseline: IITM BS admissions important-dates calendar · May 2026 cycle. Times on assessments are operational conventions — verify hall ticket.
Part of the Quiz 2 prep system%20%C2%B7%20%5BWeeks%201%E2%80%938%20index%5D(.%2Fmay-2026-stats-quiz-2-weeks-1-8-prep) · Pattern atlas · Formula chains.

Week map

Condition given → P(A|B) → independence check → Bayes flip

Classify → Represent → Execute → Trap-check

  • Recognize: Ask: Formula for P(A|B)?
  • Procedure: Restrict sample space to B; what fraction of B is also A? Tree diagram: multiply along path, restrict denominator.
  • Variations / traps: Watch for: P(A|B) vs P(B|A) swapped.

Formula chain (compressed)

P(A|B)=P(A∩B)/P(B) → multiply → Bayes invert cause from evidence.
  1. ConditionalP(A|B) = P(A∩B)/P(B) — given B happened
  2. MultiplicationP(A∩B) = P(A|B)P(B) — sequential events
  3. IndependenceP(A∩B)=P(A)P(B) — no information flow
  4. BayesP(A|B)=P(B|A)P(A)/P(B) — invert direction
  5. Total prob.P(B)=Σ P(B|Aᵢ)P(Aᵢ) — expand denominator

Deep study

Statistics I · Week 8 — Conditional probability and Bayes

Deep study for Quiz 2 week 8. Conditioning narrows the sample space; Bayes flips the direction of a conditional statement.

Week map

Given information → P(AB)P(A|B) → multiplication rule → independence → law of total probability → Bayes theorem.

Conditional notation

  • P(AB)P(A|B) → “probability of AA given BB” → probability AA occurs knowing BB occurred.
  • Formula: P(AB)=P(AB)P(B)P(A|B) = \dfrac{P(A \cap B)}{P(B)} — requires P(B)>0P(B) > 0.
  • Narrow sample space: restrict to outcomes where BB is true, renormalize.
Mini-example: die roll, BB = “even,” AA = “greater than 3.” Given even {2,4,6}\{2,4,6\}, favorable {4,6}\{4,6\}P(AB)=2/3P(A|B) = 2/3.

Multiplication rule

P(AB)=P(AB)P(B)=P(BA)P(A)P(A \cap B) = P(A|B) \cdot P(B) = P(B|A) \cdot P(A)
Chain events sequentially: multiply conditionals.

Independence

  • AA and BB independent if P(AB)=P(A)P(A|B) = P(A) — knowing BB does not change AA.
  • Equivalent: P(AB)=P(A)P(B)P(A \cap B) = P(A) \cdot P(B).
  • Independent ≠ mutually exclusive (disjoint events with positive probability are dependent).
Mini-example: fair coin tosses. AA = first head, BB = second head. P(AB)=1/4=P(A)P(B)P(A \cap B) = 1/4 = P(A)P(B).

Bayes and total probability

Law of total probability (partition B1,,BkB_1, \ldots, B_k):
P(A)=i=1kP(ABi)P(Bi)P(A) = \sum_{i=1}^{k} P(A|B_i) P(B_i)
Bayes theorem:
P(BA)=P(AB)P(B)P(A)P(B|A) = \frac{P(A|B) \cdot P(B)}{P(A)}
Flip from P(AB)P(A|B) to P(BA)P(B|A) using prior P(B)P(B) and evidence P(A)P(A).
Mini-example (screening): disease rate 1%, test sensitivity P(+D)=0.99P(+|D)=0.99, specificity P(no D)=0.95P(-|\text{no }D)=0.95. Positive test does not imply 99% sick — denominator P(+)P(+) mixes true and false positives via total probability.

Pattern families

Easy — Read conditional from table or story

Identify P(AB)P(A|B) numerator and denominator. Compute from counts in restricted row.

Medium — Multiply chain

P(AB)P(A \cap B) from P(AB)P(B)P(A|B)P(B). Two-step tree: multiply along branch.

Hard — Bayes setup

Identify hypothesis HH and evidence EE. Plug P(EH)P(E|H), P(H)P(H), compute P(E)P(E) via total probability, then P(HE)P(H|E).

Worked mini-examples

Example 1 — Conditional from counts.
100 students: 40 take stats, 25 take both CS and stats. P(CSstats)=25/40P(\text{CS}|\text{stats}) = 25/40.
Example 2 — Multiplication.
P(rain)=0.2P(\text{rain})=0.2, P(laterain)=0.5P(\text{late}|\text{rain})=0.5P(rain and late)=0.1P(\text{rain and late})=0.1.
Example 3 — Independence check.
Roll die: AA odd, BB greater than 4. P(A)=3/6P(A)=3/6, P(AB)P(A|B) on {5,6}\{5,6\} is 1/2 — not equal → dependent.
Example 4 — Complement conditional.
P(AcB)=1P(AB)P(A^c|B) = 1 - P(A|B).
Example 5 — Bayes skeleton.
Prior P(H)=0.01P(H)=0.01, likelihood P(EH)=0.9P(E|H)=0.9, P(EHc)=0.1P(E|H^c)=0.1. Compute P(HE)P(H|E) using P(E)=0.9(0.01)+0.1(0.99)P(E)=0.9(0.01)+0.1(0.99).

Traps

  • Swapping P(AB)P(A|B) and P(BA)P(B|A) without Bayes.
  • Using P(A)+P(B)P(A)+P(B) instead of conditional formula.
  • Treating independent as disjoint.
  • Forgetting to renormalize when conditioning.
  • Base rate neglect: ignoring small P(H)P(H) in medical/test stories.

Diagnostic (try yourself)

  1. P(AB)=0.12P(A \cap B)=0.12, P(B)=0.4P(B)=0.4. Find P(AB)P(A|B).
  2. Events independent with P(A)=0.3P(A)=0.3, P(B)=0.5P(B)=0.5. Find P(AB)P(A \cap B).
  3. Two cards without replacement: P(second acefirst ace)P(\text{second ace}|\text{first ace}) on standard deck — qualitative: larger or smaller than P(second ace)P(\text{second ace}) unconditional?
  4. Write Bayes formula for P(HE)P(H|E) in terms of P(EH)P(E|H), P(H)P(H), P(E)P(E).
  5. Table row “Test +” split into disease / no disease counts. What probability does P(diseasetest+)P(\text{disease}|\text{test}+) use as denominator?

ChatGPT prep archive

Archived import for extra depth — complements the notes above, not official IITM material.

Core concepts

  • Conditional: P(A|B) = P(A∩B)/P(B); B must have positive probability.
  • Independent: P(A|B)=P(A); knowing B does not change A.
  • Total probability: partition B1..Bk: P(A)=Σ P(A|Bi)P(Bi).
  • Bayes: P(B|A) = P(A|B)P(B)/P(A).

Notation & vocabulary

IdeaFormula
conditionalP(A
independenceP(A∩B)=P(A)P(B)
Bayesflip condition with prior

Pattern families

Easy — Read P(A|B)

Restrict sample space to B; what fraction of B is also A? Tree diagram: multiply along path, restrict denominator.

Medium — Independence test

Compare P(A∩B) with P(A)P(B) or check P(A|B)=P(A). Do not assume independence from wording.

Hard — Bayes update

Identify prior P(B), likelihood P(A|B), compute P(A) via total prob if needed, then Bayes for posterior P(B|A).
Drill these on the pattern atlas — filter to week 8.

Traps

  • P(A|B) vs P(B|A) swapped.
  • Using P(A)+P(B) for AND.
  • Independence assumed without check.
  • Denominator P(B) zero in conditional.

Retrieval prompts

  1. Formula for P(A|B)?
  2. What does independence mean?
  3. When use Bayes rule?

Practice loop

  1. Read Deep study (if present) or core concepts once.
  2. Recite the formula chain without looking.
  3. Open one easy pattern on the interactive atlas for week 8.
  4. Attempt without solutions; mark studied after an honest try.
  5. Say one trap aloud before closing the tab.
Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.