You are on page 1of 43

Probability

Chapter 4
DISCRETE RANDOM VARIABLES
1. Random Variables
2. Discrete Random Variables
3. Expected Value
4. Expectation of a Function of a Random Variable
5. Variance and Standard Deviation
6. Moments and the Moment Generating Function
7. The Mode
8. Z ~ Score and Chebychev’s Theorem
1st Semester 2022
Probability

1. Random Variables
• In many scenarios, we are interested in a function of the outcome as
opposed to the actual outcome; e.g. we are interested in the sum of
two dice and not in the separate values of each die or, when we flip a
coin, we want to know the number of tails.
• A random variable is a function mapping the sample space to the real
numbers.

1st Semester 2022


Probability

1. Random Variables
Example 4.1: Suppose that our experiment consists of rolling a fair die

𝑆 = {1, 2, 3, 4, 5, 6}

If we let 𝑋 denote the number rolled, then 𝑋 is a random variable


taking on one of the values 1, 2, 3, 4, 5, 6
𝑃 𝑋=1 =𝑃 𝑋=2 =𝑃 𝑋=3 =𝑃 𝑋=4
= 𝑃 𝑋 = 5 = 𝑃(𝑋 = 6) = 1/6

1st Semester 2022


Probability

1. Random Variables
Example 4.2: Suppose that our experiment consists of tossing 2 fair
coins.
𝑆 = {𝐻𝐻, 𝐻𝑇, 𝑇𝐻, 𝑇𝑇}

If we let 𝑌 denote the number of heads that appear, then 𝑌 is a random


variable taking on one of the values 0, 1, 2.
𝑃(𝑌 = 0) =
𝑃(𝑌 = 1) =
𝑃(𝑌 = 2) =

1st Semester 2022


Probability

1. Random Variables
Example 4.3: Suppose that our experiment consists of tossing 3 fair
coins. If we let 𝑌 denote the number of tails that appear, then 𝑌 is a
random variable taking on one of the values 0, 1, 2, and 3
𝑃(𝑌 = 0) =
𝑃(𝑌 = 1) =
𝑃(𝑌 = 2) =
𝑃(𝑌 = 3) =

1st Semester 2022


Probability

1. Random Variables
Example 4.4: A supervisor in a manufacturing plant has three men and
three women working for him. He wants to choose two workers for a
special job. Not wishing to show any biases in his selection, he decides
to select the two workers at random. Let 𝑌 denote the number of
women in his selection. Then then 𝑌 is a random variable taking on one
of the values 0, 1, 2.
𝑃(𝑌 = 0) =
𝑃(𝑌 = 1) =
𝑃(𝑌 = 2) =

1st Semester 2022


Probability

1. Random Variables
Example 4.5: Assume you have trials consisting of sitting an exam. You
have probability 𝑝 of passing the exam. If you fail, you sit the exam
again. These trials are considered independent as you never bother
revising the material. We denote 𝑋 the number of exams you need to
sit before passing the subject.
Then X is a random variable taking on one of the values 1, 2, 3, … , 𝑛
𝑃(𝑋 = 1) =
𝑃(𝑋 = 2) =
𝑃(𝑋 = 3) =
…
𝑃(𝑋 = 𝑛) =
1st Semester 2022
Probability

1. Random Variables
Example 4.6: The pockets of the roulette wheel are numbered from 1
to 36. In number ranges from 1 to 10 and 19 to 28, odd numbers are
red and even are black. In ranges from 11 to 18 and 29 to 36, odd
numbers are black and even are red. There is two green pockets
numbered 0 and 00.
• Red/Black: If you bet 1$ on red, the payout is 1$ if it is red. Let
𝑋1 denotes the payout. 𝑋1?
• Straight up: you bet 1$ on any pocket 0,00,1,2, … , 36. The payout is
35$ if you are right. Let 𝑋2 denotes the payout. 𝑋2 ?

1st Semester 2022


Probability

1. Random Variables
Example 4.6 (cont)
• Split bet: you bet 1$ on 11 or 14. The payout is 17$ if you are right.
Let X3 denotes the payout. 𝑋3?
• Street bet: you 1$ on 1, 2, 3 or 4, 5, 6 or... or 19, 20, 21. Say you bet
on 19, 20, 21. The payout is 11$ if you are right. Let 𝑋4 denotes the
payout. 𝑋4 ?

1st Semester 2022


Probability

2. Discrete Random Variables


• A random variable 𝑋 which can take at most a countable number of
possible values is said to be discrete.

• The probability mass function (probability function/discrete density


function) of 𝑋 is denoted by
p(a) = P{X = a}

• If X can take the values {𝑥1, 𝑥2, … } then


 𝑝 𝑥𝑖 ≥ 0 ∀ 𝑖 = 1, 2 …
 ∞ 𝑖=1 𝑝 𝑥𝑖 = 1

