CHAPTER (3)
Discrete Random Variable and Probability Distributions
To understand probability distributions, it is important to understand variables, random variables, and some
notation.
▪ A variable is a symbol (A, B, X, Y, etc.) that can take on any of a specified set of values.
▪ A random variable, usually written X, is a variable whose possible values are numerical outcomes of a
statistical experiment
Generally, statisticians use a capital letter to represent a random variable and a lower-case letter, to represent
one of its values. For example,
▪ X represents the random variable X.
▪ P(X) represents the probability of X.
▪ P(X = x) refers to the probability that the random variable X is equal to a particular value, denoted by x.
▪ As an example, P(X = 1) refers to the probability that the random variable X is equal to 1.
In other words, A random variable is just a rule (function) that assigns a number to each outcome of an
experiment. These numbers are called the values of the random variable. We often use letters like X, Y and Z to
denote a random variable.
Discrete Random Variables
A discrete random variable can take on only specific, isolated numerical values, like the outcome of a roll of a
dice, or the number of dollars in a randomly chosen bank account. Discrete random variables that can take on
only finitely many values (like the outcome of a roll of a dice) are called finite random variables.
The probability distribution of a discrete random variable is a list (table) of probabilities associated with each
of its possible values. It is also sometimes called the probability function.
To illustrate this concept let us look at an example:
Probability Distribution Function (PDF)
A mathematical description of a discrete random variable (DRV), given either in the form of an equation (formula)
or in the form of a table listing all the possible outcomes of an experiment and the probability associated with
each outcome.
A discrete probability distribution function 𝒇(𝒙) = 𝑷(𝑿 = 𝒙) has two characteristics:
• Each probability is between 0 and 1, inclusive.
• The sum of the probabilities is 1.
𝒇(𝒙) = 𝑷(𝑿 = 𝒙) is the notation used to represent a discrete probability distribution function.
Discrete cumulative Distribution:
A cumulative distribution function 𝑭(𝒙) of discrete random variable X with probability distribution 𝒇(𝒙) satisfies:
𝑭(𝒙) = 𝑷(𝑿 ≤ 𝒙) = ∑ 𝒇(𝒖) − ∞ ≤ 𝒙 ≤ ∞,
𝒖≤𝒙
1
If X takes on only a finite number of values x1 , x2 , …, xn, then the cumulative distribution function F(x) is given
by:
𝑜 − ∞ < 𝑥 < 𝑥1
𝑓(𝑥1 ) 𝑥1 ≤ 𝑥 < 𝑥2
𝑓(𝑥1 ) + 𝑓(𝑥2 ) 𝑥2 ≤ 𝑥 < 𝑥3
𝐹(𝑥) = .
.
.
{ 𝑓(𝑥1 ) + 𝑓(𝑥2 ) + … … . 𝑓(𝑥𝑛 ) = 1 𝑥𝑛 ≤ 𝑥 < ∞
Summary:
1) 𝑬𝒙𝒑𝒆𝒄𝒕𝒆𝒅 𝒗𝒂𝒍𝒖𝒆; 𝝁 = 𝑬(𝒙) = ∑𝒙 𝒙𝒇(𝒙) = ∑𝒙 𝒙. 𝑷(𝒙) 𝒇(𝒙) = 𝑷(𝑿 = 𝒙)
2) 𝑽𝒂𝒓𝒊𝒂𝒏𝒄𝒆; 𝝈𝟐 = 𝑬(𝑿𝟐 ) − 𝝁𝟐 = ∑𝒙 𝒙𝟐 𝑷(𝒙) − 𝝁𝟐 .
3) 𝑺𝒕𝒂𝒏𝒅𝒂𝒓𝒅 𝒅𝒆𝒗𝒊𝒂𝒕𝒊𝒐𝒏; 𝝈 = √𝝈𝟐
Examples on Discrete Probability
Example (1): A random variable X has the following probability distribution given by the table;
x 1 2 3 4 5
𝒇(𝒙) = 𝑷(𝒙) 0.12 0.15 0.23 0.3 0.2
Calculate: 1) Expected value for the random variable X.
2) Variance and standard deviation for the random variable X.
3) The cumulative probability function F(x).
Solution
1) ∵ 𝑬𝒙𝒑𝒆𝒄𝒕𝒆𝒅 𝒗𝒂𝒍𝒖𝒆; 𝝁 = 𝑬(𝒙) = ∑𝒙 𝒙. 𝑷(𝒙)
∴ 𝑬𝒙𝒑𝒆𝒄𝒕𝒆𝒅 𝒗𝒂𝒍𝒖𝒆 𝝁 = (1) × (0.12) + (2) × (0.15) + (3) × (0.23) + (4) × (0.3) + (5) × (0.2) = 3.31
2) ∵ 𝑽𝒂𝒓𝒊𝒂𝒏𝒄𝒆; 𝝈𝟐 = 𝑬(𝑿𝟐 ) − 𝝁𝟐 = ∑𝒙 𝒙𝟐 . 𝑷(𝒙) − 𝝁𝟐 .
∴ 𝑽𝒂𝒓𝒊𝒂𝒏𝒄𝒆; 𝝈𝟐 = [(1)2 × (0.12) + (2)2 × (0.15) + (3)2 × (0.23) + (4)2 × (0.3) + (5)2 × (0.2)] − (3.31)2
= 12.59 – (3.31)2 = 1.6339
𝑺𝒕𝒂𝒏𝒅𝒂𝒓𝒅 𝒅𝒆𝒗𝒊𝒂𝒕𝒊𝒐𝒏; 𝝈 = √𝝈𝟐 = √1.6339 = 1.278 .
3) 𝑻𝒉𝒆 𝒄𝒖𝒎𝒖𝒍𝒂𝒕𝒊𝒗𝒆 𝒅𝒊𝒔𝒕𝒓𝒊𝒃𝒖𝒕𝒊𝒐𝒏 𝒇𝒖𝒏𝒄𝒕𝒊𝒐𝒏 𝑭(𝒙) is given by the following table:
P(x) 0.12 0.15 0.23 0.3 0.2
F(X) 0.12 0.27 0.50 0.80 1
2
Example (2): The number of adults living in homes on a randomly selected city block is described by the
following probability distribution.
Number of adults, x 1 2 3 4
Probability, P(x) 2.5 k 5k 1.5 k k
Calculate: 1) Find the value of the constant k and the expected value for the random variable X.
2) Variance and standard deviation for the random variable X.
3) The cumulative probability function F(x).
Solution
1
1) ∑ 𝑷(𝒙) = 𝟏, ⟹ 2.5 𝑘 + 5𝑘 + 1.5𝑘 + 𝑘 = 1 ⟹ 10 𝑘 = 1 ⟹ 𝑘 = 10, therefore,
Number of adults, x 1 2 3 4
Probability, P(x) 25 /100 50/100 15/100 10/100
𝑬𝒙𝒑𝒆𝒄𝒕𝒆𝒅 𝒗𝒂𝒍𝒖𝒆; 𝝁 = 𝑬(𝒙) = ∑ 𝒙𝒇(𝒙) = (1 × 0.25) + (2 × 0.5) + (3 × 0.15) + (4 × 0.1) = 2.1
𝒙
2) ∵ 𝑽𝒂𝒓𝒊𝒂𝒏𝒄𝒆; 𝝈𝟐 = ∑𝒙 𝒙𝟐 𝑷(𝒙) − 𝝁𝟐 .
∴ 𝑽𝒂𝒓𝒊𝒂𝒏𝒄𝒆; 𝝈𝟐 = [(12 × 0.25) + (22 × 0.5) + (32 × 0.15) + (42 × 0.1)]– (2.10)2 = 0.79
𝑺𝒕𝒂𝒏𝒅𝒂𝒓𝒅 𝒅𝒆𝒗𝒊𝒂𝒕𝒊𝒐𝒏; 𝝈 = √𝝈𝟐 = √0.79 = 0.889
3) 𝑻𝒉𝒆 𝒄𝒖𝒎𝒖𝒍𝒂𝒕𝒊𝒗𝒆 𝒅𝒊𝒔𝒕𝒓𝒊𝒃𝒖𝒕𝒊𝒐𝒏 𝒇𝒖𝒏𝒄𝒕𝒊𝒐𝒏 𝑭(𝒙) is given by the following table:
P(x) 0.25 0.50 0.15 0.10
F(x) 0.25 0.75 0.90 1
Example (3): Let an experiment consist of tossing a fair coin three times. Let X denote the number of heads
which appear. Construct the probability distribution of the random variable X, then Calculate:
i) Expected value. ii) Variance and standard deviation for the random variable X.
iii) The cumulative probability function F(x).
Solution
You toss a coin 3 times. Three are 8 possible outcomes:
{𝐇𝐇𝐇 , 𝐇𝐇𝐓 , 𝐇𝐓𝐓 , 𝐓𝐓𝐓 , 𝐓𝐓𝐇 , 𝐓𝐇𝐇 , 𝐓𝐇𝐓 , 𝐇𝐓𝐇 } . (H = heads, T = tails)
Now take X = number of heads. The probability distribution of X is given by the following table,
Xi 0 1 2 3
P(x) 1/8 3/8 3/8 1/8
1 3 3 1 12
i) 𝑬𝒙𝒑𝒆𝒄𝒕𝒆𝒅 𝒗𝒂𝒍𝒖𝒆; 𝝁 = 𝑬(𝒙) = ∑𝒙 𝒙. 𝒑(𝒙) = (0 × 8) + (1 × 8) + (2 × 8) + (3 × 8) = 8
= 1.5
1 3 3 1
ii) 𝑽𝒂𝒓𝒊𝒂𝒏𝒄𝒆; 𝝈𝟐 = ∑𝒙 𝒙𝟐 𝒇(𝒙) − 𝝁𝟐 = [(02 × 8) + (12 × 8) + (22 × 8) + (32 × 8)] − 2.25 = 3 − 2.25 = 0.75
3
𝑺𝒕𝒂𝒏𝒅𝒂𝒓𝒅 𝒅𝒆𝒗𝒊𝒂𝒕𝒊𝒐𝒏; 𝝈 = √𝝈𝟐 = √0.75 = 0.866
iii) 𝑻𝒉𝒆 𝒄𝒖𝒎𝒖𝒍𝒂𝒕𝒊𝒗𝒆 𝒅𝒊𝒔𝒕𝒓𝒊𝒃𝒖𝒕𝒊𝒐𝒏 𝒇𝒖𝒏𝒄𝒕𝒊𝒐𝒏 𝑭(𝒙) is given by the following table:
P(x) 1/8 3/8 3/8 1/8
F(x) 1/8 4/8 7/8 1
Example (4): A retail outlet has a shipment of 12 similar microscopes of which 4 are defective. If a laboratory
purchased at random 3 of these microscopes.
i) Construct the probability distribution for the defectives, then calculate:
ii) Find the expected value for the number of defectives (random variable).
iii) Find the variance and standard deviation. iv) Calculate the cumulative function F(x).
Solution
i) Let 𝑿 be the random variable, that represents the number of defective microscopes 0 ,1 , 2 , 3 then,
𝐶04 × 𝐶38 1×56 𝟓𝟔
𝑃(0𝐷, 3𝐷 ′ ) = = = .
𝐶312 66 𝟐𝟐𝟎
𝐶14 × 𝐶28 4×28 𝟏𝟏𝟐
𝑃(1𝐷, 2𝐷 ′ ) = = = .
𝐶312 66 𝟐𝟐𝟎
𝐶24 × 𝐶18 6×8 𝟒𝟖
𝑃(2𝐷, 1𝐷 ′ ) = = = ,
𝐶312 66 𝟐𝟐𝟎
𝐶34 × 𝐶08 4×1 𝟒
𝑃(3𝐷, 0𝐷 ′ ) = = = .
𝐶312 66 𝟐𝟐𝟎
The probability distribution for the defectives is,
𝑿=𝑫 0 1 2 3
𝟓𝟔 𝟏𝟏𝟐 𝟒𝟖 𝟒
𝑷(𝑿 = 𝒙)
𝟐𝟐𝟎 𝟐𝟐𝟎 𝟐𝟐𝟎 𝟐𝟐𝟎
𝟓𝟔 𝟏𝟏𝟐 𝟒𝟖 𝟒 220
ii) 𝑬𝒙𝒑𝒆𝒄𝒕𝒆𝒅 𝒗𝒂𝒍𝒖𝒆; 𝝁 = 𝑬(𝒙) = ∑𝒙 𝒙𝑷(𝒙) = ( 0 × 𝟐𝟐𝟎 ) + ( 1 × 𝟐𝟐𝟎 ) + ( 2 × 𝟐𝟐𝟎 ) + (3 × 𝟐𝟐𝟎) = 220 = 𝟏
𝟓𝟔 𝟏𝟏𝟐 𝟒𝟖 𝟒 𝟔
iii) 𝑽𝒂𝒓𝒊𝒂𝒏𝒄𝒆; 𝝈𝟐 = ∑ 𝒙𝟐 𝑷(𝒙) − 𝝁𝟐 = ( 02 × 𝟐𝟐𝟎 ) + ( 12 × 𝟐𝟐𝟎 ) + ( 22 × 𝟐𝟐𝟎 ) + (32 × 𝟐𝟐𝟎) − 1 = 𝟏𝟏 = 𝟎. 𝟓𝟒𝟓
𝑺𝒕𝒂𝒏𝒅𝒂𝒓𝒅 𝒅𝒆𝒗𝒊𝒂𝒕𝒊𝒐𝒏; 𝝈 = √𝝈𝟐 = √0.545 = 𝟎. 𝟕𝟑𝟗
iv) 𝑻𝒉𝒆 𝒄𝒖𝒎𝒖𝒍𝒂𝒕𝒊𝒗𝒆 𝒅𝒊𝒔𝒕𝒓𝒊𝒃𝒖𝒕𝒊𝒐𝒏 𝒇𝒖𝒏𝒄𝒕𝒊𝒐𝒏 𝑭(𝒙) is given by the following table:
𝟓𝟔 𝟏𝟏𝟐 𝟒𝟖 𝟒
𝑷(𝑿 = 𝒙)
𝟐𝟐𝟎 𝟐𝟐𝟎 𝟐𝟐𝟎 𝟐𝟐𝟎
𝟓𝟔 𝟏𝟔𝟖 𝟐𝟏𝟔 𝟐𝟐𝟎
𝑭(𝒙) =𝟏
𝟐𝟐𝟎 𝟐𝟐𝟎 𝟐𝟐𝟎 𝟐𝟐𝟎
4
MSA University Module Title: Probability & Statistics
Faculty of Engineering Module Code: MAT 361
Exercise (3)
(1) In a recent little league softball game, each player went to bat 4 times. The number of hits made by each
player is described by the following probability distribution.
Number of hits, x 0 1 2 3 4
Probability, P(x) 0.10 0.20 0.30 0.25 0.15
Calculate:
i) Expected value for the random variable X ii) Variance and standard deviation.
iii) The cumulative probability function F(x). [𝑨𝒏𝒔: 2.15 , 1.428 , 1.19 ]
(2) Suppose a random variable X has the following probability distribution P(xi):
x 0 1 2 3
𝐹(𝑥) = 𝑃(𝑥) k 3k 3k k
Calculate:
i) The value of k and the expected value of random variable X
ii) Variance and standard deviation for the random variable X.
iii) Cumulative distribution function F(x).
(3) The number of adults living in homes on a randomly selected city block is described by the probability
distribution,
Number of adults, x 1 2 3 4
𝑷(𝒙) 0.15 k 0.30 k 0.90 k 0.60 k
Calculate:
i) The value of k and the expected value of random variable X
ii) Variance and standard deviation for the random variable X.
iii) Cumulative distribution function F(x).
(4) A shipment of 8 similar microcomputers to a retail outlet contains 3 that are defective. If a school make a
random purchase of 2 of these computers. Calculate:
i) The probability distribution for the number of defectives.
ii) Expected value for the number of defectives
iii) The Variance and standard deviation.
iv) The cumulative function F(x).
Dr. Mohamed Said