Statistics (university) · Part 03
Random variables and discrete distributions
Turn random outcomes into numbers and model counts with standard distributions.
Last updated
- Random variableA random variable is a number that depends on chance. Its probability distribution lists every possible value and how likely each one is. The probabilities must add up to 1.
- Expected valueThe expected value E(X) is the long-run average of a random variable. Multiply each value by its probability and add the results. It need not be a value that can actually occur.
- Variance of a random variableThe variance Var(X) measures spread around the expected value: Var(X) = E(X squared) - (E(X))^2. The standard deviation is its square root.
- Linear rules for mean and varianceFor constants a and b: E(aX + b) = a E(X) + b, and Var(aX + b) = a squared x Var(X). Adding b shifts the centre only. For independent X and Y, Var(X + Y) = Var(X) + Var(Y).
- Binomial distributionThe binomial distribution counts successes in n independent trials, each with the same success chance p. P(X = k) = nCk x p^k x (1-p)^(n-k). The mean is np and the variance is np(1-p).
- Poisson distributionThe Poisson distribution counts events in a fixed time or space when they happen at a steady average rate lambda and independently. P(X = k) = e^(-lambda) x lambda^k / k!. Mean and variance both equal lambda.
- Geometric distributionThe geometric distribution models the number of trials until the first success, when each trial has success chance p. P(X = k) = (1-p)^(k-1) x p. The mean is 1/p.
- Cumulative distribution functionThe cumulative distribution function (CDF) gives P(X <= x), the chance the variable is at most x. You get it by adding the probabilities up to x. It never decreases and runs from 0 to 1.