Introduction to Probability

Random experiments, events, random variables, and the distributions that model them

1. Introduction

Probability is the mathematical language of uncertainty. It assigns numbers to events in a repeatable experiment so that long-run frequencies, fair bets, and physical noise can be reasoned about with the same calculus.

This note builds the subject from the ground up: a random experiment produces an outcome in a sample space; an event is a subset of that space; a probability is a consistent assignment of mass to events; a random variable turns outcomes into numbers, and a distribution tells us how those numbers are spread. We then study the three workhorse laws of an introductory course — the binomial, the Poisson, and the Gaussian — and the two numbers that summarise them, mean and variance.

How to read this page. Formulas sit in highlighted blocks. Interactive sliders rebuild the charts live. The 3-D panels can be dragged. A one-page formula recap is at the end.

2. Random Experiments

A random experiment is a well-defined, repeatable procedure whose outcome cannot be predicted with certainty, even though the set of possible outcomes is known in advance.

Repeatable

The same protocol can be run again under essentially identical conditions (toss, roll, count, measure).

Uncertain outcome

Before the trial we do not know which elementary result will occur — only the catalogue of possibilities.

Identifiable results

Each run ends in a definite, observable outcome (heads, a face of a die, a count, a measured length).

Classic experiments

  • Toss a fair coin once, or n times.
  • Roll one fair die, or a pair of dice.
  • Draw a card from a shuffled deck.
  • Count decays from a radioactive sample in one second.
  • Measure the landing position of a dart, or a voltage with thermal noise.

The first four have a discrete list of outcomes; the last has a continuum. That distinction will reappear as discrete versus continuous random variables.

A pair of fair dice — the prototype random experiment. Press “Roll the dice”; drag to inspect.

3. Sample Space

The sample space Ω (omega) is the set of all possible outcomes of the experiment. Each element ω ∈ Ω is an elementary outcome (or sample point).

Discrete sample spaces

Finite or countably infinite. Coin: Ω = {H, T}. One die: Ω = {1,2,3,4,5,6}. Two distinguishable dice: Ω = {(i, j) : i, j = 1…6}, so |Ω| = 36.

Continuous sample spaces

Uncountable. Lifetime of a bulb: Ω = [0, ∞). Impact position on a target: Ω ⊂ ℝ². Probability of a single point is typically zero; mass lives on intervals and regions.

Modelling choice. The sample space is part of the model, not of nature. “Sum of two dice” uses a 11-point space {2,…,12} that is not equally likely; “ordered pair of faces” uses 36 equally likely points. The second is usually the better Ω.

Two-dice sample space: each cube is one outcome (i, j). Highlight an event; |E|/36 is the classical probability.

4. Events

An event is a subset E ⊆ Ω — a statement about the outcome that is either true or false after the experiment is performed.

4.1 Relations among events

Mutually exclusive

E ∩ F = ∅. They cannot occur together. Disjoint dice events: “sum = 2” and “sum = 12”.

Exhaustive

E1 ∪ … ∪ Ek = Ω. Together they cover every outcome. Faces {odd} and {even} on one die.

Independent

Knowledge of F does not change the chance of E: P(E ∩ F) = P(E) P(F). Two successive fair coin tosses.

Two-dice events

Let A = {first die even}, B = {sum = 7}, C = {doubles}. Then |A| = 18, |B| = 6, |C| = 6, A ∩ B = {(2,5),(4,3),(6,1)} so |A ∩ B| = 3. A and B are independent: 18/36 × 6/36 = 3/36.

5. Probability

A probability is a function P that assigns to each event a number in [0, 1] in a way that matches the long-run frequency of that event.

5.1 Kolmogorov axioms

P(E) ≥ 0 ,    P(Ω) = 1 ,    P(E ∪ F) = P(E) + P(F)   if E ∩ F = ∅

Countable additivity extends the third axiom to a sequence of pairwise disjoint events. Immediate consequences:

P(Ec) = 1 − P(E) ,    P(∅) = 0 ,    P(E ∪ F) = P(E) + P(F) − P(E ∩ F)

5.2 Classical (Laplace) assignment

If Ω is finite and every elementary outcome is equally likely,

P(E) = |E| / |Ω| = (number of favourable outcomes) / (number of possible outcomes)

5.3 Frequentist meaning

If the experiment is repeated independently n times and the event occurs Nn times, then

P(E) = limn → ∞ Nn / n

The running relative frequency of heads in fair coin tosses jitters around 1/2 and settles there — the law of large numbers made visible.

