1. Random Variable
Definition — Random Variable
A random variable (RV) is a function that assigns a real number to each outcome in the sample space .
Capital letters () denote the variable; lower-case () denotes one of its values.
Definition — Discrete vs. Continuous RV
- Discrete: takes a finite or countably infinite set of values (counts).
- Continuous: takes values on an interval of real numbers (measurements).
Example. Toss a coin 3 times; = number of heads.
| Outcome | HHH | HHT | HTH | THH | HTT | THT | TTH | TTT |
|---|---|---|---|---|---|---|---|---|
| 3 | 2 | 2 | 2 | 1 | 1 | 1 | 0 |
Definition — Bernoulli RV
An RV taking only values 0 and 1 (failure/success).
2. Discrete Probability Distributions
Definition — Probability Mass Function (pmf)
is a pmf of a discrete RV if, for every possible :
Definition — Cumulative Distribution Function (discrete)
For a discrete RV, is a step function, jumping by at each possible value.
Worked Example — Three Coin Tosses
From the table above: .
.
Theorem — Getting the pmf Back from the CDF
For integer-valued : .
⚠️ With discrete RVs the endpoints matter: . Here .
3. Continuous Probability Distributions
Definition — Probability Density Function (pdf)
is a pdf of a continuous RV if:
- for all
- (area under the curve)
Theorem — Single Points Have Zero Probability
For a continuous RV, , hence
⚠️ is a density, not a probability: it may exceed 1 (e.g. uniform on has ). Only areas are probabilities.
4. Probability Density Function — Worked Example
Let for , and elsewhere.
Step 1 — find .
Step 2 — a probability.
5. Cumulative Distribution Function (continuous)
Definition — CDF of a Continuous RV
Theorem — Properties of
- is non-decreasing, ,
- wherever the derivative exists (Fundamental Theorem of Calculus)
Worked Example — CDF of the Example pdf
For :
so
Check: ✓. Also , so is the median (the pdf is symmetric about 1).
Comparison Table
| Discrete | Continuous | |
|---|---|---|
| Describes probabilities by | pmf | pdf (density) |
| Total | ||
| , may be | always | |
| CDF shape | step function | continuous curve |
| From CDF to |
⚠️ When computing piecewise, always state all three pieces (below, inside, above the support).