TOPIC8. Random Variables and Probability Distributions
TOPIC8. Random Variables and Probability Distributions
Topic 8
Random Variables and Probability Distributions
When we conduct an experiment and we are not sure of its result, this is called a random
experiment. For example, if a coin is tossed, we do not know the actual outcome. All we know is
that it is either a head (𝐻) or a tail (𝑇). Thus, the set of all possible outcomes is the sample space
𝑆 = {𝐻, 𝑇}. Suppose we let 𝑋 be the number of heads that occur in each outcome. Then 𝑋 = {1, 0}
since for the outcome 𝐻, there is only 1 head and for the outcome 𝑇, there is 0 head. 𝑋 here is
called a random variable. We can define 𝑋 as a rule or a function that tells us how to assign a real
number to every element in S. The rule here is “Count the number of heads in every outcome in S”.
We may tabulate this as
Values (𝑠) of 𝑆 𝐻 𝑇
Values (𝑥) of X 1 0
The outcomes 𝐻𝑇 and 𝑇𝐻 both have the same value in 𝑌, that is, it is equal to 1.
When the values of a random variable are whole numbers, then the variable is said to be a discrete
random variable. Random variables 𝑋 and 𝑌 above are discrete. A continuous random variable can
be any value within a specified interval of values assumed by the random variable and can be
obtained through measurement using some equipment. If we denote 𝑍 as the score of a student in
percent, then 𝑍 is a continuous random variable.
hvvvalle
Page 2 of 8
In this topic, let us focus on discrete random variables. Let us illustrate random variables in the
following examples.
Example 1
Toss two dice. Let random variable 𝑿 be the product of the outcomes. Find the values of 𝑿.
Solution:
1 2 3 4 5 6
1 1,1 1,2 1,3 1,4 1,5 1,6
2 2,1 2,2 2,3 2,4 2,5 2,6
3 3,1 3,2 3,3 3,4 3,5 3,6
1st die
4 4,1 4,2 4,3 4,4 4,5 4,6
5 5,1 5,2 5,3 5,4 5,5 5,6
6 6,1 6,2 6,3 6,4 6,5 6,6
𝑺 has 𝑛 = 36 elements.
Find 𝑿:
2nd die
1 2 3 4 5 6
1 1 2 3 4 5 6
2 2 4 6 8 10 12
3 3 6 9 12 15 18
1st die
4 4 8 12 16 20 24
5 5 10 15 20 25 30
6 6 12 18 24 30 36
Simplify 𝑿: 𝑿 = {𝟏, 𝟐, 𝟑, 𝟒, 𝟓, 𝟔, 𝟖, 𝟗, 𝟏𝟎, 𝟏𝟐, 𝟏𝟓, 𝟏𝟔, 𝟏𝟖, 𝟐𝟎, 𝟐𝟒, 𝟐𝟓, 𝟑𝟎, 𝟑𝟔}
hvvvalle
Page 3 of 8
Example 2
Two face masks are selected successively from a box containing assorted-colored face masks (fm) of
which 10 pieces are blue, 10 pieces are green, and 10 pieces are pink. Let the random variable 𝑊 be
the number of pink face masks selected.
Solution:
𝑺 has 𝑛 = 9 elements.
Simplify 𝑾: 𝑾 = {𝟎, 𝟏, 𝟐}
Example 3
Suppose you are going to form two-digit numbers from the numbers 𝟑, 𝟐, 𝟓, 𝟏. Find the values of
the random variable 𝒁 which is the bigger of the two digits.
Solution:
𝒔 32 35 31 23 25 21 52 53 51 15 12 13
𝒛 3 5 3 3 5 2 5 5 5 5 2 3
Simplify 𝑍: 𝒁 = {𝟐, 𝟑, 𝟓}
hvvvalle
Page 4 of 8
The probability distribution of a discrete random variable is the list of the values of that variable with
their corresponding probabilities. This distribution may be shown in a table, graph, or formula.
Given the discrete random variable 𝑿 with values 𝑥1 , 𝑥2 , 𝑥3 , …, we have the following properties of
its probability distribution:
Example 4
Find the probability distribution of 𝑿 in Example 1. Verify if the two properties of probability
distributions hold true for this example.
Solution:
hvvvalle
Page 5 of 8
Example 5
Find the probability distribution of 𝑾 in Example 2. Verify if the two properties of probability
distributions hold true for this example.
𝒘 𝑷(𝒘)
0 4/9
1 4/9
2 1/9
∑𝑷(𝒘) = 𝟗/𝟗 = 𝟏
Example 6
Find the probability distribution of 𝒁 in Example 3. Verify if the two properties of probability
distributions hold true for this example.
𝒛 𝑷(𝒛)
2 2/12
3 4/12
5 6/12
∑𝑷(𝒛) = 𝟏𝟐/𝟏𝟐 = 𝟏
Example 7
Sometime in February 2022, three students were asked if they would agree (A) to Face-to-Face
classes this Second Semester 2021-2022. Let V be the random variable that counts the number of
students who disagreed (D).
Find 𝑺 and 𝑽. Verify if the two properties of probability distributions hold true for this example.
Simplify V: 𝑽 = {𝟎, 𝟏, 𝟐, 𝟑}
hvvvalle
Page 6 of 8
𝒗 0 1 2 3 ∑𝑃(𝑣)
𝑷(𝒗) 1/8 = 0.125 3/8 = 0.375 3/8 = 0.375 1/8 = 0.125 8/8 = 1
Example 8
Verify if the function 𝑷(𝒙) = 𝟐/𝟏𝟑 + 𝒙/𝟐𝟔 is a probability distribution for the random variable 𝑋,
where 𝑋 = {1,2,3,4}.
Solution:
Example 9
Graph the probability distribution of Example 7. Each 𝑃(𝑣) is converted into decimals.
hvvvalle
Page 7 of 8
𝑷(𝒗)
0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
0 1 2 3
Practice:
a. What is the Probability that there are 2 students who disagree to F2F classes?
𝑷(𝒗 = 𝟐) = 𝟎. 𝟑𝟕𝟓
b. What is the probability that more than 2 students disagree to F2F classes?
hvvvalle
Page 8 of 8
Let 𝑋 be a discrete random variable with probability distribution 𝑃(𝑋). The mean and variance of 𝑋
respectively, are
𝒗 0 1 2 3 ∑𝑷(𝑽 = 𝒗)
Solution:
𝝁 = ∑ 𝒗𝑷(𝒗) = 𝟎(𝟎. 𝟏𝟐𝟓) + 𝟏(𝟎. 𝟑𝟕𝟓) + 𝟐(𝟎. 𝟑𝟕𝟓) + 𝟑(𝟎. 𝟏𝟐𝟓) = 𝟎 + 𝟎. 𝟑𝟕𝟓 + 𝟎. 𝟕𝟓 + 𝟎. 𝟑𝟕𝟓 = 𝟏. 𝟓
𝝈𝟐 = ∑ 𝒗𝟐 𝑷(𝒗) − 𝝁𝟐
∑ 𝒗𝟐 𝑷(𝒗) = 𝟎𝟐 (𝟎. 𝟏𝟐𝟓) + 𝟏𝟐 (𝟎. 𝟑𝟕𝟓) + 𝟐𝟐 (𝟎. 𝟑𝟕𝟓) + 𝟑𝟐 (𝟎. 𝟏𝟐𝟓) = 𝟎 + 𝟎. 𝟑𝟕𝟓 + 𝟏. 𝟓 + 𝟎. 𝟑𝟕𝟓 + 𝟏. 𝟏𝟐𝟓 = 𝟑
𝝁𝟐 = (𝟏. 𝟓)𝟐 = 𝟐. 𝟐𝟓
𝝈𝟐 = ∑ 𝒗𝟐 𝑷(𝒗) − 𝝁𝟐 = 𝟑 − 𝟐. 𝟐𝟓 = 𝟎. 𝟕𝟓
hvvvalle