Part 6 · Chapter 31

Probability

Measuring uncertainty — from counting equally likely outcomes to updating beliefs with new evidence, and the distributions that model repeated chance

Fundamentals of Mathematics Prof. Mithun Mondal Reading time ≈ 48 min
i What you'll learn
  • Sample spaces and events, and how probability assigns numbers to them.
  • Classical probability and the addition theorem for combining events.
  • Conditional probability, the multiplication theorem, and independence.
  • The total probability theorem and Bayes' theorem for updating with evidence.
  • Random variables, with their mean and variance.
  • The binomial distribution for repeated independent trials.
Section 31-1

Sample Space & Events

A random experiment is one whose outcome cannot be predicted with certainty. The set of all possible outcomes is the sample space \(S\), and any subset of it is an event. Rolling a die has \(S=\{1,2,3,4,5,6\}\), and "an even number" is the event \(\{2,4,6\}\).

S E
An event \(E\) is a subset of the sample space \(S\)
🎲
Outcomes, events, and special cases
\(E\subseteq S;\qquad 0\le P(E)\le 1,\quad P(S)=1,\quad P(\varnothing)=0\)

The whole space \(S\) is the sure event and the empty set is the impossible event. Two events are mutually exclusive if they cannot occur together (\(A\cap B=\varnothing\)), and the complement \(A'\) is "A does not happen," with \(P(A')=1-P(A)\).

Section 31-2

Classical Probability & the Addition Theorem

When every outcome is equally likely, probability is just counting: favourable outcomes over total outcomes. To find the chance that either of two events happens, add their probabilities — but subtract the overlap, so it is not counted twice.

A B A∩B
The overlap \(A\cap B\) is shared, so it must not be double-counted
Counting and the addition theorem
\(\displaystyle P(E)=\frac{n(E)}{n(S)};\qquad P(A\cup B)=P(A)+P(B)-P(A\cap B)\)

For mutually exclusive events the overlap is empty, so the formula collapses to \(P(A\cup B)=P(A)+P(B)\). The classical definition applies only when outcomes are equally likely; otherwise probabilities come from data or a model.

Section 31-3

Conditional Probability

Learning that one event has occurred can change the odds of another. Conditional probability \(P(A\mid B)\) answers "given that \(B\) has happened, how likely is \(A\)?" — and the trick is that the sample space shrinks down to \(B\).

A B A∩B
Given \(B\), only the part of \(A\) inside \(B\) matters
|
Probability of A given B
\(\displaystyle P(A\mid B)=\frac{P(A\cap B)}{P(B)},\qquad P(B)>0\)

Dividing by \(P(B)\) rescales so that \(B\) becomes the new certainty. Note the direction matters: \(P(A\mid B)\) and \(P(B\mid A)\) are generally different — reversing them is a classic error that Bayes' theorem later corrects.

Section 31-4

Multiplication & Independence

Rearranging the conditional formula gives the probability that both events occur. When knowing one event tells you nothing about the other, they are independent, and the rule simplifies to a plain product.

Multiplication theorem and independence
\(\displaystyle P(A\cap B)=P(A)\,P(B\mid A);\qquad \text{independent}\Leftrightarrow P(A\cap B)=P(A)\,P(B)\)

The first rule always holds. If the events are independent, \(P(A\mid B)=P(A)\) — the condition adds no information — and the joint probability is just the product. Independence is the natural model for repeated tosses, draws with replacement, and separate trials.

! Mutually exclusive is not the same as independent

These two ideas are often confused but are nearly opposites. Mutually exclusive events cannot happen together (\(P(A\cap B)=0\)), so if one occurs the other certainly did not — that is a very strong dependence. Independent events satisfy \(P(A\cap B)=P(A)P(B)\). Two events with non-zero probability cannot be both at once.

Section 31-5

The Total Probability Theorem

