{
  "deckName": "Exam P — Conditional Probability & Bayes",
  "examCode": "Exam P",
  "cards": [
    {
      "front": "What is the definition of the conditional probability $\\Pr(A\\mid B)$, and what condition must hold?",
      "back": "$\\Pr(A\\mid B)=\\frac{\\Pr(A\\cap B)}{\\Pr(B)}$, valid only when $\\Pr(B)>0$.\nIt rescales the probability of $A$ to the reduced sample space in which $B$ has occurred.",
      "tag": "Conditional definition"
    },
    {
      "front": "State the general multiplication rule for $\\Pr(A\\cap B)$.",
      "back": "$\\Pr(A\\cap B)=\\Pr(A\\mid B)\\,\\Pr(B)=\\Pr(B\\mid A)\\,\\Pr(A)$.\nIt rearranges the definition of conditional probability and holds for any events (no independence required).",
      "tag": "Multiplication rule"
    },
    {
      "front": "Extend the multiplication rule to three events: write $\\Pr(A\\cap B\\cap C)$ as a chain.",
      "back": "$\\Pr(A\\cap B\\cap C)=\\Pr(A)\\,\\Pr(B\\mid A)\\,\\Pr(C\\mid A\\cap B)$.\nEach factor conditions on everything to its left; the chain rule generalizes to any number of events.",
      "tag": "Multiplication rule"
    },
    {
      "front": "When are two events $A$ and $B$ independent? Give the defining identity and two equivalent forms.",
      "back": "$A$ and $B$ are independent iff $\\Pr(A\\cap B)=\\Pr(A)\\,\\Pr(B)$.\nEquivalently $\\Pr(A\\mid B)=\\Pr(A)$ (when $\\Pr(B)>0$) and $\\Pr(B\\mid A)=\\Pr(B)$ (when $\\Pr(A)>0$): knowing one event tells you nothing about the other.",
      "tag": "Independence"
    },
    {
      "front": "Two events each have positive probability. Can they be both **independent** and **mutually exclusive**? Explain.",
      "back": "No. Mutually exclusive means $\\Pr(A\\cap B)=0$, while independence requires $\\Pr(A\\cap B)=\\Pr(A)\\,\\Pr(B)>0$.\nThe two are contradictory for positive-probability events: if $A$ occurs, a mutually exclusive $B$ cannot, so they are maximally dependent, not independent.",
      "tag": "Independence"
    },
    {
      "front": "If $A$ and $B$ are independent, are $A$ and $B^{c}$ independent? Justify briefly.",
      "back": "Yes. $\\Pr(A\\cap B^{c})=\\Pr(A)-\\Pr(A\\cap B)=\\Pr(A)-\\Pr(A)\\Pr(B)=\\Pr(A)\\left(1-\\Pr(B)\\right)=\\Pr(A)\\Pr(B^{c})$.\nIndependence is preserved under complementation; likewise $A^{c},B$ and $A^{c},B^{c}$ are independent.",
      "tag": "Independence"
    },
    {
      "front": "Distinguish **pairwise independence** from **mutual (joint) independence** for events $A,B,C$.",
      "back": "Pairwise: every pair satisfies $\\Pr(A\\cap B)=\\Pr(A)\\Pr(B)$, etc.\nMutual independence additionally requires $\\Pr(A\\cap B\\cap C)=\\Pr(A)\\Pr(B)\\Pr(C)$ AND all pairwise conditions.\nPairwise independence does **not** imply mutual independence — the triple-product condition can fail even when all pairs are independent.",
      "tag": "Independence"
    },
    {
      "front": "State the **law of total probability** for an event $A$ given a partition $\\{B_1,\\dots,B_n\\}$ of the sample space.",
      "back": "$\\Pr(A)=\\displaystyle\\sum_{i=1}^{n}\\Pr(A\\mid B_i)\\,\\Pr(B_i)$.\nThe $B_i$ must be mutually exclusive and exhaustive (a partition); $A$'s probability is the weighted average of its conditional probabilities, weighted by the $\\Pr(B_i)$.",
      "tag": "Total probability"
    },
    {
      "front": "State **Bayes' theorem** for $\\Pr(B_k\\mid A)$ given a partition $\\{B_1,\\dots,B_n\\}$.",
      "back": "$\\Pr(B_k\\mid A)=\\frac{\\Pr(A\\mid B_k)\\,\\Pr(B_k)}{\\displaystyle\\sum_{i=1}^{n}\\Pr(A\\mid B_i)\\,\\Pr(B_i)}$.\nThe numerator is the joint $\\Pr(A\\cap B_k)$; the denominator is $\\Pr(A)$ by the law of total probability.",
      "tag": "Bayes theorem"
    },
    {
      "front": "In a diagnostic-test problem, define **sensitivity**, **specificity**, and **prevalence** in conditional-probability notation. Let $D$ = disease, $+$ = positive test.",
      "back": "Sensitivity $=\\Pr(+\\mid D)$ (true-positive rate).\nSpecificity $=\\Pr(-\\mid D^{c})$ (true-negative rate); the false-positive rate is $\\Pr(+\\mid D^{c})=1-\\text{specificity}$.\nPrevalence $=\\Pr(D)$, the unconditional disease rate in the population.",
      "tag": "Diagnostic tests"
    },
    {
      "front": "Why is reversing the conditional — using $\\Pr(+\\mid D)$ when $\\Pr(D\\mid +)$ is asked — the classic Bayes pitfall?",
      "back": "In general $\\Pr(D\\mid +)\\neq\\Pr(+\\mid D)$ unless $\\Pr(D)=\\Pr(+)$. A test can have high sensitivity $\\Pr(+\\mid D)$ yet a low posterior $\\Pr(D\\mid +)$ when the disease is rare, because the many healthy people generate a large number of false positives.\nBayes' theorem is precisely the tool that converts $\\Pr(+\\mid D)$ into $\\Pr(D\\mid +)$.",
      "tag": "Diagnostic tests"
    },
    {
      "front": "A disease affects $2\\%$ of a population. A test has sensitivity $\\Pr(+\\mid D)=0.95$ and specificity $\\Pr(-\\mid D^{c})=0.90$. Find $\\Pr(D\\mid +)$.",
      "back": "$\\Pr(D)=0.02,\\ \\Pr(D^{c})=0.98,\\ \\Pr(+\\mid D^{c})=1-0.90=0.10$.\nNumerator: $\\Pr(+\\mid D)\\Pr(D)=0.95\\times0.02=0.019$.\nDenominator: $0.019+0.10\\times0.98=0.019+0.098=0.117$.\n$\\Pr(D\\mid +)=\\frac{0.019}{0.117}\\approx 0.1624$, about $16.2\\%$ — low despite high sensitivity, because the disease is rare.",
      "tag": "Diagnostic tests"
    },
    {
      "front": "Using the same test (sensitivity $0.95$, specificity $0.90$, prevalence $0.02$), find the probability a person actually has the disease given a **negative** test, $\\Pr(D\\mid -)$.",
      "back": "$\\Pr(-\\mid D)=1-0.95=0.05,\\ \\Pr(-\\mid D^{c})=0.90$.\nNumerator: $\\Pr(-\\mid D)\\Pr(D)=0.05\\times0.02=0.001$.\nDenominator: $\\Pr(-)=0.001+0.90\\times0.98=0.001+0.882=0.883$.\n$\\Pr(D\\mid -)=\\frac{0.001}{0.883}\\approx 0.00113$, about $0.11\\%$ — a negative result is very reassuring here.",
      "tag": "Diagnostic tests"
    },
    {
      "front": "An auto insurer's drivers are $60\\%$ standard, $30\\%$ preferred, $10\\%$ high-risk, with annual claim probabilities $0.10$, $0.04$, and $0.30$ respectively. What is the probability a randomly chosen driver files a claim this year?",
      "back": "Law of total probability:\n$\\Pr(\\text{claim})=0.10(0.60)+0.04(0.30)+0.30(0.10)$\n$=0.060+0.012+0.030=0.102$.\nSo about $10.2\\%$ of drivers file a claim.",
      "tag": "Total probability"
    },
    {
      "front": "Continuing the insurer above (standard $0.60$/claim $0.10$, preferred $0.30$/$0.04$, high-risk $0.10$/$0.30$): a driver filed a claim. Find the probability the driver is **high-risk**.",
      "back": "From the previous card $\\Pr(\\text{claim})=0.102$.\nBayes: $\\Pr(\\text{high-risk}\\mid\\text{claim})=\\frac{0.30(0.10)}{0.102}=\\frac{0.030}{0.102}\\approx 0.2941$.\nSo about $29.4\\%$ of claimants are high-risk, far above their $10\\%$ population share.",
      "tag": "Bayes theorem"
    },
    {
      "front": "Two urns: Urn 1 has 3 red, 2 blue; Urn 2 has 1 red, 4 blue. You pick an urn at random (equally likely) and draw one ball, which is red. Find the probability it came from Urn 1.",
      "back": "$\\Pr(R\\mid U_1)=\\frac{3}{5},\\ \\Pr(R\\mid U_2)=\\frac{1}{5},\\ \\Pr(U_1)=\\Pr(U_2)=\\frac12$.\n$\\Pr(R)=\\frac12\\cdot\\frac35+\\frac12\\cdot\\frac15=\\frac{3}{10}+\\frac{1}{10}=\\frac{4}{10}$.\n$\\Pr(U_1\\mid R)=\\frac{\\frac12\\cdot\\frac35}{\\frac{4}{10}}=\\frac{3/10}{4/10}=\\frac{3}{4}=0.75$.",
      "tag": "Bayes theorem"
    },
    {
      "front": "A factory's machines A, B, C produce $50\\%$, $30\\%$, $20\\%$ of output with defect rates $1\\%$, $2\\%$, $3\\%$. An item is defective. What is the probability it came from machine C?",
      "back": "$\\Pr(\\text{def})=0.01(0.50)+0.02(0.30)+0.03(0.20)=0.005+0.006+0.006=0.017$.\n$\\Pr(C\\mid\\text{def})=\\frac{0.03(0.20)}{0.017}=\\frac{0.006}{0.017}\\approx 0.3529$.\nMachine C, despite making only $20\\%$ of output, accounts for about $35.3\\%$ of defects.",
      "tag": "Bayes theorem"
    },
    {
      "front": "Explain the **tabular (joint-probability)** method for a Bayes problem and why it is fast for exam work.",
      "back": "Build a table whose cells are the joint probabilities $\\Pr(A\\cap B_i)=\\Pr(A\\mid B_i)\\Pr(B_i)$ for each partition class. The column sum gives $\\Pr(A)$ (law of total probability), and each posterior is that cell divided by the column total: $\\Pr(B_i\\mid A)=\\Pr(A\\cap B_i)/\\Pr(A)$.\nIt avoids re-deriving the denominator and makes the normalization step a single division.",
      "tag": "Tabular Bayes"
    },
    {
      "front": "A box has 6 fair coins and 4 biased coins with $\\Pr(\\text{heads})=0.8$. You draw a coin, flip it once, and get heads. Find the probability the coin is biased.",
      "back": "$\\Pr(\\text{fair})=0.6,\\ \\Pr(\\text{biased})=0.4$; $\\Pr(H\\mid\\text{fair})=0.5,\\ \\Pr(H\\mid\\text{biased})=0.8$.\nJoint: fair $=0.6(0.5)=0.30$; biased $=0.4(0.8)=0.32$.\n$\\Pr(H)=0.30+0.32=0.62$.\n$\\Pr(\\text{biased}\\mid H)=\\frac{0.32}{0.62}\\approx 0.5161$.",
      "tag": "Tabular Bayes"
    },
    {
      "front": "Using the coin box above (6 fair, 4 biased with $\\Pr(H)=0.8$), suppose you flip the chosen coin and get heads **twice** in a row. Find the probability it is biased.",
      "back": "Conditional on coin type the flips are independent: $\\Pr(HH\\mid\\text{fair})=0.5^2=0.25$, $\\Pr(HH\\mid\\text{biased})=0.8^2=0.64$.\nJoint: fair $=0.6(0.25)=0.15$; biased $=0.4(0.64)=0.256$.\n$\\Pr(HH)=0.15+0.256=0.406$.\n$\\Pr(\\text{biased}\\mid HH)=\\frac{0.256}{0.406}\\approx 0.6305$. The extra head shifts evidence toward the biased coin.",
      "tag": "Conditional independence"
    },
    {
      "front": "What does it mean for events $A$ and $B$ to be **conditionally independent given $C$**, and why is unconditional independence neither implied nor required?",
      "back": "$A,B$ are conditionally independent given $C$ iff $\\Pr(A\\cap B\\mid C)=\\Pr(A\\mid C)\\,\\Pr(B\\mid C)$.\nThis is independence within the sub-population where $C$ holds. It does not imply unconditional independence (and vice versa): the coin flips above are independent given the coin's type but dependent unconditionally, since shared coin identity links them.",
      "tag": "Conditional independence"
    },
    {
      "front": "Given $\\Pr(A)=0.5$, $\\Pr(B)=0.4$, and $\\Pr(A\\cup B)=0.7$, are $A$ and $B$ independent?",
      "back": "$\\Pr(A\\cap B)=\\Pr(A)+\\Pr(B)-\\Pr(A\\cup B)=0.5+0.4-0.7=0.2$.\nFor independence we'd need $\\Pr(A)\\Pr(B)=0.5\\times0.4=0.20$.\nSince $0.2=0.2$, the events **are** independent.",
      "tag": "Independence"
    },
    {
      "front": "Given $\\Pr(A\\mid B)=0.6$, $\\Pr(B)=0.3$, and $\\Pr(A)=0.4$, find $\\Pr(B\\mid A)$.",
      "back": "First $\\Pr(A\\cap B)=\\Pr(A\\mid B)\\Pr(B)=0.6\\times0.3=0.18$.\nThen $\\Pr(B\\mid A)=\\frac{\\Pr(A\\cap B)}{\\Pr(A)}=\\frac{0.18}{0.4}=0.45$.",
      "tag": "Conditional definition"
    },
    {
      "front": "A policyholder owns home (H) and auto (A) coverage with $\\Pr(H)=0.7$, $\\Pr(A)=0.6$, $\\Pr(H\\cap A)=0.5$. Given the customer owns auto, what is the probability they also own home?",
      "back": "$\\Pr(H\\mid A)=\\frac{\\Pr(H\\cap A)}{\\Pr(A)}=\\frac{0.5}{0.6}\\approx 0.8333$.\nNote $\\Pr(H\\mid A)=0.833>\\Pr(H)=0.7$, so owning auto is positively associated with owning home (they are dependent).",
      "tag": "Conditional definition"
    },
    {
      "front": "Compute $\\Pr(A\\mid B)$ when $A\\subset B$, and separately when $B\\subset A$.",
      "back": "If $A\\subset B$: then $A\\cap B=A$, so $\\Pr(A\\mid B)=\\frac{\\Pr(A)}{\\Pr(B)}$.\nIf $B\\subset A$: then $A\\cap B=B$, so $\\Pr(A\\mid B)=\\frac{\\Pr(B)}{\\Pr(B)}=1$ — once $B$ happens, $A$ is certain.",
      "tag": "Conditional definition"
    },
    {
      "front": "A bag has 5 red and 3 green marbles. Two are drawn **without replacement**. Find the probability both are red.",
      "back": "Use the chain rule: $\\Pr(R_1)=\\frac58$, then $\\Pr(R_2\\mid R_1)=\\frac47$ (one red gone, 7 left).\n$\\Pr(R_1\\cap R_2)=\\frac58\\cdot\\frac47=\\frac{20}{56}=\\frac{5}{14}\\approx 0.3571$.",
      "tag": "Multiplication rule"
    },
    {
      "front": "Same bag (5 red, 3 green), two drawn without replacement. Given the **second** marble is red, find the probability the **first** was red.",
      "back": "By symmetry $\\Pr(R_2)=\\frac58$. The joint $\\Pr(R_1\\cap R_2)=\\frac{5}{14}$ from the previous card.\n$\\Pr(R_1\\mid R_2)=\\frac{\\Pr(R_1\\cap R_2)}{\\Pr(R_2)}=\\frac{5/14}{5/8}=\\frac{5}{14}\\cdot\\frac{8}{5}=\\frac{8}{14}=\\frac{4}{7}\\approx 0.5714$.",
      "tag": "Multiplication rule"
    },
    {
      "front": "Two cards are dealt from a standard 52-card deck without replacement. Find the probability both are aces.",
      "back": "$\\Pr(\\text{ace}_1)=\\frac{4}{52}=\\frac{1}{13}$ and $\\Pr(\\text{ace}_2\\mid\\text{ace}_1)=\\frac{3}{51}=\\frac{1}{17}$.\n$\\Pr(\\text{both aces})=\\frac{1}{13}\\cdot\\frac{1}{17}=\\frac{1}{221}\\approx 0.004525$.",
      "tag": "Multiplication rule"
    },
    {
      "front": "A component fails on a given day with probability $0.05$, independently across days. Find the probability it survives a full 5-day week (no failure).",
      "back": "Independence across days lets the daily survival probabilities multiply: $\\Pr(\\text{survive 5 days})=(1-0.05)^5=0.95^5$.\n$0.95^5\\approx 0.7738$.",
      "tag": "Independence"
    },
    {
      "front": "Three independent systems each work with probability $0.9$. Find the probability that **at least one** works.",
      "back": "Use the complement of 'none works': $\\Pr(\\text{none})=(1-0.9)^3=0.1^3=0.001$.\n$\\Pr(\\text{at least one})=1-0.001=0.999$.\nComputing 'at least one' via $1-\\Pr(\\text{none})$ is far easier than summing the individual cases.",
      "tag": "Independence"
    },
    {
      "front": "Why must a Bayes/total-probability denominator sum over the **entire** partition, including the 'no disease but false positive' path?",
      "back": "$\\Pr(A)=\\sum_i\\Pr(A\\mid B_i)\\Pr(B_i)$ requires the $B_i$ to be exhaustive. Dropping a cell — e.g. counting only true positives and omitting false positives — understates $\\Pr(A)$ and inflates the posterior.\nEvery person who could produce the event $A$ (a positive test) must appear in the denominator.",
      "tag": "Tabular Bayes"
    },
    {
      "front": "An email filter sees that $20\\%$ of mail is spam. It flags $98\\%$ of spam and $3\\%$ of legitimate mail. Given a message is flagged, find the probability it is actually spam.",
      "back": "$\\Pr(S)=0.20,\\ \\Pr(\\text{flag}\\mid S)=0.98,\\ \\Pr(\\text{flag}\\mid S^{c})=0.03$.\nJoint: spam $=0.20(0.98)=0.196$; ham $=0.80(0.03)=0.024$.\n$\\Pr(\\text{flag})=0.196+0.024=0.220$.\n$\\Pr(S\\mid\\text{flag})=\\frac{0.196}{0.220}\\approx 0.8909$.",
      "tag": "Tabular Bayes"
    },
    {
      "front": "Rewrite Bayes' theorem in **odds form**: how do the prior odds $\\frac{\\Pr(D)}{\\Pr(D^{c})}$ update after observing evidence $E$?",
      "back": "$\\frac{\\Pr(D\\mid E)}{\\Pr(D^{c}\\mid E)}=\\frac{\\Pr(E\\mid D)}{\\Pr(E\\mid D^{c})}\\cdot\\frac{\\Pr(D)}{\\Pr(D^{c})}$.\nPosterior odds $=$ likelihood ratio $\\times$ prior odds. The shared denominator $\\Pr(E)$ cancels, so no normalization is needed; convert the final odds back to a probability if required.",
      "tag": "Bayes theorem"
    },
    {
      "front": "A rare condition has prevalence $0.001$. A test has likelihood ratio $\\Pr(+\\mid D)/\\Pr(+\\mid D^{c})=50$. Use the odds form of Bayes to find $\\Pr(D\\mid +)$.",
      "back": "Prior odds $=\\frac{0.001}{0.999}\\approx 0.0010010$.\nPosterior odds $=50\\times0.0010010\\approx 0.050050$.\nConvert: $\\Pr(D\\mid +)=\\frac{\\text{odds}}{1+\\text{odds}}=\\frac{0.050050}{1.050050}\\approx 0.04766$, about $4.8\\%$ — still low because the prior is tiny.",
      "tag": "Bayes theorem"
    },
    {
      "front": "Insureds are $80\\%$ low-risk (claim prob $0.05$) and $20\\%$ high-risk (claim prob $0.25$). A policyholder files **no** claim in a year. Find the posterior probability the insured is high-risk.",
      "back": "$\\Pr(\\text{no claim}\\mid\\text{low})=0.95,\\ \\Pr(\\text{no claim}\\mid\\text{high})=0.75$.\nJoint: low $=0.80(0.95)=0.760$; high $=0.20(0.75)=0.150$.\n$\\Pr(\\text{no claim})=0.760+0.150=0.910$.\n$\\Pr(\\text{high}\\mid\\text{no claim})=\\frac{0.150}{0.910}\\approx 0.1648$ — slightly below the $0.20$ prior, as a clean year is mild evidence of being low-risk.",
      "tag": "Bayes theorem"
    },
    {
      "front": "Following the prior card (low-risk $0.80$/claim $0.05$, high-risk $0.20$/claim $0.25$, updated to $\\Pr(\\text{high})\\approx 0.1648$ after a claim-free year), the insured again files **no claim** the next year. Find the new posterior of being high-risk.",
      "back": "Use the updated prior $\\Pr(\\text{high})=0.1648,\\ \\Pr(\\text{low})=0.8352$ (Bayes is sequential).\nJoint: low $=0.8352(0.95)=0.79344$; high $=0.1648(0.75)=0.12360$.\nTotal $=0.79344+0.12360=0.91704$.\n$\\Pr(\\text{high}\\mid\\text{2nd no claim})=\\frac{0.12360}{0.91704}\\approx 0.1348$. Each clean year further lowers the high-risk probability.",
      "tag": "Bayes theorem"
    },
    {
      "front": "Verify that the posteriors from a two-class Bayes update sum to 1, using the email-filter numbers ($\\Pr(S\\mid\\text{flag})\\approx0.8909$).",
      "back": "Compute the complement directly: $\\Pr(S^{c}\\mid\\text{flag})=\\frac{0.024}{0.220}\\approx 0.1091$.\nThen $0.8909+0.1091=1.000$. Posteriors over a partition always sum to 1 because they share the denominator $\\Pr(A)$ and the numerators are the partition cells of $\\Pr(A)$ — a quick exam sanity check.",
      "tag": "Tabular Bayes"
    },
    {
      "front": "A partition has three classes with priors $0.5,0.3,0.2$ and likelihoods $\\Pr(E\\mid B_i)=0.2,0.5,0.8$. Find $\\Pr(B_2\\mid E)$.",
      "back": "Joint products: $B_1{:}\\ 0.5(0.2)=0.10$; $B_2{:}\\ 0.3(0.5)=0.15$; $B_3{:}\\ 0.2(0.8)=0.16$.\n$\\Pr(E)=0.10+0.15+0.16=0.41$.\n$\\Pr(B_2\\mid E)=\\frac{0.15}{0.41}\\approx 0.3659$.",
      "tag": "Total probability"
    }
  ]
}