Chapter 6 - Random Variables and Probability Distributions
Chapter 6 - Random Variables and Probability Distributions
Random Variables
and Probability
Distributions
Stat 101 Bridging Program Module 2
Objectives
Objectives
At the end of this module, the student will be
able to:
• define the different terms associated with
random variables
• explain what random variables are
• differentiate discrete vs continuous
random variables
• construct the pmf of a discrete random
variable
Objectives
At the end of this module, the student will be
able to:
• compute for probabilities from the
probability distribution of a random variable
• compute expectations (mean, variance)
• understand the concepts behind
distributions
• identify possible distributions present in
real life
Before we
continue:
Before we continue:
Recall the definition of a function:
A function is a mapping from one set to
another.
An example of a function is 𝑓(𝑥) = 𝑥 + 2
which relates values of 𝑥 ∈ ℛ (a real number)
to 𝑓(𝑥) ∈ ℛ (another real number).
Here, 𝑓 relates the set of Reals to the set of
Reals.
Before we continue:
Consider the random experiment of flipping
a fair coin twice.
Ω = {𝐻𝐻, 𝐻𝑇, 𝑇𝐻, 𝑇𝑇}
Ω = {𝐷1 , 𝐷2 , 𝐷1 , 𝑁1 , 𝐷2 , 𝑁1 , 𝐷1 , 𝑁1 , 𝐷2 , 𝑁1 ,
𝐷1 , 𝑁2 , 𝐷2 , 𝑁2 , 𝑁1 , 𝑁2 , N1 , N3 , {N2 , N3 }}
𝑥 𝟎 𝟏 𝟐
𝑃(𝑋 = 𝑥) 1ൗ 1ൗ 1ൗ
4 2 4
Answer
b) use the PMF to compute for the
probability that
i) at least two tosses result in heads
P(𝑋 ≥ 2) = P(𝑋 = 2) = 1Τ4
ii) at least one toss results in heads
P(𝑋 ≥ 1) = P(𝑋 = 1) + P(𝑋 = 2) = 1Τ2 + 1Τ4 =
3Τ
4
Example
Consider the random experiment of tossing
a fair die twice. Define 𝑌 = number of tosses
resulting in a number greater than 4.
a) construct the PMF of 𝑌
b) use the PMF to compute for:
i) probability that none of the tosses
results in a number greater than 4
ii) probability that at most one of the
tosses result in a number greater than 4.
Answer
Ω = {(u, v) | u, v ϵ {1, 2, 3, 4, 5, 6}}
𝑌 = no. of tosses resulting in a number > 4
𝑦 ∈ {0, 1, 2}
𝑦 0 1 2
𝑝(y) 16 16 4
36 36 36
Answer
b) use the PMF to compute for
i) probability that none of the tosses
results in a number greater than 4
P(Y= 0) = 16Τ36
DISCRETE CONTINUOUS
• countable • uncountable
• discrete points • continuous
intervals
• 𝑝(𝑥) is the •𝑓 𝑥 is the
probability mass probability density
function function
• 𝑝(𝑥) ≥ 0 •𝑓 𝑥 ≥0
• Σ𝑝(𝑥) = 1 • total area under the
curve is 1
Expectation and
Variance
The Concept of Expectation
𝐸 𝑋 = 𝜇 = 𝑥1 𝑝 𝑥1 + 𝑥2 𝑝 𝑥2 + ⋯ + 𝑥𝑛 𝑝 𝑥𝑛 = 𝑥𝑖 𝑝(𝑥𝑖 )
𝑖=1
Example
Find the expected number of heads (𝑋) in
the experiment where you toss a coin twice.
𝑥 𝟎 𝟏 𝟐
𝑃(𝑋 = 𝑥) 1ൗ 1ൗ 1ൗ
4 2 4
Answer
1 2 1 2 2
𝐸 𝑋 =0 +1 +2 = + =1
4 4 4 4 4
The variance of 𝑋 is
𝑛
𝜎 2 = 𝑉𝑎𝑟 𝑋 = 𝐸 𝑋 − 𝜇 2 = 𝑥𝑖 − 𝜇 2 𝑝(𝑥𝑖 )
𝑖=1
Standard Deviation
The standard deviation of X is the positive
square root of the variance.
𝑉𝑎𝑟 𝑋 = 𝑥𝑖 − 1 2 𝑓(𝑥𝑖 )
𝑖=1
12 2
2 2
1
= 0−1 + 1−1 + 2−1
4 4 4
1 1 1
= +0+ =
4 4 2
Properties of the Mean
and Variance
• 𝐸 𝑋−𝜇 =0
• 𝐸 𝑎𝑋 + 𝑏 = 𝑎𝐸 𝑋 + 𝑏
• 𝐸 𝑋 + 𝑌 = 𝐸 𝑋 + 𝐸(𝑌)
• 𝐸 𝑋 − 𝑌 = 𝐸 𝑋 − 𝐸(𝑌)
Properties of the Mean
and Variance
• 𝑉𝑎𝑟 𝑋 = 𝐸 𝑋 2 − 𝐸 𝑋 2
• 𝑉𝑎𝑟 𝑎𝑋 + 𝑏 = 𝑎 2 𝑉𝑎𝑟 𝑋
𝐸 𝑋 = 𝑛𝑝
𝑉𝑎𝑟 𝑋 = 𝑛𝑝 1 − 𝑝 = 𝑛𝑝𝑞
Example
Find the probability of obtaining (1) exactly
one head when you toss a coin twice, (2) no
head when you toss a coin twice, and (3) at
least one head when you toss a coin twice.
Example
Find the probability of obtaining exactly
three 2’s if an ordinary die is tossed
• Five times
• Ten times
Example
• How many times do we expect to get 2’s if
we toss a coin five times? Ten times?
• What is the variance?
Normal
Distribution
Normal Distribution
Normal Distribution
A continuous random variable 𝑋 is said to be
normally distributed or follows the normal
distribution if its PDF is
1 𝑥−𝜇 2
−
𝑓 𝑥 = 𝑒 2𝜎2
𝜎 2𝜋
If 𝑋 follows the normal distribution, we could
simply write this down as 𝑋~𝑁(𝜇, 𝜎 2 ).
Normal Distribution
• If 𝑋~𝑁 𝜇, 𝜎 2 , then E 𝑋 = 𝜇 and 𝑉𝑎𝑟 𝑋 = 𝜎 2 .
• The graph of the normal distribution is called
the normal curve/ bell curve.
• A normal distribution is an arrangement of a
dataset where most values cluster in the
middle and the rest taper off symmetrically
towards either extreme.
• The normal distribution has two parameters -
its mean and variance!
Properties
• The normal curve is bell-shaped and
symmetric about its mean 𝜇.
• The normal curve approaches the
horizontal axis asymptotically as we
proceed in either direction away from the
mean.
• The total area under the curve and above
the x-axis is equal to 1.
Supporting Slide Title
Normal Distribution with
Different Means and Variances
Standard Normal
Distribution
• If the normal random variable has 𝜇=0 and
𝜎 2 =1, it is called a standard normal random
variable, and is denoted by 𝑍.
• We can simply write this down as 𝑍~𝑁 0,1 .