One simulated sequence of 400 fair coin tosses. The relative frequency of heads converges to 1/2 (dashed).

5.4 Conditional probability

P(E | F) = P(E ∩ F) / P(F)    (P(F) > 0)

Independence is the special case P(E | F) = P(E). Bayes’ rule reverses the conditioning:

P(F | E) = P(E | F) P(F) / P(E)

6. Random Variables

A random variable is a numerical function of the outcome: X : Ω → ℝ. We never need the inner details of Ω once we know how X is distributed.

Discrete random variable

X takes a countable set of values {xk}. It is described by a probability mass function (PMF)

pX(x) = P(X = x) ,    Σx pX(x) = 1

Examples: die face, number of heads, number of arrivals.

Continuous random variable

X has a probability density function (PDF) fX with

P(a ≤ X ≤ b) = ∫ab fX(x) dx ,    ∫−∞∞ f = 1

A single point has probability zero. Examples: noise voltage, measurement error, waiting time.

The cumulative distribution function (CDF) FX(x) = P(X ≤ x) exists in both cases: it is a step function for a discrete X and a smooth increasing function (the integral of the PDF) for a continuous X.

Two-dice illustration. On Ω = {1,…,6}² let X = i + j (the sum) and Y = i (the first face). X is discrete on {2,…,12} with a triangular PMF; Y is uniform on {1,…,6}. Different variables, same experiment.

7. Discrete Distributions — the Binomial

The simplest discrete law is the Bernoulli trial: one success/failure experiment with P(success) = p. A random variable X ~ Bernoulli(p) satisfies

P(X = 1) = p ,    P(X = 0) = 1 − p ,    E[X] = p ,    Var(X) = p(1 − p)

7.1 Binomial law

Repeat the Bernoulli trial independently n times and let X be the number of successes. Then X follows the binomial distribution Binomial(n, p):

P(X = k) = C(n, k) pk (1 − p)n − k ,    k = 0, 1, …, n

C(n, k) = n! / (k! (n − k)!) ,    E[X] = n p ,    Var(X) = n p (1 − p)

Why the formula?

Any particular sequence with k successes and n − k failures has probability pk(1 − p)n − k. There are C(n, k) such sequences, and they are disjoint, so the probabilities add.

E[X] = 10.00 , Var(X) = 5.00

Binomial PMF. Drag n and p. For large n and p near 1/2 the histogram approaches a Gaussian bell (De Moivre–Laplace).

Galton board (quincunx). Each peg is a fair Bernoulli trial; the bin index is Binomial(rows, 1/2). Many balls reconstruct the bell.

8. The Poisson Distribution

The Poisson law models a count of rare, independent events in a fixed interval of time or space — arrivals, decays, defects, misprints.

Discrete, not continuous. Poisson is supported on k = 0, 1, 2, …. Syllabi often list it beside the Gaussian because both arise as limits of the binomial; the Gaussian is the continuous limit, Poisson the rare-event limit.

P(X = k) = e−λ λk / k! ,    k = 0, 1, 2, …

E[X] = λ ,    Var(X) = λ

The single parameter λ > 0 is both the mean and the variance. That “equal scatter” is a diagnostic: counts whose sample variance greatly exceeds the sample mean are over-dispersed and not Poisson.

8.1 Poisson as a binomial limit

Let Xn ~ Binomial(n, pn) with n pn → λ as n → ∞ and pn → 0 (many trials, each rarely a success). Then

P(Xn = k) → e−λ λk / k!

Worked numbers

A sample of 800 chips, each defective with probability 0.005, independently. Then n p = 4. The number of defectives is essentially Poisson(λ = 4), so P(X = 0) ≈ e−4 ≈ 0.0183, P(X ≤ 2) ≈ 0.238.

E[X] = 4.00 , Var(X) = 4.00

Poisson PMF. For larger λ the mass spreads and becomes more symmetric — another road toward the Gaussian.

9. Continuous Distributions — the Gaussian

The Gaussian (normal) density on the real line is

f(x) = 1 / (σ √(2π)) · exp( − (x − μ)² / (2σ²) ) ,    x ∈ ℝ

E[X] = μ ,    Var(X) = σ²

μ locates the peak; σ stretches it. We write X ~ N(μ, σ²). The standard normal is Z ~ N(0, 1); any Gaussian is a location-scale copy X = μ + σ Z.

9.1 Empirical rule

These are the familiar 68–95–99.7 percentages. They are why “within two standard deviations” is a default error bar.

