📘 Lecture 22 — Bayes’ Theorem, Discrete Random Variable, Discrete Probability Distribution, Graphical Representation, Mean, Standard Deviation, Coefficient of Variation, Distribution Function
📖 Overview: This lecture introduces Bayes’ Theorem, a powerful extension of conditional probability for calculating “reverse” probabilities when events form a partition. It then transitions to the foundational concepts of discrete random variables, discrete probability distributions, their graphical representation, and key numerical measures (mean, standard deviation, coefficient of variation), concluding with the cumulative distribution function. These concepts are essential for modeling and analyzing random phenomena in statistics.
🗂️ Topics Covered
The lecture begins with Bayes’ Theorem for k mutually exclusive and exhaustive events, illustrated by a detailed example on car emission testing. It then defines a random variable, specifically a discrete random variable, and introduces the discrete probability distribution with its two properties. The graphical representation of a discrete probability distribution is shown via a line chart. The computation of the mean (expected value), standard deviation, and coefficient of variation for a discrete probability distribution is explained mathematically and with a worked example on flower petals. Another example on the sum of two dice illustrates finding probabilities from a distribution. Finally, the concept of the distribution function (cumulative distribution function) is defined and applied to the dice example.
📝 Lecture Summary
Bayes’ Theorem
This theorem deals with conditional probabilities in an interesting way. If events A1, A2… Ak form a partition of a sample space S (meaning they are mutually exclusive and exhaustive), and if B is any other event of S such that it can occur ONLY IF ONE OF THE Ai OCCURS, then for any i, the probability that Ai occurred given that B occurred is given by the formula below. In simpler terms, if you know that event B happened, but B could only be caused by one of several prior events (A1, A2, … Ak), Bayes’ Theorem tells you the probability that a particular prior event (Ai) was the cause.
🔑 Definition — Partition: A set of events A1, A2... Ak that are mutually exclusive (no two can occur at the same time) and exhaustive (their union is the whole sample space S).
📐 Formula (General): P(Ai | B) = [P(Ai).P(B|Ai)] / [ Σ (from i=1 to k) P(Ai).P(B|Ai) ] 📐 Formula (for k=2): P(A1 | B) = [P(A1).P(B|A1)] / [ P(A1).P(B|A1) + P(A2).P(B|A2) ] → Plain-English Meaning: The probability of a specific cause (Ai) after observing an effect (B) is the likelihood of that cause producing the effect, divided by the total likelihood of the effect being produced by any cause.
📌 Example: In a developed country, 25% of all cars emit excessive pollutants. When tested, 99% of cars that emit excessive pollutants fail, but 17% of cars that do not emit excessive pollutants also fail. What is the probability that a car that fails the test actually emits excessive pollutants?
- Step 1: Define Events. A1: Car emits excessive pollutants. A2: Car does not emit excessive pollutants. B: Car fails the test.
- Step 2: Identify Given Probabilities. P(A1) = 0.25, P(A2) = 1 - 0.25 = 0.75, P(B|A1) = 0.99, P(B|A2) = 0.17.
- Step 3: Apply Bayes’ Theorem (k=2). P(A1|B) = (0.25 * 0.99) / (0.25 * 0.99 + 0.75 * 0.17) = 0.2475 / (0.2475 + 0.1275) = 0.2475 / 0.3750
- Step 4: Result. P(A1|B) = 0.66. There is a 66% probability that a car which fails the test actually emits excessive pollutants. 💡 Why this matters: This example shows a classic “false positive” scenario. The test is very good at catching polluting cars (99% fail rate), but it also has a high rate of failing non-polluting cars (17%). Bayes’ Theorem corrects our intuition and gives the true probability, which is much lower than 99%.
Random Variable
Such a numerical quantity whose value is determined by the outcome of a random experiment is called a random variable. For example, if we toss three dice together and let X denote the number of heads, the random variable X consists of the values 0, 1, 2, and 3. In this example, X is a discrete random variable.
Discrete Probability Distribution
A probability distribution for a discrete random variable is a table or formula that lists all possible values the variable can take and their corresponding probabilities.
🔑 Properties of a Discrete Probability Distribution:
- 0 ≤ P(Xi) ≤ 1 for each value Xi.
- Σ P(Xi) = 1 (The sum of all probabilities must equal 1).
📌 Example: A biologist studying a flower species observes the number of petals on 1000 flowers.
- Given Frequency Distribution: [Table shows number of petals (3-9) and their frequencies (50, 100, 200, 300, 250, 75, 25)]. Because 1000 is a large number, the proportions f/Σf are regarded as probabilities.
- Discrete Probability Distribution: [Table shows the same petal values (x1=3 to x7=9) and their probabilities (0.05, 0.10, 0.20, 0.30, 0.25, 0.075, 0.025)]. The sum of probabilities is 1. This is a valid discrete probability distribution.
Graphical Representation of a Discrete Probability Distribution
This distribution can be represented in the form of a line chart. [The chart shows a line chart of the petal example, with the x-axis for “No. of Petals (x)” and the y-axis for “Probability P(x)”, showing a roughly symmetric distribution centered around 6]. This graph clearly shows that every discrete probability distribution has a central point and a spread, similar to a frequency distribution.
Mean, Standard Deviation and Coefficient of Variation of a Discrete Probability Distribution
Mean (Expected Value, μ or E(X)) The mean of a discrete probability distribution is given by the formula below. It is the long-run average value of the random variable.
📐 Formula: μ = E(X) = Σ [X * P(X)] → Plain-English Meaning: Multiply each value of X by its probability and sum up all those products.
📌 Example (Flower Petals): [Table shows x, P(x), and xP(x) columns]. μ = Σ xP(x) = 0.15 + 0.40 + 1.00 + 1.80 + 1.75 + 0.60 + 0.225 = 5.925. Interpretation: Considering a very large number of flowers, we would expect the average number of petals per flower to be 5.925 (approximately 6 petals). This is why the mean is technically called the expected value.
Standard Deviation (σ or S.D.(X)) The standard deviation measures the spread or dispersion of the probability distribution.
📐 Formula: σ = S.D.(X) = √ [ Σ (X²P(X)) – (Σ XP(X))² ] → Plain-English Meaning: This is the square root of the difference between the average of the squares and the square of the average.
📌 Example (Flower Petals): [Table shows x, P(x), xP(x), and x²P(x) columns].
- Σ xP(x) = 5.925
- Σ x²P(x) = 0.45 + 1.60 + 5.00 + 10.80 + 12.25 + 4.80 + 2.025 = 36.925
- σ = √ [36.925 – (5.925)²] = √ [36.925 – 35.106] = √(1.819) ≈ 1.3 [The graph of the petal distribution is shown again, with arrows indicating μ = 5.925 and σ = 1.3].
Coefficient of Variation (C.V.) 📐 Formula: C.V. = (σ / μ) * 100 → Plain-English Meaning: A relative measure of dispersion, expressed as a percentage. 📌 Example (Flower Petals): C.V. = (1.3 / 5.925) * 100 = 21.9%
📌 Example: Sum of Dots on Two Fair Dice.
- Part a: The sample space has 36 equally likely outcomes. The random variable X (sum of dots) can be 2, 3, …, 12. [The probability distribution table is constructed, e.g., P(X=2) = 1/36, P(X=3) = 2/36, P(X=7) = 6/36, P(X=12) = 1/36].
- Part b(i): Find P(a sum > 8) = P(X=9) + P(X=10) + P(X=11) + P(X=12) = 4/36 + 3/36 + 2/36 + 1/36 = 10/36.
- Part b(ii): Find P(5 < X ≤ 10) = P(X=6) + P(X=7) + P(X=8) + P(X=9) + P(X=10) = 5/36 + 6/36 + 5/36 + 4/36 + 3/36 = 23/36.
Distribution Function of a Discrete Random Variable
The distribution function (d.f.) or cumulative distribution function (cdf) of a random variable X, denoted by F(x), is defined by F(x) = P(X ≤ x). It gives the probability of the event that X takes a value LESS THAN OR EQUAL TO a specified value x.
📌 Example (Sum of Two Dice): [The table now has a third row for F(xi), which is the cumulative sum of f(xi)].
- F(5) = P(X ≤ 5) = 1/36 + 2/36 + 3/36 + 4/36 = 10/36. This means the probability of obtaining a sum of five or less is 10/36.
⭐ Key Takeaways
Bayes’ Theorem is a crucial method for revising probabilities when new information (event B) becomes available, and it requires that the prior events (Ai) form a partition. A discrete random variable takes a countable number of values, and its probability distribution must have all probabilities between 0 and 1 and sum to 1. The mean (or expected value) of a distribution is its center of gravity, computed as Σ xP(x), while the standard deviation, computed from Σ x²P(x), measures its spread. The cumulative distribution function, F(x) = P(X ≤ x), is a powerful tool for finding probabilities of ranges of values.
🧠 Quick Revision Questions
- What are the two defining properties of a discrete probability distribution?
- In Bayes’ Theorem, what does it mean for events A1, A2, … Ak to form a “partition” of the sample space?
- Calculate the expected value (mean) of the sum of dots when two fair dice are thrown.
- What is the formula for the standard deviation of a discrete probability distribution?
- For the sum of two dice, explain the difference between f(7), which is P(X=7), and F(7), which is P(X ≤ 7).