chapter
    Conditional Probability and Bayes Theorem Notes for GATE CS

    Conditional Probability and Bayes Theorem notes for GATE CS: 28 study cards covering concepts, formulas, shortcuts and exam traps, plus solved practice questi

    conditional probability and bayes theorem notes

    Chapter Roadmap: Conditional Probability and Bayes Theorem

    Chapter Roadmap

    By the end of this chapter, you will master the art of updating probabilities with new evidence, solving multi-stage sampling problems, and analyzing repeated independent trials.

    Step 1 (Current)
    Bayes Theorem and Posterior Inference
    Reversing conditional probability. Updating prior beliefs with new evidence to find posterior probabilities.
    Step 2
    Conditional Probability in Sequential Sampling
    Drawing items with or without replacement. Tree diagrams and path probabilities.
    Step 3
    Conditional Events in Repeated Coin Tosses
    Analyzing specific patterns in sequences of independent Bernoulli trials.

    Bayes Theorem and Posterior Inference

    Bayes Theorem and Posterior Inference

    The mathematics of updating beliefs with new evidence.


    What you will master here:
    • Reversing conditional probability from effect to cause
    • Identifying Prior, Likelihood, Marginal, and Posterior components
    • Applying the Law of Total Probability to compute denominators
    • Solving classic coin, medical testing, and communication channel problems

    Reversing the Conditional: Cause and Effect

    Reversing the Conditional: Cause and Effect

    The Core Problem

    We often know , but we need to find .

    The Vocabulary of Inference
    • Prior Probability : Our initial belief about the cause before seeing any evidence.
    • Likelihood : The probability of observing the evidence, assuming the cause is true.
    • Marginal Probability : The total probability of observing the evidence across all possible causes.
    • Posterior Probability : Our updated belief about the cause after observing the evidence.

    25 more cards in this chapter

    Try a question

    Answer it here to see how it works. Nothing is recorded until you sign in.

    Question 1
    Level 1: Warm-up

    Let and be mutually exclusive and exhaustive events. If , , and , what is the value of the marginal probability ?

    Question 2
    Level 1: Warm-up

    Let and be a partition of the sample space. If and , which of the following statements about the denominator in Bayes' Theorem is true?

    Question 3
    Level 1: Warm-up

    A sender transmits signals and with probabilities and respectively. The channel has error rates: and . If the receiver observes signal , what is the probability that the sender transmitted ?

    Question 4
    Level 1: Warm-up

    Which of the following statements about sequential sampling is true?

    Question 5
    Level 1: Warm-up

    A bag contains 4 red and 6 blue balls. Two balls are drawn without replacement. What is the probability that exactly one ball is red?

    Question 6
    Level 1: Warm-up

    Which of the following expressions correctly represents the posterior probability in terms of the prior probability , the likelihood , and the marginal probability ?

    Question 7
    Level 1: Warm-up

    If and , what is the minimum possible value of the numerator in the Bayes' Theorem formula?

    Question 8
    Level 1: Warm-up

    A medical test is 90% accurate for sick people and 80% accurate for healthy people. If 10% of the population is sick, what is the probability that a person is sick given a positive test result?

    Question 9
    Level 1: Warm-up

    A bag contains red balls and blue balls, where . Two balls are drawn without replacement. What is the minimum possible value of ?

    Question 10
    Level 1: Warm-up

    Consider the following Assertion (A) and Reason (R):

    Assertion (A): For three events , , , the chain rule states .

    Reason (R): The chain rule can be extended to events by multiplying conditional probabilities sequentially.

    Free preview ends here

    Login to view the complete notes

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    Conditional Probability and Bayes Theorem Notes for GATE CS

    Conditional Probability and Bayes Theorem notes for GATE CS: 28 study cards covering concepts, formulas, shortcuts and exam traps, plus solved practice questions.

    Chapter Roadmap: Conditional Probability and Bayes Theorem

    Chapter Roadmap

    By the end of this chapter, you will master the art of updating probabilities with new evidence, solving multi-stage sampling problems, and analyzing repeated independent trials.

    Step 1 (Current)
    Bayes Theorem and Posterior Inference
    Reversing conditional probability. Updating prior beliefs with new evidence to find posterior probabilities.
    Step 2
    Conditional Probability in Sequential Sampling
    Drawing items with or without replacement. Tree diagrams and path probabilities.
    Step 3
    Conditional Events in Repeated Coin Tosses
    Analyzing specific patterns in sequences of independent Bernoulli trials.

    Bayes Theorem and Posterior Inference

    Bayes Theorem and Posterior Inference

    The mathematics of updating beliefs with new evidence.


    What you will master here:
    • Reversing conditional probability from effect to cause
    • Identifying Prior, Likelihood, Marginal, and Posterior components
    • Applying the Law of Total Probability to compute denominators
    • Solving classic coin, medical testing, and communication channel problems

    Reversing the Conditional: Cause and Effect

    Reversing the Conditional: Cause and Effect

    The Core Problem

    We often know , but we need to find .

    The Vocabulary of Inference
    • Prior Probability : Our initial belief about the cause before seeing any evidence.
    • Likelihood : The probability of observing the evidence, assuming the cause is true.
    • Marginal Probability : The total probability of observing the evidence across all possible causes.
    • Posterior Probability : Our updated belief about the cause after observing the evidence.

    Computing the Denominator: Law of Total Probability

    Computing the Denominator: Law of Total Probability

    The Challenge: is rarely given directly. It must be computed from the partitions of the sample space.

    The Method

    If form a partition of the sample space (mutually exclusive and exhaustive):

    The Full Bayes Formula (Partition Form)
    Execution Strategy
    1. Identify the mutually exclusive causes ().
    2. Write down the prior and likelihood for each.
    3. Multiply them to get the path probabilities.
    4. Sum the path probabilities for the denominator.
    5. Divide the target path probability by the total sum.

    Conditional Probability and Bayes Theorem: Solved Questions with Step-by-Step Explanations (10 Problems)

    Question 1 · Engineering Mathematics MCQ

    Let and be mutually exclusive and exhaustive events. If , , and , what is the value of the marginal probability ?

    1. A.

      0.22

    2. B.

      0.30

    3. C.

      0.38

    4. D.

      0.42

    Correct Answer:

    C

    Step-by-Step Solution

    Insight: This is a casework question requiring the Law of Total Probability to find the marginal probability by summing the path probabilities.

    Exam route: Calculate , then compute .

    Learning route:

    Step 1: Since and are exhaustive, .

    Step 2: Apply the Law of Total Probability: .

    Step 3: Substitute the values: .

    Answer: The value of is 0.38.

    Wrong path: Option A is . This sign error occurs when subtracting the paths instead of adding them.

    Generalization: The total probability of an effect is the sum of the probabilities of that effect occurring through each possible cause.

    Question 2 · Engineering Mathematics MCQ

    Let and be a partition of the sample space. If and , which of the following statements about the denominator in Bayes' Theorem is true?

    1. A.

      must be exactly 0.50.

    2. B.

      can be any value in the interval .

    3. C.

      is always greater than 0.80.

    4. D.

      is independent of the value of .

    Correct Answer:

    B

    Step-by-Step Solution

    Insight: This is a bounding question. We must find the range of by treating as a variable and applying the probability axioms .

    Exam route: Write . Since , the range is .

    Learning route:

    Step 1: Apply the Law of Total Probability: .

    Step 2: Since and form a partition, .

    Step 3: Substitute the values: .

    Step 4: Since is a probability, .

    Step 5: When , . When , .

    Step 6: Therefore, can be any value in the interval .

    Answer: Option B is the correct statement.

    Wrong path: Option A assumes , ignoring the constraint that can vary.

    Generalization: The marginal probability is a weighted average of the likelihoods, bounded by the minimum and maximum likelihoods.

    Question 3 · Engineering Mathematics MCQ

    A sender transmits signals and with probabilities and respectively. The channel has error rates: and . If the receiver observes signal , what is the probability that the sender transmitted ?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: This is a communication channel problem requiring Bayes' Theorem to reverse the conditional probability from "received given sent" to "sent given received".

    Exam route: Apply Bayes' Theorem directly: .

    Learning route:

    Step 1: Identify the prior probabilities: , .

    Step 2: Identify the likelihoods: , .

    Step 3: Calculate the numerator (path probability for H): .

    Step 4: Calculate the denominator (total probability of receiving L):

    .

    Step 5: Apply Bayes' Theorem: .

    Answer: The probability is .

    Wrong path: Option B () results from using instead of in the denominator calculation.

    Generalization: In communication channel problems, always verify that the condition in the denominator matches the observed event (what was received).

    Question 4 · Engineering Mathematics MCQ

    Which of the following statements about sequential sampling is true?

    1. A.

      In sampling without replacement, the draws are independent.

    2. B.

      In sampling with replacement, the draws are dependent.

    3. C.

      In sampling without replacement, the denominator decreases with each draw.

    4. D.

      In sampling with replacement, the denominator decreases with each draw.

    Correct Answer:

    C

    Step-by-Step Solution

    Insight: This is a statement truth question testing fundamental understanding of dependent vs. independent draws in sequential sampling.

    Exam route: Evaluate each statement based on the definitions of sampling with and without replacement.

    Learning route:

    Step 1: Evaluate Option A: "In sampling without replacement, the draws are independent."

    • FALSE. Without replacement means each draw changes the composition of the remaining pool, making subsequent draws dependent on previous ones.

    Step 2: Evaluate Option B: "In sampling with replacement, the draws are dependent."

    • FALSE. With replacement means the item is returned, so the pool resets and each draw is independent.

    Step 3: Evaluate Option C: "In sampling without replacement, the denominator decreases with each draw."

    • TRUE. Each draw removes an item from the pool, so the total number of items (denominator) decreases by 1 for each subsequent draw.

    Step 4: Evaluate Option D: "In sampling with replacement, the denominator decreases with each draw."

    • FALSE. With replacement, the item is returned, so the total number of items remains constant.

    Answer: Option C is the correct statement.

    Wrong path: Option A is a common misconception. Students sometimes think that because each draw is "random," they must be independent. But independence requires that the probability distribution doesn't change, which it does in without-replacement sampling.

    Generalization: The key distinction is whether the sample space changes after each draw. If it changes (without replacement), draws are dependent. If it stays the same (with replacement), draws are independent.

    Question 5 · Engineering Mathematics MCQ

    A bag contains 4 red and 6 blue balls. Two balls are drawn without replacement. What is the probability that exactly one ball is red?

    1. A.

      0

    2. B.

    3. C.

    4. D.

    Correct Answer:

    B

    Step-by-Step Solution

    Insight: This is a casework question requiring you to sum the probabilities of mutually exclusive paths: (Red, Blue) and (Blue, Red).

    Exam route: Calculate P(R,B) + P(B,R) using the chain rule for each path.

    Learning route:

    Step 1: Identify the two mutually exclusive paths: 1st red then blue, or 1st blue then red.

    Step 2: Calculate P(R,B) = P(1st R) × P(2nd B | 1st R) = (4/10) × (6/9) = 24/90.

    Step 3: Calculate P(B,R) = P(1st B) × P(2nd R | 1st B) = (6/10) × (4/9) = 24/90.

    Step 4: Sum the paths: P(exactly 1 R) = 24/90 + 24/90 = 48/90 = 8/15.

    Answer: The probability is 8/15.

    Wrong path: Option A (0) results from subtracting instead of adding: 24/90 - 24/90 = 0. This sign error occurs when students confuse "exactly one" with a difference.

    Generalization: For "exactly one" problems, always sum the probabilities of all mutually exclusive paths that satisfy the condition.

    Question 6 · Engineering Mathematics MCQ

    Which of the following expressions correctly represents the posterior probability in terms of the prior probability , the likelihood , and the marginal probability ?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    B

    Step-by-Step Solution

    Insight: This is a direct formula recall question for Bayes' Theorem, recognizable by the request to identify the posterior probability expression.

    Exam route: Recall the standard Bayes' formula and match it to the options.

    Learning route:

    Step 1: The definition of conditional probability is .

    Step 2: The joint probability can be written using the multiplication rule as .

    Step 3: Substituting this into the definition gives .

    Answer: Option B is the exact mathematical statement.

    Wrong path: Option A is , which equals . This mistake confuses the condition, dividing by the wrong marginal probability.

    Generalization: Always check the denominator of a conditional probability; it must be the probability of the condition event.

    Question 7 · Engineering Mathematics MCQ

    If and , what is the minimum possible value of the numerator in the Bayes' Theorem formula?

    1. A.

      0.00

    2. B.

      0.06

    3. C.

      0.20

    4. D.

      0.50

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: This is a contradiction/boundary question. We must find the minimum of by recognizing that assuming they must overlap leads to a contradiction with the axioms of probability.

    Exam route: Use the inclusion-exclusion principle to find the lower bound of .

    Learning route:

    Step 1: The numerator in Bayes' Theorem is the joint probability .

    Step 2: By the inclusion-exclusion principle, .

    Step 3: Since , we have .

    Step 4: Rearranging gives .

    Step 5: Since probabilities cannot be negative, the strictest lower bound is .

    Answer: The minimum possible value is 0.00.

    Wrong path: Option D is 0.50. This overcounting error results from adding , ignoring that the intersection can be zero if the events are mutually exclusive.

    Generalization: The joint probability is bounded by .

    Question 8 · Engineering Mathematics MCQ

    A medical test is 90% accurate for sick people and 80% accurate for healthy people. If 10% of the population is sick, what is the probability that a person is sick given a positive test result?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    B

    Step-by-Step Solution

    Insight: This is a base rate neglect problem requiring careful application of Bayes' Theorem to avoid the prosecutor's fallacy.

    Exam route: Define events, identify priors and likelihoods, then apply Bayes' Theorem: .

    Learning route:

    Step 1: Define events: = sick, = healthy, = positive test.

    Step 2: Identify priors: , .

    Step 3: Identify likelihoods: , (since test is 80% accurate for healthy, meaning 20% false positive rate).

    Step 4: Calculate numerator: .

    Step 5: Calculate denominator using Law of Total Probability:

    .

    Step 6: Apply Bayes' Theorem: .

    Answer: The probability is .

    Wrong path: Option D () results from using instead of , confusing accuracy with false positive rate.

    Generalization: Base rate neglect occurs when we ignore the prior probability. Even with a highly accurate test, if the disease is rare, most positive results will be false positives.

    Question 9 · Engineering Mathematics MCQ

    A bag contains red balls and blue balls, where . Two balls are drawn without replacement. What is the minimum possible value of ?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    B

    Step-by-Step Solution

    Insight: This is a minimum/optimization problem requiring expressing as a function of and finding its minimum.

    Exam route: Write , express as a function of , and minimize.

    Learning route:

    Step 1: Write the probability formula:

    Step 2: Expand and simplify:

    Step 3: This is a quadratic function in with positive leading coefficient, so it opens upward. The minimum occurs at the vertex.

    Step 4: Find the vertex: .

    Step 5: Evaluate at :

    .

    Step 6: Verify this is a minimum by checking endpoints:

    • :
    • :

    The value at is indeed the minimum.

    Answer: The minimum possible value is .

    Wrong path: Option C () results from overcounting or using incorrect formula for .

    Generalization: For quadratic functions, the vertex gives the minimum (if opening upward) or maximum (if opening downward). Always verify by checking endpoints.

    Question 10 · Engineering Mathematics MCQ

    Consider the following Assertion (A) and Reason (R):

    Assertion (A): For three events , , , the chain rule states .

    Reason (R): The chain rule can be extended to events by multiplying conditional probabilities sequentially.

    1. A.

      Both A and R are true, and R is the correct explanation of A.

    2. B.

      Both A and R are true, but R is NOT the correct explanation of A.

    3. C.

      A is true, but R is false.

    4. D.

      A is false, but R is true.

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: This is an assertion-reason question testing understanding of the chain rule for sequences.

    Exam route: Verify the assertion using the definition of conditional probability, then check if the reason correctly explains it.

    Learning route:

    Step 1: Evaluate Assertion (A).

    By definition of conditional probability:

    And

    Substituting:

    So Assertion (A) is TRUE.

    Step 2: Evaluate Reason (R).

    The chain rule for events is:

    This is indeed an extension by multiplying conditional probabilities sequentially.

    So Reason (R) is TRUE.

    Step 3: Check if R explains A.

    The assertion is a specific case () of the general chain rule stated in the reason. The reason provides the general principle that explains why the assertion is true.

    So R IS the correct explanation of A.

    Answer: Both A and R are true, and R is the correct explanation of A.

    Wrong path: Option B would be chosen if R were true but didn't explain A. But in this case, the general chain rule (R) directly explains the specific case (A).

    Generalization: The chain rule is a fundamental tool for computing joint probabilities of sequences. It's derived directly from the definition of conditional probability applied repeatedly.

    More notes in this unit