Conditional Probability, Bayes' Theorem and Binomial Distribution

Basic probability counts favourable outcomes. The next level asks how a probability changes once some information is known, how to reverse a conditional probability, and how to describe a whole random experiment by its mean and variance. Conditional probability, Bayes' theorem and the binomial distribution together give one or two questions in almost every JEE Main paper and appear regularly in ECAT and NUST NET.

Asked in: ECAT, NUST NET, JEE Main, FSc and Class 11-12 boards

Conditional probability

P(A|B) is the probability of A when we already know that B has happened. Knowing B shrinks the sample space to B, so we count only the outcomes of A that lie inside B.

For equally likely outcomes, P(A|B) = n(A ∩ B)/n(B). Rearranging the definition gives the multiplication rule, which is how we find the chance of two events happening in sequence, such as drawing two cards without replacement.

Independent events

A and B are independent when knowing one does not change the chance of the other: P(A|B) = P(A). Then the probability of both is simply the product.

Independent is not the same as mutually exclusive. Mutually exclusive events cannot happen together, so if one happens the other certainly does not; two such events with non-zero probabilities are always dependent. If A and B are independent, so are A and B′, A′ and B, and A′ and B′.

Total probability theorem

Suppose the sample space is split into cases E₁, E₂, …, Eₙ that are mutually exclusive and together cover everything, such as which bag or which machine was used. An event A can happen through any of these cases.

The total probability of A is the weighted average of P(A|Eᵢ), with weights P(Eᵢ). A tree diagram shows this neatly: multiply along each branch and add the branches that end in A.

Bayes' theorem

Bayes' theorem reverses the condition. Given that A has happened, it finds the probability that it came through a particular case Eᵢ.

It is simply the branch for Eᵢ divided by the total of all branches that lead to A. The prior P(Eᵢ) is updated to the posterior P(Eᵢ|A) using the evidence A.

Random variables, mean and variance

A random variable X gives a number to each outcome. Its probability distribution lists every value xᵢ with its probability pᵢ; the pᵢ are non-negative and add up to 1.

The mean (expected value) is the long-run average of X. The variance measures spread about the mean, and the standard deviation is its square root.

The binomial distribution

A binomial experiment has n independent trials, each with only two results, success (probability p) or failure (probability q = 1 − p), with p the same in every trial. X is the number of successes.

The probability of exactly r successes is nCr pʳ qⁿ⁻ʳ. The mean is np and the variance is npq, so the variance is always less than the mean.

Solved examples

  1. A fair die is thrown. Given that the number shown is odd, what is the probability that it is greater than 2?
    1. The condition 'odd' reduces the sample space to {1, 3, 5}.
    2. Within it, the numbers greater than 2 are 3 and 5.
    3. P = 2/3. Count only inside the reduced space {1, 3, 5}, not among all six faces.
    Answer: 2/3
  2. P(A) = 0.5, P(B) = 0.4 and P(A ∪ B) = 0.7. Find P(A|B) and decide whether A and B are independent.
    1. P(A ∩ B) = P(A) + P(B) − P(A ∪ B) = 0.5 + 0.4 − 0.7 = 0.2.
    2. P(A|B) = 0.2 ÷ 0.4 = 0.5.
    3. Since P(A|B) = P(A) = 0.5 (equivalently 0.5 × 0.4 = 0.2), A and B are independent.
    Answer: P(A|B) = 0.5; A and B are independent
  3. Bag I has 3 red and 2 black balls; Bag II has 2 red and 4 black balls. Ali tosses a fair coin and picks Bag I on heads, Bag II on tails, then draws one ball. Find the probability that the ball is red.
    1. P(Bag I) = P(Bag II) = 1/2.
    2. P(red | Bag I) = 3/5 and P(red | Bag II) = 2/6 = 1/3.
    3. Total probability: P(red) = ½ × 3/5 + ½ × 1/3 = 3/10 + 1/6 = 9/30 + 5/30 = 14/30 = 7/15.
    Answer: 7/15
  4. In the previous example the ball drawn turns out to be red. What is the probability that it came from Bag I?
    1. By Bayes' theorem, P(Bag I | red) = (branch through Bag I) ÷ (total of red branches).
    2. Branch through Bag I = ½ × 3/5 = 3/10. Total = 7/15.
    3. P = (3/10) ÷ (7/15) = (3/10) × (15/7) = 45/70 = 9/14.
    Answer: 9/14
  5. A random variable X takes the values 0, 1, 2 and 3 with probabilities k, 2k, 3k and 4k. Find k, the mean and the variance of X.
    1. The probabilities add to 1: 10k = 1, so k = 1/10.
    2. Mean = 0(0.1) + 1(0.2) + 2(0.3) + 3(0.4) = 0.2 + 0.6 + 1.2 = 2.
    3. E(X²) = 0 + 1(0.2) + 4(0.3) + 9(0.4) = 0.2 + 1.2 + 3.6 = 5.
    4. Variance = 5 − 2² = 1.
    Answer: k = 1/10, mean = 2, variance = 1
  6. A fair die is thrown 5 times. Find the probability of getting exactly two sixes, and the mean number of sixes.
    1. Each throw is a trial with p = 1/6 (six) and q = 5/6, and n = 5.
    2. P(X = 2) = 5C2 × (1/6)² × (5/6)³ = 10 × 1/36 × 125/216 = 1250/7776 = 625/3888.
    3. Mean = np = 5/6, and variance = npq = 5 × 1/6 × 5/6 = 25/36.
    Answer: 625/3888 ≈ 0.161; mean 5/6

