Beautiful Math
Path

Probability & information · Lesson 2

Random variables and distributions

A random variable names a numerical outcome of chance. Its distribution (pmf for discrete cases) says how probability mass sits on those numbers - Bernoulli, binomial, and uniform as first citizens.

Core ~21 minDeep study ~62 minWhat does a pmf guarantee?When is binomial the right model?

Before this: Chance and probability

How this idea was born

Probability weights outcomes. Soon you need a cleaner habit: name a number produced by chance - profit, count, indicator of success - and describe how that number is distributed. Without that habit, every problem reinvents a new sample-space essay.
Jacob Bernoulli (1654-1705), in Ars Conjectandi, pushed the art of conjecture toward repeated trials and limit laws; MacTutor sketches the career and the posthumous publication path. Steal the ethic: repeated chance experiments are objects you can name, count, and bound. The Bernoulli trial (success/failure with fixed pp) is the seed crystal for the binomial count.
For a modern rereader, this chapter inserts between raw chance and Bayes/expectation. Discrete random variables and their pmfs are the portable language.

First principles

A random variable XX assigns a real number to each outcome in a sample space. Discrete XX takes a countable set of values. Its probability mass function (pmf) is
pX(x)=P(X=x),p_X(x) = P(X=x),
with pX(x)0p_X(x)\ge 0 and xpX(x)=1\sum_x p_X(x)=1.
Three first citizens:
  1. Bernoulli(pp): X{0,1}X\in\{0,1\} with P(X=1)=pP(X=1)=p. One trial's success bit.
  2. Binomial(n,pn,p): number of successes in nn independent Bernoulli(pp) trials:
P(X=k)=(nk)pk(1p)nk,k=0,,n.P(X=k)=\binom{n}{k}p^k(1-p)^{n-k},\quad k=0,\ldots,n.
  1. Discrete uniform on a finite set: equal mass on each listed value (fair die: 1/61/6 each).
Continuous distributions (densities) wait for later depth; the discrete pmf picture already carries enormous applied weight.

Worked intuition

A random variable is a numerical nickname for chance. The pmf is the histogram you would approach with infinite independent repeats (under the model).
Bernoulli is a coin with probability pp of heads, coded 11. Binomial is "how many heads in nn flips" when flips are independent and identically biased. Uniform is "no favorite among listed tickets."
If trials are not independent, or pp drifts, binomial is the wrong poem. Models are claims.
Algebrica's discrete RV, Bernoulli, binomial, and uniform pages are the formal companions with careful definitions.

Common confusions

Random variable as "unknown constant." It is a function of outcomes. After the experiment, you see a realization; before, you hold a distribution.
pmf values as outcomes. pX(3)=0.2p_X(3)=0.2 is a probability, not the claim that XX somehow equals 0.20.2.
Binomial without independence. The counting formula assumes independent trials with shared pp. Clustered defects need another model.
Uniform means "I know nothing" in every sense. Discrete uniform is a specific equal-weight claim on a listed set. Continuous uniform and discrete uniform differ. Ignorance can sometimes motivate uniform priors; that is a modeling choice, not a theorem of nature.
Bernoulli only for fair coins. pp can be any value in [0,1][0,1].
Distribution as destiny of one trial. The pmf organizes long-run frequencies or coherent weights; a single draw is still a single draw.

History & stories

Jacob Bernoulli's Ars Conjectandi is a founding text for moving probability toward general conjecture and limit theorems. MacTutor is the short biography. Later Laplacean classical probability and Kolmogorov's axioms reshape foundations; this chapter stays with discrete named variables and their masses.

Real world

Quality control counts defective items in a batch (binomial under i.i.d. assumptions). A/B tests tally conversions. Board games lean on uniform dice until the dice are worn.
Anytime you replace a verbal outcome ("success") with a number and a weight table, you are here.

Open when you want the machine-learning connection. Skip freely.

Field notes, extra examples, and glossary live here when you want more than the core path.

Carry this forward

  • Distributions make chance numerical and portable.
  • Bernoulli/binomial/uniform are the starter kit.
  • Next: update beliefs with conditioning and Bayes.

Read more

Go deeper when curiosity hits - videos, essays, and primary trails.

Check your understanding

A short learning loop - try a few, learn from misses, mark complete when you have engaged. No timer, no scoreboard.

1.A discrete random variable…
2.A pmf must…
3.Bernoulli(p) models…
4.Binomial(n,p) counts…
5.Discrete uniform means…

Try at least 3 core prompts, or choose I'll return later.