ECON10005:
Quantitative Methods 1
Week 4, Lecture 1
Discrete probability distributions: Chapter 6
1
Learning outcomes
1. Define a discrete random variable and its probability distribution
2. Solve problems using expected value and variance
3. Define and apply the uniform discrete model
4. Find binomial probabilities using tables, formulas, or Excel
5. Apply rules for transformations of random variables
2
Discrete probability distributions
• A random variable (rv) is a function or rule that assigns a numerical
value to each outcome in the sample space of a random experiment.
• we use X when referring to a random variable in general,
• specific values of X are shown in lowercase and with a subscript to index
the value (for example, x1 is the 1st value that the rv X can take)
• A discrete random variable has a countable number of distinct
values.
• Some random variables have a clear upper limit (for example number of
absences in a class of 20 students), while others do not (for example,
number of text messages you receive in a given day).
3
Probability distributions
• A discrete probability distribution assigns a probability to each value of a
discrete random variable X.
• The distribution must follow the rules of probability.
• If X has n distinct values 𝑥1 , 𝑥2 , . . . , 𝑥𝑛 , then
1. 0 ≤ 𝑃 𝑥𝑖 ≤ 1 the probability for any given value of 𝑋
𝑛
2. 𝑃 𝑥𝑖 = 1 the sum over all values of 𝑋
𝑖=1
4
Probability distributions
• Discrete probability distributions follow the
rules of functions.
• More than one sample space outcome can
be assigned to the same value (ie number),
but you cannot assign one outcome to two
different values (ie numbers).
• More than one random variable value can
be assigned to the same probability, but
one random variable value cannot have two
different probabilities.
• The probabilities must sum to 1.
5
Example: three coin flips
• When you flip a fair coin three times, the sample space has eight equally
likely simple events:
HHH, HHT, HTH, THH, HTT, THT, TTH, TTT .
• If X is the number of heads, then X is a random variable whose probability
distribution is shown:
Possible events X P(X=x)
TTT 0 1/8
HTT, THT, TTH 1 3/8
HHT, HTH, THH 2 3/8
HHH 3 1/8
Total 1
6
What is a PDF and what is a CDF?
• A probability distribution function (PDF) is a mathematical function that
shows the probability of each X-value, 𝑃 𝑋 = 𝑥𝑖 .
• A cumulative distribution function (CDF) is a mathematical function that
shows the cumulative sum of probabilities, 𝑃 𝑋 ≤ 𝑥𝑖 ( adding from the
smallest to the largest X-value), gradually approaching unity.
7
Expected value
• The expected value 𝐸 𝑋 of a discrete random variable is the sum of all X-values
weighted by their respective probabilities.
• It is a weighted average because outcomes can have different probabilities
• It is a measure of center.
• If X has n distinct values 𝑥1 , 𝑥2 , . . . , 𝑥𝑛 , then the expected value of 𝑋 is
𝐸 𝑋 = 𝜇 = σ𝑛𝑖=1 𝑥𝑖 𝑃 𝑥𝑖
• Because it is an average, we usually call 𝐸 𝑋 the mean, and use the symbol for
the (population) mean, 𝜇
8
Example: service calls
• The distribution of Sunday emergency service calls by Ace Appliance Repair
is shown in the table below.
• The probabilities are all between 0 and 1, and they sum to 1, as must be true
for any probability distribution.
xx P(x)
P(x) xP(x)
xP(x)
00 0.05
0.05 0.00
0
11 0.10
0.1 0.10
0.1
22 0.30
0.3 0.60
0.6
33 0.25 0.75
0.75
44 0.20
0.2 0.80
0.8
55 0.10
0.1 0.50
0.5
total
Total 1
1 2.75
2.75
𝐸 𝑋 = µ = 0 .05 + 1 .10 + 2 .30 + 3 .25 + 4 .20 + 5 .10 = 2.75
9
Example: service calls
0.35 Probability distribution for service calls
• This particular probability
0.30
distribution is not symmetric around 0.25
the mean, 𝜇 = 2.75
Probability
0.20
• However, the mean is still the 0.15
balancing point, or fulcrum. 0.10
0.05
• 𝐸 𝑋 is an average and it does not
0.00
have to be an observable value. 0 1 2 3 4 5
Number of Service Calls
10
The variance and standard deviation
• The variance Var(𝑋) of a discrete random variable is the sum of the squared
deviations about its expected value, weighted by the probability of each X-
value.
• If X has n distinct values 𝑥1 , 𝑥2 , . . . , 𝑥𝑛 , then the variance of 𝑋 is:
𝑛
Var 𝑋 = 𝜎 2 = (𝑥𝑖 − 𝜇)2 𝑃 𝑥𝑖
𝑖=1
• We use either 𝜎 2 or Var 𝑋 to denote the variance of 𝑋
• The standard deviation is the square root of the variance and is denoted 𝜎:
𝜎= 𝜎2 = Var(𝑋)
11
Example: Bed and breakfast
• The Bay Street Lodge is a seven-room bed-and-breakfast in the town of Byron Bay.
• Demand for rooms generally is strong during December. However, experience
shows that demand is quite variable.
• The probability distribution of room rentals during December is shown in below,
where X = the number of rooms rented.
• The worksheet shows the calculation of 𝐸 𝑋 and Var 𝑋
x P(x) xP(x) x- m (x- m) 2 (x- m) 2P(x)
0 0.05 0.00 -4.71 22.1841 1.10921
1 0.05 0.05 -3.71 13.7641 0.68821
2 0.06 0.12 -2.71 7.3441 0.44065
3 0.10 0.30 -1.71 2.9241 0.29241
4 0.13 0.52 -0.71 0.5041 0.06553
5 0.20 1.00 0.29 0.0841 0.01682
6 0.15 0.90 1.29 1.6641 0.24962
7 0.26 1.82 2.29 5.2441 1.36347
Sum: 4.71 4.2259 12
Example: Bed and breakfast
Probability distribution of room rentals
0.30
• This distribution is skewed to the left
and bimodal. 0.25
• The mode (most likely value) is 7 0.20
Probability
rooms rented, but the average is 0.15
only 4.71 room rented in December.
0.10
• The standard deviation of 0.05
2.0557(= 4.2259 )
0.00
indicates that there is considerable 0 1 2 3 4 5 6 7
variation around the mean Number of Rooms Rented
13
Uniform distribution
• The uniform distribution is one of the simplest discrete models.
• The uniform distribution describes a random variable with a finite
number of consecutive integer values from a to b.
• Each value is equally likely.
• The entire distribution depends only on the two parameters a and b.
14
Characteristics of the Uniform distribution
Parameters 𝑎 = lower limit
𝑏 = upper limit
1
PDF 𝑓 𝑥 =
𝑏−𝑎+1
𝑥−𝑎+1
CDF 𝑃 𝑋≤𝑥 =
𝑏−𝑎+1
Domain 𝑥 = 𝑎, 𝑎 + 1, 𝑎 + 2, … , 𝑏
𝑎+𝑏
Mean
2
𝑏−𝑎 +1 2 −1
Standard deviation
12
15
Example: rolling a die
• When you roll one die, the number of dots forms a uniform discrete random
variable with six equally likely integer values 1, 2, 3, 4, 5, 6.
16
Example: rolling a die
• The mean (3.5) must be halfway between 1 and 6, but there is no
way you could anticipate the standard deviation without using a
formula.
• For this example, the mean and standard deviation are:
𝑎+𝑏 1+6
Mean 𝜇= = = 3.5
2 2
𝑏−𝑎 +1 2 −1 6−1 +1 2 −1
[Link]. 𝜎= = = 1.708
12 12
17
Bernoulli experiments
• A random experiment that has only two outcomes is called a Bernoulli
experiment.
• To create a random variable, we arbitrarily call one outcome a “success”
(denoted X = 1) and the other a “failure” (denoted X = 0).
• The probability of success is denoted: 𝜋.
• The probability of failure is ∶ 1 − 𝜋
• so the probabilities sum to 1
𝑃 0 + 𝑃 1 = 1 − 𝜋 + 𝜋 = 1.
• The probability of success, 𝝅 remains the same for each trial.
18
Bernoulli experiments
• Success (X = 1) represents the event of interest
• it may be something undesirable but of main interest.
• E.g. metallurgists look for signs of metal fatigue; auditors look for expense
voucher errors; bank loan officers look for loan defaults.
Bernoulli experiment Possible outcomes Probability of success
Flip a coin 1 = heads 𝜋 = 0.50
0 = tails
Inspect a jet turbine blade 1 = crack found 𝜋 = 0.001
0 = no crack found
Purchase petrol 1 = pay by credit card 𝜋 = 0.78
0 = do not pay by credit card
Do a mammogram test 1 = positive test 𝜋 = .0004
0 = negative test
19
Bernoulli experiments
X P(X=𝑥)
0 1− 𝜋
1 𝜋
The only parameter needed to define a Bernoulli process is 𝜋
𝑬 𝑿 = σ2𝑖=1 𝑥𝑖 𝑃 𝑥𝑖 =(0)(1− 𝜋)+(1)(𝜋)
=𝝅
Var 𝑿 = σ2𝑖=1 𝑥𝑖 − 𝐸 𝑋 2𝑃 𝑥𝑖
=(0− 𝜋)2 (1− 𝜋)+(1− 𝜋)2 (𝜋)
= 𝜋2 (1− 𝜋)+(1− 𝜋)2 𝜋 = 𝜋(1− 𝜋)[𝜋 + (1− 𝜋)]
= 𝝅(1− 𝝅)
Standard deviation = 𝑉𝑎𝑟(𝑋)= 𝝅(1− 𝝅)
20
Example: two-up
The game of two-up is still played on ANZAC day. Two up involves tossing two coins,
and success is defined as two heads showing.
This is a Bernoulli experiment.
Event space from tossing two coins {(T,T), (T, H), (H,T), (H,H)}
Define X = 1 if (H,H) X P(X=𝑥)
0 0.75
X = 0 otherwise
1 0.25
P(X = 1) = 𝝅 = 0.25; P(X = 0) = 1− 𝜋 = 0.75
𝑬 𝑿 = σ2𝑖=1 𝑥𝑖 𝑃 𝑥𝑖 =0 × 0.75 + 1 × 0.25 = 𝝅 = 0.25
Var 𝑿 = σ2𝑖=1 𝑥𝑖 − 𝐸 𝑋 2 𝑃 𝑥𝑖 =(0− 0.25)2 (0.75)+(1− 0.25)2 (0.25)
= 𝝅(1− 𝝅) = 0.25 × 0.75 = 0.1875
21
What we covered today
• What is a random variable
• Discrete random variables and discrete probability distributions
• PDFs (probability distribution function)
• CDFs (cumulative distribution function)
• The expected value of a discrete random variable
• The variance and standard deviation of a discrete random variable
• The uniform discrete random variable
• Bernoulli experiments
22