Suppose the sample space is carved into several non-overlapping cases that together cover everything — a partition. The probability of any event is then a weighted average of its chances within each case, weighted by how likely each case is.

B₁ B₂ B₃ A
\(A\) is split across the partition \(B_1,B_2,B_3\)
Σ
Total probability
\(\displaystyle P(A)=\sum_{i} P(B_i)\,P(A\mid B_i)\)

The events \(B_1,B_2,\dots\) must be mutually exclusive and exhaustive (their union is \(S\)), each with \(P(B_i)>0\). The theorem assembles \(P(A)\) from the easier conditional pieces — ideal when \(A\) can arrive by several routes, such as a defective item from one of several machines.

Section 31-6

Bayes' Theorem

Total probability runs forwards, from causes to an effect. Bayes' theorem runs it backwards: having observed the effect \(A\), what is the probability it came from a particular cause \(B_i\)? It is the engine of evidence-based reasoning.

P(B₁) P(B₂) B₁ B₂ P(A|B₁) P(A|B₂) A A' A A'
A two-stage tree; Bayes' theorem reverses it to find \(P(B_i\mid A)\)
Reversing the conditioning
\(\displaystyle P(B_i\mid A)=\frac{P(B_i)\,P(A\mid B_i)}{\sum_{j} P(B_j)\,P(A\mid B_j)}\)

The numerator is one path through the tree; the denominator is the total probability of \(A\) over all paths. The \(P(B_i)\) are prior probabilities and the \(P(B_i\mid A)\) are posteriors — beliefs revised in the light of the evidence \(A\).

Section 31-7

Random Variables

A random variable \(X\) attaches a number to each outcome — the number of heads in three tosses, say. Listing its values with their probabilities gives a probability distribution, summarised by a mean (its centre) and a variance (its spread).

📊
Mean and variance
\(\displaystyle E(X)=\sum_i x_i\,p_i;\qquad \operatorname{Var}(X)=E(X^2)-\big[E(X)\big]^2\)

The probabilities satisfy \(\sum_i p_i=1\). The mean (or expectation) \(\mu=E(X)\) is the long-run average value, and the variance \(\sigma^2\) measures how widely the values scatter about \(\mu\); its square root \(\sigma\) is the standard deviation.

Section 31-8

The Binomial Distribution

Repeat the same success-or-failure trial \(n\) times, independently, with a fixed success probability \(p\). The number of successes follows the binomial distribution — the most important discrete model in the course.

0 3 6 r (successes)
Binomial distribution for \(n=6,\ p=\tfrac12\): \(P(X=r)=\binom{n}{r}p^r q^{\,n-r}\)
🔔
Binomial probabilities, mean and variance
\(\displaystyle P(X=r)=\binom{n}{r}p^r q^{\,n-r};\qquad \text{mean}=np,\quad \text{variance}=npq\)

Here \(q=1-p\) and \(r=0,1,\dots,n\). The four conditions are: a fixed number of trials, only two outcomes per trial, a constant \(p\), and independence. The distribution is symmetric when \(p=\tfrac12\) and skewed otherwise.

Worked Examples

Putting It to Work

1 Classical probability

Problem. A card is drawn from a standard pack of \(52\). Find the probability that it is a king.

Solution. There are \(4\) kings among \(52\) equally likely cards:

Working
\[ P(\text{king})=\frac{4}{52}=\frac{1}{13} \]
2 The addition theorem

Problem. Find the probability that the card is a king or a heart.

Solution. There are \(4\) kings, \(13\) hearts, and \(1\) king of hearts shared:

Working
\[ P(K\cup H)=\frac{4}{52}+\frac{13}{52}-\frac{1}{52}=\frac{16}{52}=\frac{4}{13} \]
3 Conditional probability

Problem. A card is known to be a face card (J, Q, K). Find the probability that it is a king.

Solution. The condition shrinks the space to the \(12\) face cards, of which \(4\) are kings:

