- Describe a discrete random variable by its distribution and a continuous one by its density
- Compute the expectation, the variance and the standard deviation
- Apply the binomial, Poisson, uniform and normal distributions to typical problems
- Explain the law of large numbers and the central limit theorem, and use z-scores
A bank's call centre in Bakı receives on average 3 calls a minute. How likely is a minute with no calls at all, and how many operators are needed? How many students in a class of 30 will score above 90 points? Such questions are about random variables: numbers whose value depends on chance. Knowing their distribution lets us compute probabilities, averages and risks before the random experiment even happens.
Discrete and continuous random variables
A quantity X that takes a numerical value depending on the outcome of a random experiment. It is discrete if its values can be listed (number of heads, calls per minute) and continuous if it can take any value in an interval (height, waiting time).
A discrete random variable is given by its distribution law: the values xᵢ with their probabilities pᵢ = P(X = xᵢ), where all the pᵢ add up to 1. For example, let X be the number of heads in three tosses of a coin. Of the 8 equally likely outcomes, 1 gives 0 heads, 3 give 1 head, 3 give 2 heads and 1 gives 3 heads:
| xᵢ | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| pᵢ | 1/8 | 3/8 | 3/8 | 1/8 |
A continuous random variable has a probability density f(x) ≥ 0: probabilities are areas under its graph. The total area is 1, and the probability of one exact value is 0: P(X = 175 cm) = 0, and only intervals have positive probability.
- f(x)the probability density
- a, bthe ends of the interval
The integral of f over the whole number line equals 1.
Expectation and variance
- E(X) = μthe expectation (mean value)
- xᵢ, pᵢvalues and probabilities of a discrete variable
- f(x)the density of a continuous variable
The first formula is for discrete variables, the second for continuous ones. The expectation is the balance point of the distribution: the long-run average of many repetitions.
- Var(X)the variance: the mean squared deviation from the mean
- σthe standard deviation (in the same units as X)
The second form comes from expanding the square: E[(X − μ)²] = E(X²) − 2μ·E(X) + μ² = E(X²) − μ².
- a, bconstants
Always E(X + Y) = E(X) + E(Y); and Var(X + Y) = Var(X) + Var(Y) when X and Y are independent.
X is the number of heads in three tosses (table above). Find E(X), Var(X) and σ.
Show solutionHide solution
E(X²) = 0·1/8 + 1·3/8 + 4·3/8 + 9·1/8 = 24/8 = 3.
Var(X) = 3 − 1.5² = 3 − 2.25 = 0.75, σ = √0.75 ≈ 0.87.
On average 1.5 heads, a value X itself never takes: an expectation need not be a possible value.
At a fair you pay 2 manat and roll a die. A six wins 10 manat; otherwise you get nothing. What is your expected profit?
Show solutionHide solution
E(X) = 8·1/6 + (−2)·5/6 = 8/6 − 10/6 = −2/6 ≈ −0.33 manat.
On average you lose a third of a manat per game; over 300 games that is about 100 manat, which is the organiser's profit.
Discrete distributions: binomial and Poisson
- nthe number of independent trials
- pthe probability of success in one trial
- kthe number of successes, 0 ≤ k ≤ n
- C(n, k)the binomial coefficient n! / (k!(n − k)!)
The binomial distribution B(n, p): the number of successes in n independent trials with the same p.
A test has 5 questions with 4 options each. Murad picks every answer at random. Find the probability of exactly 3 correct answers and the expected number of correct answers.
Show solutionHide solution
C(5, 3) = 10, so P(X = 3) = 10 · (1/4)³ · (3/4)² = 10 · 1/64 · 9/16 = 90/1024 ≈ 0.088.
E(X) = np = 5 · 0.25 = 1.25, Var(X) = 5 · 0.25 · 0.75 ≈ 0.94.
The chance of 3 or more correct answers is only about 0.10: guessing is a poor strategy.
- λthe average number of events per unit of time (or space)
- kthe values 0, 1, 2, …
The Poisson distribution: the number of rare, independent events in a fixed time or area (calls, website visits, typing errors, radioactive decays).
A call centre receives on average 3 calls a minute (Poisson, λ = 3). Find the probability of a) no calls in a minute; b) exactly 3 calls; c) more than 2 calls.
Show solutionHide solution
b) P(3) = 3³ · e^(−3) / 3! = 4.5 · e^(−3) ≈ 0.224.
c) P(X > 2) = 1 − [P(0) + P(1) + P(2)] = 1 − e^(−3)(1 + 3 + 4.5) = 1 − 8.5e^(−3) ≈ 0.577.
In c) the complement saves us from adding infinitely many terms.
Continuous distributions: uniform and normal
- a, bthe ends of the interval (outside it f(x) = 0)
The uniform distribution: all parts of [a, b] of the same length are equally likely. Example: a bus comes every 10 minutes and you arrive at a random moment. The wait is uniform on [0, 10], 5 minutes on average, and P(wait > 7 min) = 3/10.
- μthe mean: the centre of the bell
- σthe standard deviation: the width of the bell
The normal (Gaussian) distribution N(μ, σ²): a symmetric bell-shaped curve.
- μ, σthe mean and standard deviation of the normal distribution
The 68–95–99.7 rule (three-sigma rule): almost all values lie within 3σ of the mean.
- zthe z-score: how many standard deviations x lies from the mean
- Φ(z)the standard normal distribution function: P(Z ≤ z), Z ~ N(0, 1)
Any normal X can be standardised: P(X ≤ x) = Φ((x − μ)/σ). By symmetry, Φ(−z) = 1 − Φ(z).
| z | Φ(z) = P(Z ≤ z) |
|---|---|
| 0 | 0.5000 |
| 0.5 | 0.6915 |
| 1 | 0.8413 |
| 1.5 | 0.9332 |
| 2 | 0.9772 |
| 2.5 | 0.9938 |
| 3 | 0.9987 |
Suppose the heights of young men are approximately N(175, 7²) cm. What share of them is a) taller than 189 cm; b) between 168 and 182 cm; c) shorter than 164.5 cm?
Show solutionHide solution
b) 168 and 182 are μ ± σ, so the share is about 68%.
c) z = (164.5 − 175)/7 = −1.5; P = Φ(−1.5) = 1 − Φ(1.5) = 1 − 0.9332 ≈ 6.7%.
The law of large numbers and the central limit theorem
The law of large numbers says that the average of many independent repetitions settles down to the expectation. That is why a casino, an insurance company or a bank can plan with averages, even though every single game or client is random.
- X₁, …, Xₙindependent repetitions with mean μ
- X̄ₙthe sample mean of n values
The central limit theorem goes further: the sum or average of many independent random variables is approximately normal, whatever their own distribution. This is why heights, measurement errors and exam totals, which add up many small effects, follow the bell curve. The spread of the average shrinks like σ/√n (the standard error of the mean).
- σ/√nσ/√nthe standard error of the mean
- nthe number of observations (in practice n ≥ 30 is usually enough)
100 dice are rolled. Estimate the probability that the total S is between 316 and 384.
Show solutionHide solution
For the total: E(S) = 100 · 3.5 = 350, Var(S) = 100 · 35/12 ≈ 291.7, σ(S) ≈ 17.1.
By the central limit theorem S is roughly normal, and 316 … 384 is 350 ± 34 ≈ μ ± 2σ. The probability is about 95%.
An exact computer calculation gives 95.7%, very close.
Key points
- A discrete X is given by a table (probabilities sum to 1), a continuous X by a density: probability is area and P(X = a) = 0.
- E(X) = ∑xᵢpᵢ; Var(X) = E(X²) − (E X)²; σ = √Var(X).
- E(aX + b) = a·E(X) + b and Var(aX + b) = a²·Var(X).
- Binomial: E = np, Var = np(1 − p); Poisson: E = Var = λ; uniform on [a, b]: E = (a + b)/2.
- Normal distribution: the 68–95–99.7 rule; z = (x − μ)/σ turns any normal variable into N(0, 1).
- Law of large numbers: averages → μ; central limit theorem: averages ≈ N(μ, σ²/n), and the error falls like 1/√n.
Check yourself
10 questions. Every correct answer earns XP.