Topic 2_Discrete Random Variables and Probability Distributions
Topic 2_Discrete Random Variables and Probability Distributions
Variables
The probability distribution of a discrete random variable X tells us how the total
probability of 1 is distributed among the possible X values.
For example, the probability distribution in the case of simultaneous toss of three coins
will tell us how the probability of 1 is subdivided among the four possible values—
how much probability is associated with the X value 0, how much is apportioned to the
X value 1, and so on. We will use the following notation for the probabilities in the
distribution:
In general, p(x) or f(x) will denote the probability assigned to the value x.
1
1
Probability Distributions for Discrete Random
Variables
The probability distribution or the probability mass function (pmf) of a discrete
random variable is defined for every value of the random variable x by
𝑝 𝑥 =𝑓 𝑥 =𝑃 𝑋=𝑥
The values of X along with their probabilities collectively specify the pmf.
(a) 𝑝 𝑥 ≥ 0 ∀ 𝑥
(b) σ 𝑝 𝑥 = 1
2
2
Numericals
Q1. Find the probability distribution or the pmf of the sum of numbers obtained on
throwing a pair of dice.
3
3
Sample Space of the Experiment Probability Distribution or pmf
x f(x) = p(x) = P(X=x)
(1,1) (1,2) (1,3) (1,4) (1,5) (1,6)
(2,1) (2,2) (2,3) (2,4) (2,5) (2,6) 2 1/36
(3,1) (3,2) (3,3) (3,4) (3,5) (3,6) 3 2/36
(4,1) (4,2) (4,3) (4,4) (4,5) (4,6)
4 3/36
(5,1) (5,2) (5,3) (5,4) (5,5) (5,6)
(6,1) (6,2) (6,3) (6,4) (6,5) (6,6) 5 4/36
6 5/36
Sum of the Numbers 7 6/36
234567 8 5/36
345678
9 4/36
456789
10 3/36
5 6 7 8 9 10
6 7 8 9 10 11 11 2/36
7 8 9 10 11 12 12 1/36
It is a valid pmf because 𝑝 𝑥 ≥ 0 ∀ 𝑥 and 4
σ𝑝 𝑥 = 1 4
Numericals
Q2. Consider a group of five potential blood donors—a, b, c, d, and e—of whom only
a and b have O+ type blood. Five blood samples, one from each individual, will be
typed in random order until an O+ individual is identified.
Let the rv Y = the number of typings necessary to identify an O+ individual. Find the
pmf of Y.
5
5
Y = the number of typings required to identify an O+ individual.
(There are 5 people, 2 (a and b) are O+. So number of typings required to identify an
O+ people are 1,2,3 and 4
6
6
In tabular form, the pmf is: A line graph of the pmf is:
p(y)
y
7
7
Bernoulli Random Variable
• Suppose an experiment is performed with two possible outcomes: either success or
failure. Success happens with probability p while failure happens with probability 1-
p.
• A random variable that takes value 1 in case of success and 0 in case of failure is
called a Bernoulli Random Variable.
8
8
Bernoulli Random Variable
9
9
Cumulative Distribution Function (cdf)
• For some fixed value x, we often wish to compute the probability that the observed
value of X will be at most x.
• The cumulative distribution function (cdf) F(x) of a discrete rv variable X with pmf
p(x) or f(x) is defined for every number x by
1. 𝐹 −∞ = 0 𝑎𝑛𝑑 𝐹 ∞ = 1
2. 𝐼𝑓 𝑎 < 𝑏, 𝑡ℎ𝑒𝑛 𝐹 𝑎 ≤ 𝐹 𝑏 𝑓𝑜𝑟 𝑎𝑛𝑦 𝑟𝑒𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟𝑠 𝑎 𝑎𝑛𝑑 𝑏
10
10
Numericals
Q. Find the distribution function of the total number of heads obtained in four tosses
of a balanced coin.
11
11
Numericals
Sample Space:
HHHH, HHHT, HHTH, HHTT, HTHH, HTHT, HTTH, HTTT, THHH, THHT,
THTH, THTT, TTHH, TTHT, TTTH, TTTT
First find out the pmf of X i.e. the probability associated with each value of the
random variable X.
p(0)=f(0)=P(X=0)=1/16
p(1)=f(1)=P(X=1)=4/16
p(2)=f(2)=P(X=2)=6/16
p(3)=f(3)=P(X=3)=4/16
p(4)=f(4)=P(X=4)=1/16
12
12
Numericals
1
𝐹 0 =𝑃 𝑋≤0 =𝑓 0 =
16
𝐹 1 = 𝑃 𝑋 ≤ 1 = 𝑓 0 + 𝑓(1) = 5/16
𝐹 2 = 𝑃 𝑋 ≤ 2 = 𝑓 0 + 𝑓 1 + 𝑓(2) = 11/16
𝐹 3 = 𝑃 𝑋 ≤ 3 = 𝑓 0 + 𝑓 1 + 𝑓 2 + 𝑓(3) = 15/16
𝐹 4 = 𝑃 𝑋 ≤ 4 = 𝑓 0 + 𝑓 1 + 𝑓 2 + 𝑓 3 + 𝑓(4) = 1
13
13
Hence, the distribution function is given by:
0 𝑓𝑜𝑟 𝑥 < 0
1
𝑓𝑜𝑟 0 ≤ 𝑥 < 1
16
5
𝑓𝑜𝑟 1 ≤ 𝑥 < 2
𝐹 𝑥 = 16
11
𝑓𝑜𝑟 2 ≤ 𝑥 < 3
16
15
𝑓𝑜𝑟 3 ≤ 𝑥 < 4
16
1 𝑓𝑜𝑟 𝑥 ≥ 4
Notice that pmf is defined only at the possible values of the random variable.
However, the distribution function is defined for all values in the interval −∞ < 𝑥
<∞
𝑓 1.8 = 𝑃 𝑋 = 1.8 = 0
𝐹 1.8 = 𝑃 𝑋 ≤ 1.8 = 𝑃 𝑋 ≤ 1 = 𝑃 𝑋 = 0 + 𝑃 𝑋 = 1 = 𝐹 1 = 5/16
14
14
Numericals
Q.
15
15
𝐹 1 = 𝑃 𝑌 ≤ 1 = 𝑓 1 = 0.05
𝐹 2 = 𝑃 𝑌 ≤ 2 = 𝑓 1 + 𝑓(2) = 0.15
𝐹 4 = 𝑃 𝑌 ≤ 4 = 𝑓 1 + 𝑓 2 + 𝑓(4) = 0.5
𝐹 8 = 𝑃 𝑌 ≤ 8 = 𝑓 1 + 𝑓 2 + 𝑓 4 + 𝑓(8) = 0.9
𝐹 16 = 𝑃 𝑌 ≤ 16 = 𝑓 1 + 𝑓 2 + 𝑓 4 + 𝑓 8 + 𝑓(16) = 1
Now for any other number y, F(y) will equal the value of F at the closest possible
value of Y to the left of y. For example,
F(7.999) = P(Y ≤ 7.999) = P(Y ≤ 4) = F(4) = 0 .50
F(2.7) = P(Y ≤ 2.7) = P(Y ≤ 2) = F(2) = 0 .15
0 𝑓𝑜𝑟 𝑦 < 1
0.05 𝑓𝑜𝑟 1 ≤ 𝑦 < 2
0.15 𝑓𝑜𝑟 2 ≤ 𝑦 < 4
𝐹 𝑦 =
0.5 𝑓𝑜𝑟 4 ≤ 𝑦 < 8
0.90 𝑓𝑜𝑟 8 ≤ 𝑥 < 16
1 𝑓𝑜𝑟 𝑥 ≥ 16
17
17
Line Graph of the cdf (Step Function)
18
18
Obtaining Probability Mass Function (pmf) from
Cumulative Distribution Function (cdf)
• In examples thus far, the cdf has been derived from the pmf.
• This process can be reversed to obtain the pmf from the cdf whenever the latter
function is available.
• Suppose the possible values of a random variable X are 0,1,…,6.
• Also, the probability that X falls in a specified interval can be obtained from the cdf.
For example:
𝑃 2≤𝑋 ≤4 =𝑝 2 +𝑝 3 +𝑝 4
= p 0 +p 1 +p 2 +p 3 +p 4 − p 0 +p 1 = F 4 − F(1)
19
19
Obtaining Probability Mass Function (pmf) from
Cumulative Distribution Function (cdf)
• Notice that 𝑃 2 ≤ 𝑋 ≤ 4 ≠ F 4 − F(2) because the X value 2 is included in
2 ≤ 𝑋 ≤ 4. So, we do not want to subtract out its probability.
20
20
Numericals
𝐹 10 = 𝑃 𝑋 ≤ 10 = 𝑓 1 + 𝑓 4 + 𝑓 6 + 𝑓 10 = 1
5 1
𝑓 10 = 1 − =
6 6
22
22
𝐻𝑒𝑛𝑐𝑒, 𝑡ℎ𝑒 𝑝𝑚𝑓 𝑖𝑠:
1
, 𝑥=1
3
1
, 𝑥=4
6
𝑓 𝑥 = 1
, 𝑥=6
3
1
, 𝑥 = 10
6
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
5 1 1
(b) 𝑃 2 ≤ 𝑋 ≤ 6 = F 6 − F 1 = − =
6 3 2
1
(c) 𝑃 2 < 𝑋 ≤ 6 = 𝐹 6 − 𝐹 2 = 𝐹 6 − 𝐹 1 =
2
1 1 1
𝑑 𝑃 𝑋 =4 =𝐹 4 −𝐹 1 = − =
2 3 6 23
23
Q. If X has the distribution function - 0, 𝑥 < −1
1
, −1 ≤ 𝑥 < 1
4
1
𝐹 𝑥 = , 1≤𝑥<3
2
3
, 3≤𝑥<5
4
1, 𝑥 ≥ 5