1
Random Variable &
CHAPTER
Probability
Distribution
Probability of X
This chapter will explain the concept of random variables and
probability distribution. We will learn how to construct the probability mass
function of a discrete probability distribution and describe its properties
and characteristics by computing its mean and variance.
LESSON 1
Objectives
At the end of this lesson, you are expected to:
• illustrate a random variable;
• distinguish between a discrete and a continuous random variable; and
• find the possible values of a discrete random variable.
Square One
Experiment is any activity which can be done
repeatedly under similar conditions. Each possible
of an experiment is called an outcome. The set of
all possible outcomes of an experiment is called
sample space. Sample space is usually denoted by
S and the total number of possible outcomes by
A n(S).
Experiment : Tossing a coin
A Outcome : H or T
Sample space : S = {H, T}
Total number
of possible : n(S) = 2
outcome
List the sample space of the following experiments.
Experiment Sample Space
1. Tossing two coins
2. Rolling a die
3. Rolling a die and tossing a coin simultaneously
4. Drawing a red card greater than 8 from a deck of cards
Chapter 1 I Random Variable and Probability Distribution I Page 1
In mathematics, a variable is any characteristics, number, or quantity that can be
measured or counted. It is a symbol used to represent an arbitrary element of a set. It is
a quantity that may change within the context of an experiment. Typically, we use a
single letter to represent a variable.
Variable Quantity It Represents
G Number of children in the family
O Time it takes for the Earth to rotate on its axis
D Weight of a newborn baby
If two coins are tossed, what numbers can be assigned for the frequency of tails that will occur? If
two dice are rolled, what numbers can be assigned for the frequency of getting a sum of 6 that will occur?
When three cards are drawn from a deck, what number can be assigned for the frequency of red number
card that will occur? The answers to these questions require and understanding of random variables.
A random variable is a function that associates a real number to each element in the
sample space. It is a variable whose values are determined by chance.
Example 1.1
Tossing Two Coins
Suppose two coins are tossed. Let A be the random variable representing the number of heads that occur.
Find the values of the random variable A.
Possible Outcomes Value of the Random Variable A
(number of heads)
HH 2
HT 1
TH 1
TT 0
➢ Therefore, the possible values of the random variable A are 0, 1, and 2.
Chapter 1 I Random Variable and Probability Distribution I Page 2
Activity 1.1
Marbles
From an urn containing 4 blue marbles and 2 yellow marbles, three marbles are drawn in
succession. Each marble is placed back in the urn before the next draw is made. Let M be a random
variable representing the number of yellow marbles that occur. Find the values of the random variable
M.
Possible Outcomes Value of the Random Variable M
So, the values of the random variable M is/are _________________________.
The random variables in the preceding example and activity are called discrete random variables
because the set of possible outcomes is countable.
Suppose you burn a light bulb until it burns out. Let’s say that the life of the bulb ranges between zero
hour to 100 hours (minimum = 0 and maximum = 100). ‘Y’ is a random variable which is the lifetime of the
bulb in hours. Since Y can take any positive value between 0 and 100, it is a continuous random variable.
A discrete variable is a numeric variable. Observations can take a value based on a count from a
set of distinct whole values. A discrete variable cannot take the value of a fraction between one value
and the next closest value. Examples of discrete variables include the number of registered cars,
number of business locations, and number of children in a family, all of which measured as whole
units (i.e. 1, 2, 3 cars).
A continuous variable is a numeric variable. Observations can take any value between a certain
set of real numbers. The value given to an observation for a continuous variable can include values as
small as the instrument of measurement allows. Examples of continuous variables include height,
time, age, and temperature.
1. Give three examples of discrete random variable.
2. Give three examples of continuous random variable.
Chapter 1 I Random Variable and Probability Distribution I Page 3
LESSON 2
Objectives
At the end of this lesson, you are expected to:
• illustrate a probability distribution for a discrete random variable;
• construct the probability mass function of a discrete random variable and its corresponding
histogram; and
• compute probabilities corresponding to a given random variable.
Square One
An event, denoted by E, is any subset of a sample space of an experiment.
Experiment : Tossing a coin and rolling a die simultaneously
Sample space : S = {H1, T1, H2, T2, H3, T3, H4, T4, H5, T5, H6, T6}
Event : Getting a head and an even number
E = {H2, H4, H6}
You will notice that the outcomes H2, H4, and H6 in the event are also outcomes in the sample
space.
The probability of an event is denoted by P(E).
# 𝑜𝑓 𝑓𝑎𝑣𝑜𝑟𝑎𝑏𝑙𝑒 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠
𝑃 (𝐸 ) =
# 𝑜𝑓 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠
What is the probability of the event in the example above?
Favorable outcomes: H2, H4, H6 n(E) = 3
Possible Outcomes: H1, T1, H2, T2, H3, T3, H4, T4, H5, T5, H6, T6 n(S) = 12
n( E ) 3 1
P( E ) = = =
n( S ) 12 4
So, the probability of getting a head and an even number when a die is rolled and a coin is
tossed simultaneously is 1/4.
Chapter 1 I Random Variable and Probability Distribution I Page 4
Find the probability of the following events.
Event (E) Probability P(E)
1. Getting an odd number in a single roll of a die
2. Getting a sum of 6 when two dice are rolled
3. Getting an ace when a card is drawn from a deck
3. The probability that all children are boys if a couple has three
children
4. Getting a red queen when a card is drawn from a deck
5. Getting a green ball from a box containing 3 green and 5 black
balls
A discrete probability distribution or a probability mass function consists of the values a
random variable can assume and the corresponding probabilities of the values.
Example 2.1
Number of Blue Balls
Two balls are drawn in succession without replacement from a bowl containing 5 red balls and 6
blue balls. Let Z be the random variable representing the number of blue balls. Construct the probability
distribution of the random variable Z.
Solution:
Step 1. Determine the sample space. Let B represent the blue ball and R represent the red ball.
S = {RR, RB, BR, BB}
Step 2. Find the value/s of the random variable Z.
Possible Outcomes Value of the Random Variable Z
(number of blue balls)
RR 0
RB 1
Chapter 1 I Random Variable and Probability Distribution I Page 5
BR 1
BB 2
➢ There are three possible values of the random variable Z representing the number of blue balls.
These are 0, 1, and 2.
Step 3. Assign probability values P(Z) to each value of the random variable.
Values of Random Variable Z Probability P(Z)
0 1
4
1 1
2
2 1
4
Table 1. The Probability Distribution of Discrete Random Variable Z
Now we can make a histogram for this probability distribution. Remember that a histogram is a
bar graph. To construct a histogram for a probability distribution, plot the values of the random variable
along the horizontal axis and the probabilities along the vertical axis.
0.5
Probability P(Z)
0.25
0 1 2
Number of blue balls (Z)
Figure 1. The Histogram for the Probability Distribution
of the Discrete Random Variable Z
Chapter 1 I Random Variable and Probability Distribution I Page 6
Suppose three cell phones are tested at random. Let D represent the defective cell phone and let
N represent the non-defective cell phone. If we let X be the random variable for the number of defective
cell phones, construct the probability distribution of the random variable variable X.
Properties of a Probability Distribution
◆ The probability of each value of the random variable must be between or equal to 0 and 1. In
symbol, we write it as 0 ≤ P(X) ≤ 1.
◆ The sum of the probabilities of all values of the random variable must be equal to 1. In symbol,
we write it as P(X ) = 1 .
Example 2.2
Determine whether the distribution represents a probability distribution. Explain your answer.
X 1 5 8 7 9
1.
P(X) 1 1 1 1 1
3 3 3 3 3
Solution: Add the probabilities
1 1 1 1 1 5
+ + + + = or 1.67
3 3 3 3 3 3
Notice that the sum is greater than1. Therefore, the distribution DOES NOT represent a
probability distribution.
2. P(1) = 0, P(2) = 0.41, P(3) = 0.29
Solution: Add the probabilities
0 + 0.71 + 0.29 = 0.80
Notice that the sum is less than 1. Therefore, the distribution DOES NOT represent a probability
distribution.
Chapter 1 I Random Variable and Probability Distribution I Page 7
3. X 0 2 4 6 8
P(X) 1 1 1 1 1
6 6 3 6 6
Solution: Add the probabilities
1 1 1 1 1
+ + + + = 1.00
6 6 3 6 6
Notice that the sum is equal to1. Therefore, the distribution REPRESENTS a probability distribution.
Does it represent a probability distribution?
1
P( X ) = for X = 1, 2, 3, . . . , 8
8
Chapter 1 I Random Variable and Probability Distribution I Page 8
LESSON 3
Objectives
At the end of this lesson, you are expected to:
• illustrates the mean and variance of discrete random variable;
• calculates and interprets the mean and variance of discrete random variable;
• interprets the mean and variance of discrete random variable; and
• solves problems involving mean and variance of discrete probability distribution.
Square One
A survey was conducted and it found out that the average time spent by a person on their mobile
phone is 5 hours.
What does it
mean? What
is average?
How is the time
spent by different
persons vary from
each other?
Does it mean that
every day a person
spends 5 hours of
his/her day on
mobile phone?
This gives rise to a new concept in probability and statistics – Mean and Variance.
Chapter 1 I Random Variable and Probability Distribution I Page 9
The mean ( ) of a discrete random variable X is a weighted average of the possible
values that the random variable can take.
The variance ( 2 ) of a discrete random variable X measures the spread, or variability, of
the distribution. The standard deviation ( ) is the square root of the variance.
Example 3.1
Grocery Items
3 1 1 2 3
The probabilities that a customer will buy 1, 2, 3, 4, or 5 items in a grocery store are , , , , ,
10 10 10 10 10
respectively. What is the average number of items that a customer will buy?
Solution:
Step 1. Construct the probability distribution for the random variable G representing the number of
items that the customer will buy.
Number of Items Probability
(G) P(G)
3
1
10
1
2
10
1
3
10
2
4
10
3
5
10
Step 2. Multiply the value of the random variable by the corresponding probability.
Chapter 1 I Random Variable and Probability Distribution I Page 10
Number of
Probability
Items G • P(G )
P(G)
(G)
3 3
1
10 10
1 2
2
10 10
1 3
3
10 10
2 8
4
10 10
3 15
5
10 10
Step 3. Add the results obtained in Step 2.
Number of
Probability
Items G • P(G )
P(G)
(G)
3 3
1
10 10
1 2
2
10 10
1 3
3
10 10
2 8
4
10 10
3 15
5
10 10
31
G • P(G) = 10 = 3.1
So, the mean of the probability distribution is 3.1. In symbol, = 3.1 .
What does it mean? Does it imply that the average number of items that the customer will buy is 3.1?
Chapter 1 I Random Variable and Probability Distribution I Page 11
Suppose we want to know the variability of the number of items the customer buys in the grocery store.
Let’s solve for the variance using the example in the previous page:
Step 1. Find the mean of the probability distribution.
In the above example, the mean is 3.1
Step 2. Multiply the square of the value of the random variable by its corresponding probability; then, get
the sum of the results.
Number of Items Probability
G 2 • P(G)
(G) P(G)
3 3 3
1 12 • =
10 10 10
1 1 4
2 22 • =
10 10 10
1 1 9
3 32 • =
10 10 10
2 2 32
4 42 • =
10 10 10
3 3 75
5 52 • =
10 10 10
123
G 2
• P(G ) =
10
= 12.3
Step 4. Subtract the square of the mean from the result obtained in Step 3 to get the variance.
2 = G 2 • P(G)− 2
2 = 12.3 − (3.1)2
2 = 12.3 − 9.61 = 2.69
The standard deviation is the square root of the variance.
2 = 2.69 = 1.64
So, the variance is 2.69 and the standard deviation is 1.64.
Chapter 1 I Random Variable and Probability Distribution I Page 12
Activity 3.1
Complete the table below and find the mean and variance of the following probability
distribution.
X P(X) X • P( X ) X 2 • P( X )
1
1
7
1
6
7
3
11
7
1
16
7
1
21
7
Y P(Y) Y • P(Y ) Y 2 • P(Y )
2 0.10
4 0.23
6 0.25
8 0.36
10 0.06
Z P(Z) Z • P(Z ) Z 2 • P( Z )
4
1
9
2
3
9
1
5
9
2
7
9
Chapter 1 I Random Variable and Probability Distribution I Page 13
Chapter Summary
A random variable is a function that associates a real number with each element in the sample space.
It is a variable whose values are determined by chance.
A random variable is a discrete random variable if its set of possible outcomes is countable. Mostly,
discrete random variables represent count data, such as the number of defective chairs produced in
a factory.
A random variable is a continuous random variable if it takes on values on a continuous scale. Often,
continuous random variables represent measured data, such as height, weight, and temperature.
A discrete probability distribution or a probability mass function consists of the values a random
variable can assume and the corresponding probabilities of the values.
Properties of a Probability Distribution
1. The probability of each value of the random variable must be between 0 and 1 or equal to 0 or 1.
2. The sum of the probabilities of all values of the random variable must be equal to 1.
Formula for the mean and variance of the Probability Distribution
1. Mean : = X • P(X )
where, X - the value of the random variable
P(X) - probability of the random variable
2. Variance: 2 = X 2
• P( X ) − 2
where, X2 - the square of the value of the random variable
P(X) - probability of the random variable
- the mean of the probability distribution
Steps in Finding the Mean of the Probability Distribution
1. Construct the probability distribution for the random variable.
2. Multiply the value of the random variable by its corresponding probability.
3. Add the results obtained in Step 2.
Chapter 1 I Random Variable and Probability Distribution I Page 14
Steps in Finding the Variance and Standard Deviation of the Probability Distribution
1. Find the mean of the probability distribution.
2. Multiply the square of the value of the random variable by its corresponding probability.
3. Add the results obtained in Step 2.
4. Subtract the square of the mean from the result obtained in Step 3 to get the variance.
Chapter 1 I Random Variable and Probability Distribution I Page 15