1st Semester 2022


Probability

2. Discrete Random Variables


Example 4.7: On a certain slot machine, the probability of winning on
an individual play is 0.05. Let 𝑋 be the number of unsuccessful
attempts before the first win.
Find the probability mass function of 𝑋.

1st Semester 2020


1st 2022
Probability

2. Discrete Random Variables


• The cumulative distribution function is

𝐹 𝑎 =𝑃 𝑋≤𝑎 = 𝑝(𝑥)
𝑥:𝑥≤𝑎

1st Semester 2022


Probability

2. Discrete Random Variables


Properties of the cumulative distribution function
• 𝐹 is a nondecreasing function; that is, if a < b, then F(a) ≤ F(b).

• lim 𝐹 𝑏 = 1
𝑏→∞

• lim 𝐹 𝑏 = 0
𝑏→−∞

• 𝐹 is right continuous. That is, for any 𝑏 and any decreasing sequence
bn, n ≥ 1, that converges to 𝑏, lim 𝐹 𝑏𝑛 = 𝐹(𝑏)
𝑛→∞

1st Semester 2022


Probability

2. Discrete Random Variables


Example 4.8: A clinical researcher is studying a fatal disease. The
random variable of interest to her is 𝑋, the number (1, 2, . . . ) of the
year following diagnosis in which a patient dies. Her studies lead to the
probability table given below.

Year of death 1 2 3 4 5
𝑝(𝑥) 0.53 0.25 0.12 0.07 0.03

Find the cumulative distribution function of 𝑋.

1st Semester 2022


Probability

2. Discrete Random Variables


Example 4.9: The distribution function of the random variable 𝑋 is given by
0 𝑥<0
𝑥
0≤𝑥<1
2
2
𝐹 𝑥 = 1≤𝑥<2
3
11
2≤𝑥<3
12
1 3≤𝑥
Compute (a) 𝑃{𝑋 < 3}, (b) 𝑃{𝑋 = 1},
1
(c) 𝑃 𝑋 > , (d) 𝑃{2 < 𝑋 ≤ 4}.
2

1st Semester 2022


Probability

2. Discrete Random Variables


Example 4.10: You play a slot machine repeatedly. The probability of
winning on a single play is 0.05, and successive plays are independent.
The random variable of interest is 𝑋, the number of unsuccessful
attempts before the first win. Find an expression for 𝐹(𝑥).
How many times would you need to play the slot machine in order to
be sure that your probability of winning at least once is greater than or
equal to 0.99?

1st Semester 2022


Probability

2. Discrete Random Variables


Example 4.11: The probability mass function of a random variable 𝑋 is
given by
𝑐𝜆𝑖
𝑝 𝑖 =
𝑖!

𝑖 = 0, 1,2, … , where 𝜆 is some positive value. Find


(a) 𝑃{𝑋 = 0}
(b) 𝑃{𝑋 > 2}

1st Semester 2020


1st 2022
Probability

3. Expected Value
• If 𝑋 is a discrete random variable having a probability mass function
𝑝(𝑥), then the expectation, or the expected value, of 𝑋, denoted by
𝐸 𝑋 , is defined by

𝐸 𝑋 = 𝑥𝑖 𝑝 𝑥𝑖 = 𝑥𝑝(𝑥)
𝑖=1 𝑥:𝑝 𝑥 >0

1st Semester 2022


Probability

3. Expected Value
Example 4.12: Find 𝐸[𝑋], where 𝑋 is the outcome when we roll a fair
die.

1st Semester 2022


Probability

3. Expected Value
Example 4.13: The pockets of the roulette wheel are numbered from 1
to 36. In number ranges from 1 to 10 and 19 to 28, odd numbers are
red and even are black. In ranges from 11 to 18 and 29 to 36, odd
numbers are black and even are red. There is two green pockets
numbered 0 and 00.
• Red/Black: If you bet 1$ on red, the payout is 1$ if it is red. Let
𝑋1 denotes the payout.
• Straight up: you bet 1$ on any pocket 0,00,1,2, … , 36. The payout is
35$ if you are right. Let 𝑋2 denotes the payout.
• Split bet: you bet 1$ on 11 or 14. The payout is 17$ if you are right.
Let X3 denotes the payout.
• Street bet: you 1$ on 1, 2, 3 or 4, 5, 6 or... or 19, 20, 21. Say you bet on
19, 20, 21. The payout is 11$ if you are right. Let 𝑋4 denotes the
payout.
Find 𝐸(𝑋1); 𝐸(𝑋2); 𝐸(𝑋3); 𝐸(𝑋4)
1st Semester 2022
Probability

4. Expectation of a Function of a Random Variable


