A random variable turns the result of an experiment into a number, like the pips that come up when you roll a die.
List the probability of each number in a table and you have a probability distribution, whose center of mass is exactly the expected value.
How spread out it is gets measured by variance and standard deviation, and counting successes over many independent trials gives the binomial distribution B(n, p).
Move the number of die faces to see where the expected value (the balance point) sits, then change the trial count n and success probability p to watch the peak of the bar graph shift.
Random Variables & Distributions
📊 What is a Probability Distribution?
①Random variable: numerical assignment to each outcome
②Distribution: probability of each value, given as a table or function
③Probabilities in a distribution table sum to 1
Expected Value & Variance
6
seegongsik.com
Expected value (center of mass) of a uniform distribution
Expected Value
E(X) = Σ xi × P(X = xi)
Mean of a random variable (center of mass)
Variance
V(X) = E(X2) − {E(X)}2
Mean of squared spread
Standard Deviation
σ(X) = √V(X)
Positive square root of variance
Binomial Distribution B(n, p)
6
5
seegongsik.com
PMF bar chart of B(n, p)
Binomial Probability
P(X = k) = nCk pk (1-p)n-k
Probability of k successes in n independent trials
Binomial Mean & Variance
E(X) = np, V(X) = np(1−p)
For B(n, p)
Properties of Distributions
Linearity of Expectation
E(aX + b) = aE(X) + b
Constants pass through linearly
Variance Property
V(aX + b) = a²V(X)
Adding a constant does not change variance
Work It Out
Example 1
A random variable X has P(X=0)=1/4, P(X=1)=1/2, P(X=2)=1/4. Find the expected value E(X).
1
The expected value multiplies each value by its probability and sums.
E(X) = Σ x · P(X = x)
2
Substitute.
= 0·(1/4) + 1·(1/2) + 2·(1/4) = 1
▸ E(X) = 1
The expected value is a weighted average of the values by their probabilities.
Example 2
For the same X, find the variance V(X). (E(X) = 1)
1
V(X) = E(X²) − {E(X)}². First find E(X²).
E(X²) = 0²·(1/4) + 1²·(1/2) + 2²·(1/4) = 3/2
2
Substitute.
V(X) = 3/2 − 1² = 1/2
▸ V(X) = 1/2
The variance subtracts the square of the mean from E(X²).
Wrap-up
Core
P(X=k) = nCk pk(1-p)n-k, E(X)=np
Binomial probability and expected value
KICE mock-exam Math (Probability & Statistics) type
For a random variable X with E(X) = 3, what is E(2X + 1)?