9.2 Central limit theorem (the reason it is everywhere)

If X1, …, Xn are i.i.d. with finite mean μ and variance σ², then

(X1 + … + Xn − nμ) / (σ √n)   →   N(0, 1)

in distribution as n → ∞. Sums of independent noise, measurement averages, binomial counts with large n — all become Gaussian. The Galton board is a mechanical CLT.

E[X] = 0.00 , Var(X) = 1.00  |  P(|X−μ|≤σ) ≈ 0.68

Gaussian PDF. Shaded band is μ ± σ. Move the mean (slide) and the width (σ).

Bivariate isotropic Gaussian as a surface z ∝ exp(−(x² + y²)/(2σ²)). Drag to rotate; the level curves are circles.

10. Mean and Variance

The mean (expectation) is the probability-weighted average of X — the centre of mass of the distribution. The variance is the expected squared deviation from that centre — the moment of inertia of the same mass distribution.

10.1 Definitions

Discrete:   E[X] = Σx x p(x) ,    E[g(X)] = Σx g(x) p(x)

Continuous:   E[X] = ∫ x f(x) dx ,    E[g(X)] = ∫ g(x) f(x) dx

Var(X) = E[(X − E[X])²] = E[X²] − (E[X])² ,    σ = √Var(X)

10.2 Algebra that is used constantly

E[aX + b] = a E[X] + b ,    Var(aX + b) = a² Var(X)

If X, Y independent:   E[XY] = E[X] E[Y] ,    Var(X + Y) = Var(X) + Var(Y)

Adding a constant shifts the mean and leaves the variance alone. Scaling by a scales the mean by a and the variance by a² (standard deviation by |a|).

The three running examples

Bernoulli(p):   mean p ,   variance p(1 − p)

Binomial(n, p):   mean n p ,   variance n p (1 − p)

Poisson(λ):   mean λ ,   variance λ

Gaussian N(μ, σ²):   mean μ ,   variance σ²

Matched means near 8: Binomial(20, 0.4), Poisson(8), Gaussian N(8, 4.8). Poisson is over-dispersed relative to the binomial with the same mean; the Gaussian here copies the binomial’s variance.

Chebyshev’s inequality (distribution-free): P(|X − μ| ≥ k σ) ≤ 1/k². For k = 2 at most 25% of the mass can lie beyond two standard deviations — the Gaussian, at about 5%, is much tighter. Mean and variance always give a coarse control on tails.

11. Quick Recap

Everything in one pass. Keep this section nearby while solving problems.

Experiment → Ω → event

Repeatable uncertain procedure. Ω = all outcomes. Event E ⊆ Ω. Complement, union, intersection. Exclusive ⇔ disjoint.

Axioms & classical P

P ≥ 0, P(Ω)=1, additivity

P(E) = |E|/|Ω|

when outcomes are equally likely. Frequency: Nn/n → P(E).

Conditioning

P(E|F) = P(E∩F)/P(F)

Independent ⇔ P(E∩F)=P(E)P(F). Bayes reverses the bar.

Random variable

X : Ω → ℝ. Discrete: PMF p(x), Σ p = 1. Continuous: PDF f(x), ∫ f = 1, P(a,b)=∫ab f.

Binomial(n, p)

C(n,k) pk(1−p)n−k

mean np , var np(1−p)

Count of successes in n independent Bernoulli trials.

Poisson(λ) — discrete

e−λ λk / k!

mean = var = λ

Rare-event / binomial limit n→∞, p→0, np→λ.

Gaussian N(μ, σ²)

f ∝ exp(−(x−μ)²/(2σ²))

mean μ , var σ²

68–95–99.7 rule. CLT: sums become Gaussian.

Mean & variance

E[aX+b]=aE[X]+b

Var(aX+b)=a² Var(X)

Independent: variances add. Var = E[X²] − (E[X])².

Limit picture to remember. Bernoulli → (n trials) Binomial → (n large, p fixed) Gaussian; Binomial → (n large, p small, np = λ) Poisson → (λ large) Gaussian. One family of counting models, two different limits, one universal bell.

12. Closing remarks

Probability starts as counting in a well-chosen sample space and becomes a calculus of random variables once a PMF or PDF is written down. The binomial is the law of repeated independent trials; the Poisson is the law of rare independent counts; the Gaussian is the law of aggregated independent noise. Mean and variance are the two-number summary that those three — and essentially every other law in this course — carry.

From here the natural sequels are jointly distributed variables, covariance, moment generating functions, and the formal statement of the law of large numbers and the CLT.