Example 4.14: Let 𝑋 denote a random variable that takes on any of the
values −1, 0, and 1 with respective probabilities
𝑃{𝑋 = −1} = 0.2
𝑃{𝑋 = 0} = 0.5
𝑃{𝑋 = 1} = 0.3
Find 𝐸(𝑋2)

1st Semester 2022


Probability

4. Expectation of a Function of a Random Variable


• If 𝑋 is a discrete random variable that takes on one of the values
𝑥𝑖, 𝑖 = 1, 2, … , with respective probabilities 𝑝(𝑥𝑖 ), then, for any real-
valued function 𝑔,

𝐸𝑔 𝑋 = 𝑖𝑔 𝑥𝑖 𝑝 𝑥𝑖

• If a and b are constants, then

𝐸(𝑎𝑋 + 𝑏) = 𝑎𝐸 𝑋 + 𝑏

1st Semester 2022


Probability

4. Expectation of a Function of a Random Variable


Example 4.15: An automobile insurer studied the number of claims
filed by a policyholder in a given year. The probability function was as
follows:

Number of claim (𝑥) 0 1 2 3

𝑝(𝑥) 0.72 0.22 0.05 0.01

Suppose this table is for a type of policy which guarantees a fixed


payment of $1000 for each claim. Let 𝑌 be the total claim amount paid
to a policyholder in a year. Find 𝐸(𝑌)

1st Semester 2022


Probability

5. Variance and Standard Deviation


• 𝑋 is a random variable. The variance of 𝑋, denoted by 𝑉𝑎𝑟(𝑋), is
defined by
𝑉𝑎𝑟 𝑋 = 𝐸𝑋 − 𝐸 𝑋 2 = 𝑥 − 𝜇 2 𝑝(𝑥)
𝑥

• The square root of the 𝑉𝑎𝑟(𝑋) is called the standard deviation of 𝑋,


and we denote it by 𝑆𝐷(𝑋) or 𝜎𝑋 . That is,

𝑆𝐷 𝑋 = 𝜎𝑋 = 𝑉𝑎𝑟(𝑋)

1st Semester 2022


Probability

5. Variance and Standard Deviation


Example 4.16: An automobile insurer studied the number of claims 𝑋
filed by a policyholder in a given year. The probability function was as
follows:
Number of claim (𝑥) 0 1 2 3

𝑝(𝑥) 0.72 0.22 0.05 0.01

Find 𝑉𝑎𝑟(𝑋)

1st Semester 2022


Probability

5. Variance and Standard Deviation

• We also have
𝑉𝑎𝑟(𝑋) = 𝐸(𝑋2) – [𝐸(𝑋)]2

• For any constants a and b,

𝑉𝑎𝑟(𝑎𝑋 + 𝑏) = 𝑎2𝑉𝑎𝑟(𝑋)

1st Semester 2022


Probability

5. Variance and Standard Deviation


Example 4.17: Calculate 𝑉𝑎𝑟(𝑋) if 𝑋 represents the outcome when a
fair die is rolled.

1st Semester 2022


Probability

5. Variance and Standard Deviation


Example 4.18: An automobile insurer studied the number of claims
filed by a policyholder in a given year. The probability function was as
follows:

Number of claim (𝑥) 0 1 2 3

𝑝(𝑥) 0.72 0.22 0.05 0.01

Suppose this table is for a type of policy which guarantees a fixed


payment of $1000 for each claim. Let 𝑌 be the total claim amount paid
to a policyholder in a year. Find V𝑎𝑟(𝑌)

1st Semester 2022


Probability

5. Variance and Standard Deviation


Example 4.19: Suppose you are considering an investment in one of
two stocks, imaginatively named A and B. You have a forecast of the
value of the stocks in the future: The value of each stock will increase
by 5% if the national economy stays as it is. If the economic outlook
improves, Stock A will increase in value by 10% and Stock B will
increase in value by 15%. If the economic outlook deteriorates, Stock A
will decrease in value by 10 % and Stock B will decrease in value by
15% . You believe that probabilities for the future states of the
economy are given by the following table:
State of the economy Deteriorate Unchanged Improve

Probability 0.2 0.6 0.2


1st Semester 2022
Probability

5. Variance and Standard Deviation


Create probability function tables for the return on each of the two
stocks. Which stock is riskier?

1st Semester 2022


Probability

6. Moments and the Moment Generating Function


Moments
• 𝐸 X is referred to as the mean or the first moment of 𝑋
• 𝐸 Xn , n ≥ 1, is called the nth moment of 𝑋

𝐸 Xn = 𝑥 𝑛 𝑝(𝑥)
𝑥:𝑝 𝑥 >0

1st Semester 2022


Probability

6. Moments and the Moment Generating Function


The Moment Generating Function
• Let 𝑋 be a discrete random variable. The moment generating
function, denoted 𝑀𝑋 𝑡 , is defined by

