Business Statistics
Discrete Random Variables
David Lander
Peking University
HSBC Business School
UK Campus
Module 1, 2026–27
Roadmap for “probability”
1. Fundamentals
2. Discrete random variables
3. Continuous random variables
David Lander
Business Statistics
Discrete Random Variables
2 / 33
Last class
• Independence
◦ Dependence (does not imply causation)
• Conditional probability
◦ Probabilities given that another event occurs
◦ Reduced sample space
• Bayes’ theorem
◦ Prior and posterior probabilities
David Lander
Business Statistics
Discrete Random Variables
3 / 33
This class
• Introduce discrete random variables
◦ Define a discrete random variable
◦ Determine and plot the distribution of a random variable
◦ Become familiar with the binomial distribution
• Determine the expected value of a random variable
◦ Compute mean, variance, and standard deviation
David Lander
Business Statistics
Discrete Random Variables
4 / 33
Discrete random variables
Random variables
• A random variable assigns a numerical value to each possible
outcome of a random process (or experiment)
• We usually denote these using capital letters, e.g., X , Y , Z
• And the values that these variables may take, we denote by the
corresponding lower case letters
◦ e.g., x (for X ), y (for Y ), z (for Z )
• Examples:
◦ X = 1 if a coin lands heads, and X = 0 if it lands tails
◦ The proportion of heads in a fixed number n of coin tosses
David Lander
Business Statistics
Discrete Random Variables
6 / 33
Random variables: example
• Consider an experiment of tossing two coins
• Suppose we are interested in the number of heads that occur
• We can define a (random) variable to study this specific event
◦ Let X represent the number of heads that occurs
▷ X can only take on the values 0, 1, 2
▷ We write X ∈ {0, 1, 2} to describe its possible values
◦ Therefore, we are interested in the events X = 0, X = 1, and X = 2
• Since the outcome (i.e., number of heads) entails uncertainty, the
value of X is uncertain; hence, we call X a random variable
David Lander
Business Statistics
Discrete Random Variables
7 / 33
Discrete random variables
• A random variable is called a discrete random variable if it
assumes only a finite number of values
◦ Or if its values can be placed in one-to-one correspondence with
the positive integers
• We will study continuous random variables later
• Examples:
1. Suppose a die is rolled and X is the number that turns up. Then X
is a random variable, and X ∈ {1, 2, 3, 4, 5, 6}
2. Suppose a coin is successively tossed until a head appears. If Y is
the number of such tosses, then Y is a random variable and
Y ∈ {1, 2, 3, . . .}
David Lander
Business Statistics
Discrete Random Variables
8 / 33
Distribution of a discrete random variable
• If X is a random variable, the probability of the event that X
assumes the value x is denoted P(X = x)
◦ Similarly, we can consider the probabilities of events, such as X ≤ x
or X > x
• If X is discrete, then the function f (·) that assigns the number
P(X = x) to each possible value of X is called the probability
mass function (or the pmf) of the random variable X :
f (x) = P(X = x)
• We can describe this by saying that “f (x) is the probability that X
takes the value x”
David Lander
Business Statistics
Discrete Random Variables
9 / 33
Distribution of a discrete random variable
• Suppose X counts the number of heads when two fair coins are
tossed independently; determine the distribution of X
• Goal: find the probabilities of the events X = 0, X = 1, and X = 2
• Our usual equiprobable sample space is S = {HH, HT , TH, TT }
• Hence, we have the following events:
◦ The event X = 0 is {TT }, with probability 14
◦ The event X = 1 is {HT , TH}, with probability 12
◦ The event X = 2 is {HH}, with probability 41
• Hence, if f (·) is the distribution of X , i.e., f (x) = P(X = x), then
f (0) =
David Lander
1
4
f (1) =
Business Statistics
1
2
f (2) =
1
4
Discrete Random Variables
10 / 33
Distribution of a discrete random variable
• We can plot the distribution of X :
Figure: Graph of the distribution of X
David Lander
Business Statistics
Discrete Random Variables
11 / 33
Distribution of a discrete random variable
• We can plot the histogram of X :
Figure: Probability histogram of X
David Lander
Business Statistics
Discrete Random Variables
12 / 33
Distribution of a discrete random variable
• Note, in this example, if we sum the probabilities:
2
X
f (x) = f (0) + f (1) + f (2) =
x=0
1 1 1
+ + =1
4 2 4
• This property holds for every probability mass function
• For any probability mass function f (·), we have 0 ≤ f (x) ≤ 1 for all
P
x, and x f (x) = 1
• This also means that the sum of the areas of the rectangles in a
probability histogram equals 1
◦ This is important, and it will appear again when we consider
continuous random variables (later)
David Lander
Business Statistics
Discrete Random Variables
13 / 33
Expectations
• The distribution for a random variable X gives the relative
frequencies of the values of X in the long run
• It is often very useful to determine the “average” value of X in the
long run
• We call this the expected value of X (or taking expectations of X ):
X
E(X ) =
xf (x)
x
• Note that this is the mean of X , which we often refer to by the
Greek letter µ (“mu”)
◦ We write µ = E(X ) for the mean of X
◦ This is interpreted as the average value of X in the long run
• We consider discrete random variables whose means and
variances are finite
David Lander
Business Statistics
Discrete Random Variables
14 / 33
Expectations
• If X takes the n distinct values x1 , x2 , . . . , xn with equal probability,
f (xi ) = n1 for i = 1, 2, . . . , n, then:
µ=
X
xf (x) =
x
n
X
i=1
n
xi
1
1X
=
xi
n
n
i=1
• Which takes the familiar form of a simple average
• In general, when we are not dealing with equiprobable outcomes,
P
the sum, x xf (x), is in fact a weighted average, where the
weights are the probabilities, f (x)
◦ Recall:
David Lander
P
x f (x) = 1, hence the “weights” indeed sum to 1
Business Statistics
Discrete Random Variables
15 / 33
Expectations: example
• Going back to our example:
X ∈ {0, 1, 2}, with f (0) =
1
1
1
, f (1) = , f (2) =
4
2
4
• The expected value of X is:
E(X ) =
2
X
x=0
1
1
1
xf (x) = (0) + (1) + (2) = 1
4
2
4
• If we repeat this two-coin experiment independently many times,
the average number of heads per trial (two coin tosses)
approaches 1
David Lander
Business Statistics
Discrete Random Variables
16 / 33
Expectations: example
• The mean E(X ) = 1 is a property of the distribution; the observed
average in a finite sample need not equal 1
• In n independent repetitions of the two-coin experiment, let ki be
the number of trials with X = i. The observed average is:
(0)k0 + (1)k1 + (2)k2
k0
k1
k2
= (0) + (1) + (2)
n
n
n
n
• The ratios kn0 , kn1 , kn2 are the relative frequencies of the events
X = 0, X = 1, and X = 2, respectively
• As the number of trials (n), increases, we expect:
k0
1
→ ,
n
4
David Lander
k1
1
→ ,
n
2
Business Statistics
k2
1
→
n
4
Discrete Random Variables
17 / 33
Measures of central tendency
• Since E(X ) is the average value of X in the long run, it is a
commonly-used measure of the central tendency of X
• In simple terms, it provides us with a value, µ, which lies near the
“center” of the distribution of X
◦ To be precise, the mean µ summarises the distribution using a
probability-weighted average of its possible values; it need not be a
value that X can actually take
• It, however, does not tell us about the dispersion (or spread) of X
◦ This refers to how “stretched out” (or “wide”) the distribution of X is
David Lander
Business Statistics
Discrete Random Variables
18 / 33
Measures of central tendency
• Consider two random variables, X and Y , with distributions f (x)
and g(y), respectively:
Figure: Probability distributions for X and Y
• These distributions are clearly different, particularly in terms of
dispersion
David Lander
Business Statistics
Discrete Random Variables
19 / 33
Measures of dispersion: variance
• There are various ways to measure dispersion for a random
variable X
• The most commonly-used measures of dispersion are the
standard deviation and variance of X
• The variance of X is defined as:
Var(X ) = E((X − µ)2 ) =
X
(x − µ)2 f (x)
x
• It is the long-run average of the squares of the deviations of X
from µ
• In other words, for the variance we can consider a different
random variable, Y = (X − µ)2 (and take expectations of that)
David Lander
Business Statistics
Discrete Random Variables
20 / 33
Measures of dispersion: variance
• We can write a simpler expression for the variance:
X
Var(X ) =
(x − µ)2 f (x)
x
X
=
(x 2 − 2xµ + µ2 )f (x)
x
X
=
(x 2 f (x) − 2xµf (x) + µ2 f (x))
=
=
x
X
x
X
x 2 f (x) − 2µ
X
xf (x) + µ2
x
X
f (x)
x
x f (x) − 2µ(µ) + µ (1)
2
2
x
=
X
x 2 f (x) − µ2
x
= E(X 2 ) − [E(X )]2
David Lander
Business Statistics
Discrete Random Variables
21 / 33
Measures of dispersion: standard deviation
• Since (X − µ)2 is involved in Var(X ), and both X and µ have the
same units of measurement, the units of Var(X ) are those of X 2
◦ e.g., if X is measured in dollars, then Var(X ) is measured in dollars
squared
• It is often convenient to have a measure of dispersion in the same
units as X
• Therefore, the standard deviation of X is often used:
σ = σ(X ) =
p
Var(X )
• Which is usually denoted by the Greek letter σ (“sigma”)
• It immediately follows that σ2 = Var(X ) (“sigma squared”)
David Lander
Business Statistics
Discrete Random Variables
22 / 33
Chebyshev’s inequality
• Suppose X has a finite mean µ and a finite, positive standard
deviation σ
• Chebyshev’s inequality states that, for k > 1:
P(X ∈ (µ − k σ, µ + k σ)) ≥
k2 − 1
1
=1− 2
k2
k
• For example, taking k = 2 gives:
P(µ − 2σ < X < µ + 2σ) ≥
3
4
• Thus, the probability of falling within two standard deviations of the
mean is at least 34
• This bound applies regardless of the shape of the distribution
David Lander
Business Statistics
Discrete Random Variables
23 / 33
Binomial distribution
• We will begin our study of specific probability distributions by
considering the binomial distribution
• A Bernoulli trial is a single trial with two possible outcomes:
◦ Success (S), with probability p
◦ Failure (F ), with probability 1 − p
• A binomial experiment consists of:
◦ A fixed number n of Bernoulli trials
◦ Independent trials
◦ The same success probability p on every trial
• This applies to a wide range of random processes characterised
by binary outcomes
David Lander
Business Statistics
Discrete Random Variables
24 / 33
Binomial distribution
• A binomial random variable counts the number of successes in
n independent Bernoulli trials with the same success probability p
• Examples:
◦ The number of heads in n independent tosses of a coin with a fixed
probability of heads
◦ The number of sixes in n independent rolls of a fair die, with
success probability p = 61
• The latter example reveals that random processes with several
(i.e., more than 2) outcomes may nonetheless generate (binary)
events that follow a Binomial distribution
David Lander
Business Statistics
Discrete Random Variables
25 / 33
Binomial distribution
• Consider n = 3 trials; let R denote the number of successful
outcomes
• What is the probability of three successes? (SSS)
◦ P(R = 3) = (S ∩ S ∩ S) = P(S)P(S)P(S) = p · p · p = p3
• What is the probability of two successes and one failure? (SSF )
◦ P(R = 2) = P(S)P(S)P(F ) = p · p · (1 − p) = p2 (1 − p)1
• What is the probability of one success and two failures? (SFF )
◦ P(R = 1) = P(S)P(F )P(F ) = p · (1 − p) · (1 − p) = p(1 − p)2
• A pattern emerges: for n trials, with r successes
◦ P(R = r ) = pr (1 − p)n−r
David Lander
Business Statistics
Discrete Random Variables
26 / 33
Binomial distribution
• But we’re missing something; consider n = 2 trials
• For 1 success and 1 failure, there are two possible outcomes:
◦ SF and FS, each occurring with probability p · (1 − p)
• Therefore, the probability of exactly one successful outcome is
2p(1 − p)
• In the previous slide we did not take into account all the possible
combinations
◦ Recall the example of a coin toss, where the outcomes are
{HH, TH, HT , TT }
David Lander
Business Statistics
Discrete Random Variables
27 / 33
Permutations with repeated objects
• We will state the result and then demonstrate it with an example
• The number of distinguishable permutations of n objects such that
n1 are of one type, n2 are of a second type, . . . , and nk are of a
k th type, where n1 + n2 + . . . + nk = n, is
n!
n1 !n2 ! . . . nk !
• Note: each “type” is a unique outcome
• In the special case where we have a binary outcome, then the
number of permutations becomes n1n!
!n2 ! , where n1 + n2 = n
• So, if we substitute n1 = r into the above equation:
n!
n!
=
= n Cr
n1 !n2 !
r !(n − r )!
David Lander
Business Statistics
Discrete Random Variables
28 / 33
Permutations with repeated objects: example
• Therefore, for a Bernoulli trial, we can determine the number of
permutations with repeated objects simply by determining the
combinations (n Cr )
• If we want to know how many combinations of a specific event can
arise in an experiment, e.g., two successes and one failure, we
3!
calculate 3 C2 = 2!1!
=3
◦ Here n is the number of trials, and r is the number of successes
◦ This exercise is simply re-ordering SSF in every possible
combination: SSF , SFS, FSS
David Lander
Business Statistics
Discrete Random Variables
29 / 33
Binomial distribution
• If X is the number of successes in n independent trials of a
binomial experiment with probability p of success and (1 − p) of
failure on any trial, then the distribution f for X is given by:
f (x) = P(X = x) = n Cx px (1 − p)n−x
◦ Where x is an integer such that 0 ≤ x ≤ n
• Any random variable with this distribution is called a binomial
random variable and is said to have a binomial distribution
• The mean and standard deviation of X are given by:
µ = np,
David Lander
σ=
Business Statistics
p
np(1 − p)
Discrete Random Variables
30 / 33
Binomial distribution: example
• Suppose X is a binomial random variable with n = 4 and p = 13
• Find the distribution for X :
4!
16
16
P(X = 0) = 4 C0 ( 31 )0 ( 23 )4 = 0!4!
· 1 · 16
81 = 1 · 1 · 81 = 81
4!
8
8
· 13 · 27
= 4 · 13 · 27
= 32
P(X = 1) = 4 C1 ( 31 )1 ( 23 )3 = 1!3!
81
4!
8
P(X = 2) = 4 C2 ( 31 )2 ( 23 )2 = 2!2!
· 19 · 49 = 6 · 91 · 49 = 27
4!
1
1
8
P(X = 3) = 4 C3 ( 31 )3 ( 23 )1 = 3!1!
· 27
· 23 = 4 · 27
· 23 = 81
4!
1
1
1
P(X = 4) = 4 C4 ( 13 )4 ( 23 )0 = 4!0!
· 81
· 1 = 1 · 81
· 1 = 81
• µ = np = 4( 13 ) = 43 , and
q
q
√
p
σ = np(1 − p) = 4 · 31 · 23 = 89 = 2 3 2
David Lander
Business Statistics
Discrete Random Variables
31 / 33
Binomial distribution: example
• We can plot the probability histogram:
Figure: Binomial distribution, with n = 4 and p = 31 .
David Lander
Business Statistics
Discrete Random Variables
32 / 33
Recap
• Discrete random variable, X
• Probability mass function (pmf): f (x) = P(X = x)
• Expectations, mean, variance, and standard deviation
P
◦ µ = E(X ) = x xf (x)
P
◦ σ2 = Var(X ) = E((X − µ)2 ) = x (x − µ)2 f (x)
• Chebyshev’s inequality
• Bernoulli trial, binomial distribution
David Lander
Business Statistics
Discrete Random Variables
33 / 33