Exam shortcuts

Common mistakes

Practice MCQs

  1. P(A) = 0.6, P(B) = 0.5 and P(A ∩ B) = 0.3. What is P(A|B)?
    A) 0.5
    B) 0.3
    C) 0.6
    D) 0.15
    Answer: C) 0.6 — P(A|B) = P(A ∩ B)/P(B) = 0.3 ÷ 0.5 = 0.6. 0.5 is P(B) itself, 0.3 forgets to divide, and 0.15 multiplies by P(B) instead of dividing.
  2. Two fair coins are tossed. Given that at least one shows a head, what is the probability that both show heads?
    A) 1/3
    B) 2/3
    C) 1/2
    D) 1/4
    Answer: A) 1/3 — The condition leaves HH, HT and TH, three equally likely outcomes, and only HH has two heads, so the answer is 1/3. 1/2 wrongly assumes only the other coin matters, 1/4 ignores the condition, and 2/3 counts the outcomes with exactly one head.
  3. A and B are independent events with P(A) = 0.3 and P(B) = 0.4. What is P(A ∪ B)?
    A) 0.88
    B) 0.58
    C) 0.12
    D) 0.70
    Answer: B) 0.58 — P(A ∩ B) = 0.3 × 0.4 = 0.12, so P(A ∪ B) = 0.3 + 0.4 − 0.12 = 0.58 (or 1 − 0.7 × 0.6). 0.70 forgets to subtract the overlap, 0.12 is the probability of both, and 0.88 is 1 − 0.12.
  4. A and B are mutually exclusive events with P(A) = 0.3 and P(B) = 0.4. What is P(A|B)?
    A) 0.75
    B) 0.3
    C) 0
    D) 0.12
    Answer: C) 0 — Mutually exclusive means A ∩ B is empty, so P(A|B) = 0 ÷ 0.4 = 0. 0.3 would be correct only for independent events, 0.75 is P(A)/P(B), and 0.12 treats the events as independent and gives P(A ∩ B).
  5. Two fair dice are thrown and the sum is 8. What is the probability that one of the dice shows a 5?
    A) 1/3
    B) 1/6
    C) 1/18
    D) 2/5
    Answer: D) 2/5 — A sum of 8 comes from (2,6), (3,5), (4,4), (5,3) and (6,2): five outcomes. Two of them contain a 5, so the answer is 2/5. 1/18 = 2/36 ignores the condition, and 1/3 and 1/6 come from miscounting the reduced sample space.
  6. Two cards are drawn one after the other without replacement from a pack of 52. What is the probability that the first is a king and the second is a queen?
    A) 1/169
    B) 4/663
    C) 2/663
    D) 8/663
    Answer: B) 4/663 — P(king first) = 4/52 and P(queen second | king first) = 4/51, so the answer is 16/2652 = 4/663. 1/169 = (4/52)² assumes replacement, and 8/663 counts both orders, which the question does not allow.
  7. A random variable X takes the values 1, 2 and 3 with probabilities 0.2, 0.5 and 0.3. What is the variance of X?
    A) 0.7
    B) 0.49
    C) 4.9
    D) 2.1
    Answer: B) 0.49 — Mean = 0.2 + 1.0 + 0.9 = 2.1 and E(X²) = 0.2 + 2.0 + 2.7 = 4.9, so the variance is 4.9 − 2.1² = 4.9 − 4.41 = 0.49. 4.9 is E(X²) alone, 2.1 is the mean, and 0.7 is the standard deviation.
  8. A fair coin is tossed 6 times. What is the probability of getting exactly 4 heads?
    A) 15/64
    B) 15/32
    C) 1/16
    D) 5/16
    Answer: A) 15/64 — P(X = 4) = 6C4 × (1/2)⁶ = 15/64. 5/16 = 20/64 is the probability of exactly 3 heads, 1/16 leaves out the 6C4 factor (only (1/2)⁴), and 15/32 uses (1/2)⁵.
  9. A binomial distribution has mean 6 and variance 4. What is the number of trials n?
    A) 18
    B) 9
    C) 12
    D) 24
    Answer: A) 18 — npq ÷ np = q = 4/6 = 2/3, so p = 1/3 and n = 6 ÷ (1/3) = 18. 9 comes from taking p = 2/3 (mixing up p and q), and 12 and 24 come from mismatched divisions.
  10. Hamza pays Rs 20 to play a game: a fair die is thrown and he receives Rs 60 for a six, Rs 30 for a five and nothing otherwise. What is his expected gain per game?
    A) A gain of Rs 5
    B) A loss of Rs 10
    C) A gain of Rs 15
    D) A loss of Rs 5
    Answer: D) A loss of Rs 5 — Expected winnings = 60 × 1/6 + 30 × 1/6 = 10 + 5 = Rs 15. Subtracting the Rs 20 fee gives an expected gain of −Rs 5, a loss of Rs 5. Rs 15 forgets the fee, and a loss of Rs 10 counts only the six.
  11. A fair coin is tossed n times. What is the least n for which the probability of at least one head is at least 0.9?
    A) 4
    B) 3
    C) 10
    D) 5
    Answer: A) 4 — We need 1 − (1/2)ⁿ ≥ 0.9, so (1/2)ⁿ ≤ 0.1. (1/2)³ = 0.125 is too big and (1/2)⁴ = 0.0625 works, so n = 4. 3 fails the test, 5 is not the least, and 10 confuses 0.1 with 1/n.
  12. Machine X makes 60% of a factory's bulbs, of which 2% are faulty; machine Y makes the rest, of which 5% are faulty. What is the probability that a bulb chosen at random is faulty?
    A) 0.035
    B) 0.026
    C) 0.07
    D) 0.032
    Answer: D) 0.032 — Total probability: 0.6 × 0.02 + 0.4 × 0.05 = 0.012 + 0.020 = 0.032. 0.035 is the plain average of 2% and 5% (ignoring the weights), 0.07 adds the rates, and 0.026 swaps the machine shares.
  13. Ravi tells the truth 3 times out of 4 and Ayesha 4 times out of 5, independently. Both describe the same event. What is the probability that they contradict each other?
    A) 13/20
    B) 7/20
    C) 1/20
    D) 3/20
    Answer: B) 7/20 — They contradict when exactly one tells the truth: 3/4 × 1/5 + 1/4 × 4/5 = 3/20 + 4/20 = 7/20. 13/20 is the probability that they agree, while 3/20 and 1/20 each count only one way of disagreeing or both lying.
  14. 1% of a population has a disease. A test detects it in 90% of people who have it, but also shows positive for 5% of healthy people. If Neha tests positive, what is the probability that she has the disease?
    A) 1/100
    B) 9/59
    C) 2/13
    D) 9/10
    Answer: C) 2/13 — Bayes: true positives 0.01 × 0.9 = 0.009; false positives 0.99 × 0.05 = 0.0495. P = 0.009 ÷ 0.0585 = 2/13 ≈ 0.15. 9/10 confuses P(positive | disease) with P(disease | positive), 9/59 takes 5% of everyone instead of 5% of the healthy, and 1/100 is the prior, ignoring the test.
  15. Ali and Priya take turns throwing a fair die, Ali first. The first to throw a six wins. What is the probability that Ali wins?
    A) 1/6
    B) 1/2
    C) 6/11
    D) 5/11
    Answer: C) 6/11 — Ali wins on throw 1, 3, 5, …: P = 1/6 + (5/6)²(1/6) + (5/6)⁴(1/6) + … = (1/6) ÷ (1 − 25/36) = (1/6) × (36/11) = 6/11. 5/11 is Priya's chance, 1/2 ignores the advantage of going first, and 1/6 counts only Ali's first throw.

Questions

What is the difference between independent and mutually exclusive events?

Mutually exclusive events cannot occur together, so P(A ∩ B) = 0. Independent events can occur together, and P(A ∩ B) = P(A)P(B). Two events with non-zero probabilities cannot be both.

When should I use Bayes' theorem?

Whenever the question gives the result and asks for the cause, such as 'the ball is red; find the chance it came from Bag I' or 'the item is faulty; which machine made it?'.

When is a distribution binomial?

When there is a fixed number n of independent trials, each with only success or failure, and the success probability p is the same every time. Drawing with replacement is binomial; drawing without replacement is not.

Why is the variance of a binomial distribution smaller than its mean?

Variance = npq and mean = np, so variance ÷ mean = q, which is less than 1. A question giving a variance larger than the mean describes no binomial distribution.