𝑀𝑋 𝑡 = 𝐸 𝑒 𝑡𝑋 = 𝑒 𝑡𝑥 𝑝(𝑥)

• 𝑀𝑋 𝑡 is called the moment generating function because its


derivatives can be used to find the moments of 𝑋.

1st Semester 2022


Probability

6. Moments and the Moment Generating Function


The Moment Generating Function
• We can see that
𝑀𝑋′ 𝑡 = 𝑥𝑒 𝑡𝑥 𝑝(𝑥) and 𝑀𝑋′ 0 = 𝑥𝑝 𝑥 = 𝐸(𝑋)
𝑀𝑋′′ 𝑡 = 𝑥 2 𝑒 𝑡𝑥 𝑝(𝑥) and 𝑀𝑋′′ 0 = 𝑥 2 𝑝 𝑥 = 𝐸(𝑋 2 )
• In general,
𝑀𝑋𝑛 𝑡 = 𝑥 𝑛 𝑒 𝑡𝑥 𝑝(𝑥) and 𝑀𝑋′′ 0 = 𝑥 𝑛 𝑝 𝑥 = 𝐸(𝑋 𝑛 )

1st Semester 2022


Probability

6. Moments and the Moment Generating Function


• The Moment Generating Function
Example 4.20: Below is the probability function table for the claim
number random variable 𝑋.

Number of claim (𝑥) 0 1 2 3

𝑝(𝑥) 0.72 0.22 0.05 0.01

Find 𝑀𝑋 𝑡 .

1st Semester 2022


Probability

6. Moments and the Moment Generating Function


Note
𝑀𝑎𝑋+𝑏 𝑡 = 𝑒 𝑡𝑏 𝑀𝑋 𝑎𝑡
Example 4.21: An automobile insurer studied the number of claims
filed by a policyholder in a given year. The probability function was as
follows:
Number of claim (𝑥) 0 1 2 3

𝑝(𝑥) 0.72 0.22 0.05 0.01


Suppose this table is for a type of policy which guarantees a fixed
payment of $1000 for each claim. Let 𝑌 be the total claim amount paid
to a policyholder in a year. Find 𝑀𝑌 𝑡

1st Semester 2022


Probability

7. The Mode
• The mode of a probability function is the value of 𝑥 which has the
highest probability 𝑝(𝑥).

Example 4.22: Let X be a discrete random variable which is distributed


as below
𝑥 0 1 2
𝑝(𝑥) 0.5 0.3 0.2

Find 𝑚𝑜𝑑𝑒(𝑋)

1st Semester 2022


Probability

8. Z ~ Score and Chebychev’s Theorem


• For any possible value 𝑧 of a random variable, the 𝑧-score is
𝑥−𝜇
𝑧=
𝜎
• The z-score measures the distance of 𝑧 from 𝜇 = 𝐸(𝑋) in standard
deviation (𝜎) units.
• Chebychev's Theorem: For any random variable 𝑋, the probability
1
that 𝑋 is within 𝑘 standard deviations of the mean is at least 1 − 2
𝑘
1
𝑃(𝜇 − 𝑘𝜎 ≤ 𝑋 ≤ 𝜇 − 𝑘𝜎) ≥ 1 − 2
𝑘

1st Semester 2022


Probability

Chapter 4 - Exercises
Exercise 4.1: Let X be the random variable for the number of heads
obtained when three fair coins are tossed. What is the probability
function for X?

1st Semester 2022


Probability

Chapter 4 - Exercises
Exercise 4.2: Ten cards are face down in a row on a table. Exactly one of
them is an ace. You turn the cards over one at a time, moving from left
to right. Let X be the random variable for the number of cards turned
before the ace is turned over. What is the probability function for X?

1st Semester 2022


Probability

Chapter 4 - Exercises
Exercise 4.3: A fair die is rolled repeatedly. Let X be the random variable
for the number of times the die is rolled before a six appears. What are
the probability function and the cumulative distribution function for X?

1st Semester 2020


1st 2022
Probability

Chapter 4 – Exercises
Exercise 4.4: Let X be the random variable for the sum obtained by
rolling two fair dice. What are the probability function and the
cumulative distribution function for X?

1st Semester 2022


Probability

Chapter 4 – Exercises
Exercise 4.5: Let be a discrete random variable with probability function
2
𝑃 𝑋 = 𝑥 = 𝑥 for x = 1, 2, 3… What is the probability that x is even?
3

1st Semester 2022


Probability

Chapter 4 – Exercises
Exercise 4.6: In modeling the number of claims filed by an individual
under an automobile policy during a three-year period, an actuary
1
makes the simplifying assumption that for all integers 𝑝𝑛+1 = 𝑝𝑛 ,
5
where 𝑝𝑛 represents the probability that the policyholder files n claims
during the period. Under this assumption, what is the probability that a
policyholder files more than one claim during the period?

1st Semester 2022

You might also like