Random Variables and Probability Distributions (FIT2086)
Context: FIT2086_MOC · the probability calculus the whole unit runs on · deepens FIT1058’s Random Variable / Conditional Probability with pmf/pdf/cdf/quantile, joint–marginal–conditional, and iid — the objects every later week (MLE, CIs, testing, regression) manipulates
Quick Revision
- 🎯 Objective: a random variable takes values from an event space with probabilities summing/integrating to ➔ manipulate one, two or many RVs via the sum rule (marginalise) and product rule (condition).
- 📦 Core Components: pmf (discrete) | pdf (continuous) | cdf | quantile | mode .
- ⚡ Key Constraint: a density is not a probability — may exceed , , and every continuous answer is an integral or a cdf difference. Second killer: conditioning divides by the marginal, not by the joint total.
📝 How It Works
1. Discrete random variables and the pmf
- Random variable ➔ takes a value from a set (the event space) with specified probabilities; observing is the event . Capital = the RV, lowercase = the realisation.
- Probability mass function (Def. 6) ➔ any with
- Event probability ➔ for : .
- Subscript notation ➔ / / name which RV the function belongs to; shorthand .
- Union rule (inclusion–exclusion) ➔ , collapsing to plain additivity when .
2. Two (and many) random variables
- Joint distribution ➔ over : (the probability of AND ), summing to over all pairs.
- Sum rule (marginalisation) ➔ sum the unwanted variable out; the result is the marginal, the probability of irrespective of :
- Product / conditional rule ➔ the joint renormalised by the marginal of the conditioning event:
- Independence ➔ iff for all ; substituting into the conditional rule gives the equivalent test ➔ knowing tells you nothing new about . One failing pair kills it.
- i.i.d. ➔ are independent and identically distributed if they are mutually independent and for all , hence
- Why iid matters ➔ that product is the likelihood maximised from Week 3 onward; every estimator in the unit assumes it.
3. Continuous random variables and the pdf
- Density (pdf) ➔ when , is described by with
- Probabilities are areas ➔ , and generally .
- — the argument ➔ on , as : zero width ⟹ zero area, however tall is there. Hence for continuous (false for discrete).
- Validity check ➔ (i) on its support, (ii) — improper integrals as limits.
- Both rules carry over unchanged ➔ and — integration replaces summation, densities replace masses.
4. cdf, survival, quantile, mode
- Cumulative distribution function ➔ , non-decreasing from to :
- Recover the density ➔ wherever is differentiable.
- Interval probability from the cdf ➔ — no integration needed once is known.
- Survival function ➔ ; the standard route into “at least / exceeds” questions and into conditional-tail problems.
- Quantile function (inverse cdf) ➔ — “find the with probability below it”. is the median, the first quartile, the third (feeds Measures of Spread and Boxplots).
- Mode (Def. 10) ➔ — returns the -value, not the probability (cf. Measures of Centrality).
📊 Exam Execution Trace & Applied Exercises
Manual Execution Trace — joint → marginals → conditionals → independence
Margins filled by the sum rule (bold):
| Step | Operation | Computation | Result |
|---|---|---|---|
| 1 | Sum rule over | ||
| 2 | Sum rule over | ||
| 3 | Conditional | ||
| 4 | Conditional | ||
| 5 | Independence | not independent |
Applied Exercise 1 — build a pmf by counting (two dice)
Problem: red + blue fair die; sum, max. All ordered outcomes equally likely ➔ count favourables.
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 5 | 4 | 3 | 2 | 1 |
Final Extracted Output: , since needs both dice ⟹ outcomes. Key move: enumerate the grid and count — or difference the cdf.
Applied Exercise 2 — validity, interval probability, cdf
Problem: for . (i) Is it a pdf? (ii) ? (iii) Find .
Final Extracted Output: on , otherwise; check agrees with (ii).
Applied Exercise 3 — piecewise pdf (wood strength, N/mm²)
Problem: on , on , elsewhere. Find . Key move: the interval straddles a breakpoint ➔ split at , use the branch valid on each piece.
Applied Exercise 4 — quantiles and a conditional tail (earthquake intensity)
Problem: with , . (i) Quartiles. (ii) .
Final Extracted Output: the tail is memoryless — surviving to gives no information about surviving a further . Key move: , so the intersection collapses to the smaller event before any algebra.
🖼️ Modelling application — generative AI
- Joint over images + tags ➔ image with tag vector ; the system models , then generates by conditioning on target tags and sampling — product rule on top, continuous sum rule underneath: the whole framework is these two rules on a huge event space.
⚠️ Common Mistakes
- 💡 A density is not a probability ➔ may exceed (Uniform on has ); only is a probability, and . Reading as “a 40% chance” scores zero.
- 💡 Marginalise the other variable ➔ comes from summing over ; summing over silently returns and poisons every conditional built on it.
- 💡 Conditioning divides by the marginal ➔ , needs — not the grand total .
- 💡 Independence is a factorisation, not intuition ➔ verify for all pairs, or exhibit one violating pair to disprove it.
- 💡 Split piecewise integrals at every breakpoint; and vs matters only for discrete , where includes the atom .
🧠 Active Recall
From a joint distribution , how do you obtain a marginal and a conditional, and when are independent?
Answer
- Short answer: marginal by the sum rule ; conditional by the product rule ; independent iff for all (equivalently ).
- Why: Sum rule removes a variable, product rule re-weights ➔ marginalising integrates out the unwanted variable; conditioning renormalises the joint by the probability of the conditioning event; independence is exactly the case where that renormalisation leaves unchanged.
Why is for a continuous RV allowed to exceed 1, and what does equal?
Answer
- Short answer: is a density, not a probability — only its integral over an interval is a probability, and that integral is bounded by . A single point has zero width, so .
- Why: Probability = area under ➔ formally, on we have as ; a tall narrow density can have while overall.
Given only the cdf , how do you obtain (a) , (b) the median, (c) the density, (d) ?
Answer
- Short answer: (a) ; (b) , solved by setting ; (c) ; (d) .
- Why: The cdf accumulates the density ➔ differencing recovers an interval’s mass, differentiating recovers the density pointwise, inverting answers “which value has probability below it”, and the complement gives the survival tail. Worked instance: , median .