Working
\[ P(\text{king}\mid\text{face})=\frac{4}{12}=\frac{1}{3} \]
4 Independent events

Problem. If \(P(A)=0.3\) and \(P(B)=0.4\) are independent, find \(P(A\cap B)\) and \(P(A\cup B)\).

Solution. Multiply for the intersection, then use the addition theorem:

Working
\[ P(A\cap B)=0.3\times0.4=0.12;\qquad P(A\cup B)=0.3+0.4-0.12=0.58 \]
5 Bayes' theorem

Problem. A disease affects \(1\%\) of people. A test detects it in \(99\%\) of carriers but is also positive for \(2\%\) of healthy people. A test is positive — find the probability the person has the disease.

Solution. With \(P(D)=0.01\), total positive probability is \(0.01(0.99)+0.99(0.02)=0.0297\):

Working
\[ P(D\mid+)=\frac{0.01\times0.99}{0.0297}=\frac{0.0099}{0.0297}=\frac13\approx 0.33 \]
6 The binomial distribution

Problem. A fair coin is tossed \(5\) times. Find the probability of exactly \(3\) heads.

Solution. Use \(n=5,\ p=q=\tfrac12,\ r=3\):

Working
\[ P(X=3)=\binom{5}{3}\left(\tfrac12\right)^3\left(\tfrac12\right)^2=\frac{10}{32}=\frac{5}{16} \]
Review

Chapter Summary

Events

\(E\subseteq S\); \(P(A')=1-P(A)\).

Addition

\(P(A\cup B)=P(A)+P(B)-P(A\cap B)\).

Conditional

\(P(A\mid B)=\tfrac{P(A\cap B)}{P(B)}\).

Independence

\(P(A\cap B)=P(A)P(B)\); not the same as exclusive.

Total & Bayes

\(P(A)=\sum P(B_i)P(A\mid B_i)\); Bayes reverses it.

Distributions

\(E(X)=\sum x_ip_i\); binomial mean \(np\), variance \(npq\).

Practice

Problems

Name the tool first — counting, addition, conditioning, independence, total probability, Bayes, or a distribution — then apply it. Difficulty rises down the list.

  1. A die is rolled. Find the probability of getting an even number.
  2. Two coins are tossed. Find the probability of at least one head.
  3. A card is drawn from \(52\). Find the probability that it is a heart or a queen.
  4. If \(P(A)=0.5,\ P(B)=0.3,\ P(A\cap B)=0.1\), find \(P(A\cup B)\).
  5. A die shows an even number. Find the probability that it is a multiple of \(3\).
  6. If \(P(A)=0.6,\ P(B)=0.5\) are independent, find \(P(A\cap B)\) and \(P(A\cup B)\).
  7. A bag has \(3\) red and \(5\) black balls; two are drawn without replacement. Find \(P(\text{both red})\).
  8. A random variable \(X\) takes values \(0,1,2\) with probabilities \(0.2,0.5,0.3\). Find \(E(X)\).
  9. For the distribution in Problem 8, find \(\operatorname{Var}(X)\).
  10. A fair die is thrown \(4\) times. Find the probability of exactly two sixes.
  11. A coin is tossed \(6\) times. Find the probability of at least one head.
  12. Machines \(A\) and \(B\) make \(60\%\) and \(40\%\) of items, with \(2\%\) and \(3\%\) defective. An item is defective; find the probability it was made by \(A\).
  13. A student passes Maths with probability \(0.7\), Physics with \(0.6\), and at least one with \(0.8\). Find the probability of passing both.
Tip: the watchword is "and versus or." An or question wants the addition theorem (mind the overlap); an and question wants the multiplication theorem (mind whether the events are independent). The phrase "given that" signals conditional probability, and a problem where an effect can arise from several causes is a total-probability or Bayes problem — draw the tree. Finally, the words "exactly \(r\) times in \(n\) trials" are the unmistakable fingerprint of the binomial distribution.