Skip to content

Chapter 3 of 8

Random Variables and Probability Distributions

A random variable assigns a numerical value to each outcome in a sample space, transforming random experiments into quantities we can analyze. Random variables are either discrete, taking a finite or countable set of values, or continuous, taking any value in an interval. For discrete variables, the probability mass function (PMF) gives \(P(X = x)\) for each possible x; these probabilities must be non-negative and sum to one. For continuous variables, the probability density function (PDF) describes the distribution, and probabilities are obtained as areas under the curve: \(P(a \leq X \leq b) = \int_a^b f(x) \, dx\). Although a PDF can exceed one at a single point, the total area under the curve must equal one. Both types are unified by the cumulative distribution function (CDF), \(F(x) = P(X \leq x)\), which is non-decreasing and ranges from zero to one.

The expected value \(E(X)\) represents the long-run average of a random variable, also called the population mean \(\mu\). For discrete distributions, \(E(X) = \sum x_i P(x_i)\), and for continuous distributions, \(E(X) = \int x f(x) \, dx\). Variance quantifies spread around the mean through the identity \(\text{Var}(X) = E(X^2) - [E(X)]^2\), and important properties include \(\text{Var}(aX + b) = a^2 \text{Var}(X)\) and, for independent variables, \(\text{Var}(X + Y) = \text{Var}(X) + \text{Var}(Y)\). Variance is always non-negative and equals zero only when X is constant.

Several named distributions appear repeatedly in applications. The binomial distribution models the number of successes in n independent trials, each with the same success probability p, and has PMF \(P(X = k) = \binom{n}{k} p^k (1 - p)^{n - k}\) with mean \(np\) and variance \(np(1 - p)\). A binomial experiment requires a fixed number of trials, two outcomes per trial, constant probability of success, and independence. The Poisson distribution models the count of events in a fixed interval when events occur independently and at a constant average rate \(\lambda\), with PMF \(P(X = k) = \lambda^k e^{-\lambda} / k!\) and both mean and variance equal to \(\lambda\). When n is large and p is small (typically \(n \geq 20\) and \(p \leq 0.05\)), the Poisson with \(\lambda = np\) provides an excellent approximation to the binomial. The geometric distribution gives the number of trials until the first success, with PMF \(P(X = k) = (1 - p)^{k-1} p\), mean \(1/p\), variance \((1 - p) / p^2\), and the memoryless property.

For continuous settings, the uniform distribution assigns equal density to all values in \([a, b]\) with PDF \(f(x) = 1 / (b - a)\), mean \((a + b) / 2\), and variance \((b - a)^2 / 12\). The exponential distribution models waiting times between events in a Poisson process, with PDF \(f(x) = \lambda e^{-\lambda x}\) for \(x \geq 0\), mean \(1/\lambda\), variance \(1/\lambda^2\), and the memoryless property \(P(X > s + t \mid X > s) = P(X > t)\). The normal (Gaussian) distribution is the most important continuous distribution, with PDF \(f(x) = \frac{1}{\sigma \sqrt{2\pi}} e^{-(x - \mu)^2 / (2\sigma^2)}\) and the empirical rule that approximately 68% of data falls within one standard deviation of the mean, 95% within two, and 99.7% within three. The standard normal distribution, with mean zero and standard deviation one, serves as a reference: any normal variable can be standardized using \(Z = (X - \mu) / \sigma\), after which probabilities are read from a z-table or computed by software.

All chapters
  1. 1Descriptive Statistics: Summarizing Data
  2. 2Foundations of Probability
  3. 3Random Variables and Probability Distributions
  4. 4Sampling Distributions and the Central Limit Theorem
  5. 5Confidence Intervals
  6. 6Hypothesis Testing
  7. 7Correlation, Regression, and Causal Inference
  8. 8Study Design and Sources of Bias

Drill it

Reading is not remembering. These come from the Statistics And Probability deck:

Q

What is the <b>mean</b> of a dataset?

The mean is the arithmetic average, calculated by summing all values and dividing by the number of values. Formula: x̄ = Σxᵢ / n. It is sensitive to outliers an...

Q

What is the <b>median</b> and when is it preferred over the mean?

The median is the middle value when data is sorted in order. For an even number of observations, it is the average of the two middle values. It is preferred ove...

Q

What is the <b>mode</b> of a dataset?

The mode is the value that appears most frequently in a dataset. A dataset can be unimodal (one mode), bimodal (two modes), or multimodal (more than two modes)....

Q

What is <b>standard deviation</b> and what does it measure?

Standard deviation measures the average amount of dispersion or spread in a dataset relative to the mean. A low standard deviation indicates data points are clo...