Skip to main content

Probability and Random Variables

Probability is the mathematical language for uncertain outcomes. It starts with sample spaces and events, then builds numerical rules for assigning likelihoods consistently. From there, random variables turn outcomes into numbers, distributions describe how probability is spread across those values, and expectation, variance, and dependence measure the main features of a model.

A Galton box diagram shows balls falling through pegs into bins.

Figure: A Galton box turns repeated random left-right choices into an approximate bell-shaped distribution. Image: Wikimedia Commons, Marcin Floryan, CC BY-SA 3.0.

Tree diagrams organize conditional probabilities for Bayes' theorem.

Figure: Probability trees make the conditioning structure in Bayes' theorem explicit. Image: Wikimedia Commons, Gnathan87, CC0 1.0.

The Monty Hall problem is shown with three doors and one open door.

Figure: The Monty Hall problem is a compact example of conditional probability and base-rate intuition. Image: Wikimedia Commons, Cepheus, public domain.

This section focuses on probability theory rather than statistical inference. It uses the probability, normal-distribution, and sampling-distribution material from Lane et al.'s Online Statistics Education where relevant, but it also fills in the standard probability topics needed for a rigorous introductory course: Kolmogorov axioms, conditional probability, named discrete and continuous distributions, joint distributions, transformations, generating functions, limit theorems, and Markov chains. When a topic becomes primarily statistical, such as confidence intervals or hypothesis tests based on normal, tt, chi-square, or FF distributions, the notes point to /math/statistics/ instead of duplicating that material.

Read the pages in order if you are learning probability for the first time. If you are reviewing, the distribution tables, worked examples, code snippets, visual anchors, and common-pitfall sections are designed to be usable as standalone references for homework, modeling, and exam review.

  1. Sample spaces, events, and axioms
  2. Conditional probability and Bayes' theorem
  3. Counting principles
  4. Random variables and distributions
  5. Common discrete distributions
  6. Common continuous distributions
  7. Expectation, variance, and moments
  8. Joint, marginal, and conditional distributions
  9. Covariance, correlation, and independence
  10. Functions of random variables
  11. Moment generating and characteristic functions
  12. Limit theorems
  13. Markov chains
  14. Probability pitfalls and intuition