Discrete random variables
Discrete random variables
- A discrete random variable $X$ takes separate values, each with a probability (they sum to 1).
- Expectation (mean): $E(X) = \sum x\,P(X = x)$.
- Variance: $\text{Var}(X) = \sum x^2\,P(X = x) - \big(E(X)\big)^2$.
Practice
In a probability distribution table, the probabilities must add up to 1.
A valid distribution has all probabilities summing to 1.
Two models
- Binomial $X \sim B(n, p)$ — successes in $n$ trials: $P(X = r) = \dbinom{n}{r}p^r(1-p)^{n-r}$, with $E(X) = np$, $\text{Var}(X) = np(1-p)$.
- Geometric — the trial of the first success: $P(X = r) = (1-p)^{r-1}p$, with $E(X) = \dfrac{1}{p}$.
Practice
For X ~ B(10, 0.3), what is E(X) = np?
E(X) = np = 10 × 0.3 = 3.
Practice
For X ~ B(10, 0.3), what is Var(X) = np(1−p)?
Var(X) = np(1−p) = 10 × 0.3 × 0.7 = 2.1.
You've got it
Key idea
- $E(X) = \sum x\,P(X=x)$; $\text{Var}(X) = \sum x^2 P(X=x) - (E(X))^2$
- binomial $B(n,p)$: $E = np$, $\text{Var} = np(1-p)$
- geometric: first success on trial $r$, $E = \dfrac1p$