3.1 Concept of A Random Variable 3.2 Discrete Probability Distributions
3.1 Concept of A Random Variable 3.2 Discrete Probability Distributions
PROBABILITY
DISTRIBUTIONS
1
Lecture’s outline
2
Definition and Classification
Head or Tail
The experiment consists of tossing 3 coins and indicating the sequence of
heads or tails obtained.
1. Write all the possible outcomes of the sample space S.
𝑆 = 𝐻𝐻𝐻; 𝐻𝐻𝑇; 𝐻𝑇𝐻; 𝐻𝑇𝑇; 𝑇𝐻𝐻; 𝑇𝐻𝑇; 𝑇𝑇𝐻; 𝑇𝑇𝑇
2. Denote by X the mapping from S to ℝ wich associates to each outcome
𝑋 𝑖𝑠 𝑐𝑎𝑙𝑙𝑒𝑑
𝑟𝑎𝑛𝑑𝑜𝑚
s of S the number X of heads obtained and by 𝑅! the set of all possible
𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒 values of X.
𝑅! = {0; 1; 2; 3}
a. List all the possible values of X.
𝑠 = 𝐻𝐻𝐻 𝑋 = 3 𝑠 = 𝐻𝑇𝐻 𝑋 = 2 𝑠 = 𝑇𝐻𝐻 𝑋 = 2 𝑠 = 𝑇𝑇𝐻 𝑋=1
𝑠 = 𝐻𝐻𝑇 𝑋 = 2 𝑠 = 𝐻𝑇𝑇 𝑋 = 1 𝑠 = 𝑇𝐻𝑇 𝑋 = 1 𝑠 = 𝑇𝑇𝑇 𝑋=0
3
Definition and Classification (Cont’d)
b. Calculate 𝑃 𝑋 = 0 , 𝑃 𝑋 = 1 , 𝑃 𝑋 = 2 , 𝑃 𝑋 = 3 .
𝑆 = 𝐻𝐻𝐻; 𝐻𝐻𝑇; 𝐻𝑇𝐻; 𝐻𝑇𝑇; 𝑇𝐻𝐻; 𝑇𝐻𝑇; 𝑇𝑇𝐻; 𝑇𝑇𝑇
1
𝑃 𝑋 = 0 = 𝑃 𝑇𝑇𝑇 =
8
𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 3
𝑑𝑖𝑠𝑡𝑟𝑖𝑏𝑢𝑡𝑖𝑜𝑛 𝑃 𝑋 = 1 = 𝑃 𝐻𝑇𝑇; 𝑇𝐻𝑇; 𝑇𝑇𝐻 =
𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 8
𝑜𝑓 𝑋 3
(𝑝𝑑𝑓) 𝑃 𝑋 = 2 = 𝑃 𝐻𝐻𝑇; 𝐻𝑇𝐻; 𝑇𝐻𝐻 =
8
1
𝑃 𝑋 = 3 = 𝑃 𝐻𝐻𝐻 =
8
c. Calculate 𝑃 𝑋 = 0 + 𝑃 𝑋 = 1 + 𝑃 𝑋 = 2 + 𝑃 𝑋 = 3 .
𝑃 𝑋 =0 +𝑃 𝑋 =1 +𝑃 𝑋 =2 +𝑃 𝑋 =3 =1
5
Definition and Classification (Cont’d)
𝑋=𝒙 𝟎 𝟏 𝟐 𝟑 𝑻𝒐𝒕𝒂𝒍
1 3 3 1
𝑓 𝑥 =𝑃 𝑋=𝑥 1
pd
f 8 8 8 8
pdf
0.4 0.375 0.375
0.35
0.3
0.25
f(x)
0.2
0.1
0.05
0
0 1 2 3
X
6
Definition and Classification
Definition.
Ø A random variable is a function that assigns values to each outcome of an
experiment.
Ø There is a probability associated with each value.
Ø Probabilities associated with each value will be called probability distribution
function (pdf) or f(x).
Classification.
A random variable could be
Ø Discrete i.e. it can take on distinct or separate values (countable).
Ø Continuous i.e. it can take any value in an interval.
7
Definition and Classification
Example 1. Example 3.
A fair coin is tossed once. Z is the year a random
X is the random variable Discrete student at LIU was born.
equal to 1 if head appears
and 0 otherwise.
Discrete
Example 4.
Example 2.
T is the exact winning
Y is the exact mass of a
Continuous time for the men’s 100-
random student at LIU.
meter dash.
Continuous
8
Discrete random variables
Discrete Probability Distribution.
If X is a discrete random variable, then its (pdf) verify the following
properties:
1. 𝑓 𝑥 ≥ 0 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑥.
2. ∑8 𝑓 𝑥 = 1.
3. 𝑓 𝑥 = 𝑃(𝑋 = 𝑥).
9
Discrete random variables (Cont’d)
Example 1: A box contains 3 defective items and 2 good items. Items are tested one
after the other without replacement until a good item is found.
Let X denotes the number of trials.
Find RX and f(x).
𝑆 = { 1; 1 ; 1; 2 ; … ; 6; 6 } 𝑅𝑋 = {2, 3,4,5,6,7,8,9,10,11,12}
1
𝑃 𝑋 = 2 = 𝑃 {1; 1} =
36
2 1
𝑃 𝑋 = 3 = 𝑃 (1; 2 ; (2; 1)} = =
36 18
3 1
𝑃 𝑋 = 4 = 𝑃 { 1; 3 ; 2; 2 ; 3; 1 } = =
36 12
4 1
𝑃 𝑋 = 5 = 𝑃 { 1; 4 ; 2; 3 ; 3; 2 ; (4; 1)} = =
36 9
11
Discrete random variables (Cont’d)
Example 2:
5
𝑃 𝑋 = 6 = 𝑃 { 1; 5 ; 2; 4 ; 3; 3 ; 4; 2 ; (5; 1)} =
36
6 1
𝑃 𝑋 = 7 = 𝑃 { 1; 6 ; 2; 5 ; 3; 4 ; 4; 3 ; 5; 2 ; (6; 1)} = =
36 6
5
𝑃 𝑋 = 8 = 𝑃 2; 6 ; 3; 5 ; 4; 4 ; 5; 3 ; 6; 2 =
36
4 1
𝑃 𝑋 = 9 = 𝑃 3; 6 ; 4; 5 ; 5; 4 ; 6; 3 = =
36 9
3 1
𝑃 𝑋 = 10 = 𝑃 4; 6 ; 5; 5 ; 6; 4 = =
36 12
2 1
𝑃 𝑋 = 11 = 𝑃 5; 6 ; 6; 5 = =
36 18
1
𝑃 𝑋 = 12 = 𝑃 6; 6 =
36 12
Discrete random variables (Cont’d)
Example 2:
𝑋=𝒙 𝟐 𝟑 𝟒 𝟓 𝟔 𝟕 𝟖 𝟗 𝟏𝟎 𝟏𝟏 𝟏𝟐 𝑻𝒐𝒕𝒂𝒍
1 1 1 1 5 1 5 1 1 1 1
𝑓 𝑥 =𝑃 𝑋=𝑥 1
36 18 12 9 36 6 36 9 12 18 36
13
Discrete random variables (Cont’d)
Example 3: Let, 𝑓(𝑥) = 𝑘 𝑥 , 𝑥 = 1, 2, 3, 4
1. Find 𝑘.
2. Compute,
i) 𝑃(𝑋 = 2)
ii) 𝑃(𝑋 > 2)
1. | 𝑓 𝑥 = 1 𝑓 1 +𝑓 2 +𝑓 3 +𝑓 4 =1
8
𝑘 + 2𝑘 + 3𝑘 + 4𝑘 = 1
1
𝑘= = 0.1
10
𝑓(𝑥) = 0.1𝑥
14
Discrete random variables (Cont’d)
Example 3:
2. 𝑓(𝑥) = 0.1𝑥
i𝑖)𝑃 𝑋 > 2 = 𝑃 𝑋 = 3 + 𝑃 𝑋 = 4
=𝑓 3 +𝑓 4
= 0.3 + 0.4
= 0.7
15
Discrete random variables (Cont’d)
Example 4: A shipment of 8 similar microcomputers to a retail outlet contains 3 that
are defective. If a school makes purchase of 2 of these computers, find the
probability distribution for the number of defectives.
3𝐶1×5𝐶1 15
𝑃 𝑋 = 1 = 𝑃 1𝐷1𝑛𝑜𝑛𝐷 = =
8𝐶2 28
16
Cumulative Distribution Function
Definition.
The Cumulative distribution 𝑭(𝒙) of a discrete random variable 𝑋
with probability 𝑓(𝑥) is
𝐹 𝑥 = 𝑃 𝑋 ≤ 𝑥 = |𝑓 𝑡 , 𝑥∈ℝ
9:8
Note.
There are many problems where we may wish to compute the
probability that the observed value of a random variable X will be
less than or equal to some real number x.
17
Cumulative Distribution Function (Cont’d)
Example 1: Find the cumulative distribution of the following probability
distribution;
f(0)=1/16, f(1)=1/4, f(2)=3/8, f(3)=1/4, and f(4)=1/16
Using F(x), verify that f(2)= 3/8
𝑅! = {0; 1; 2; 3; 4}
𝐹 𝑥 =𝑃 𝑋≤𝑥 , 𝑥∈ℝ
1
𝑓𝑜𝑟 𝑥 = 0: 𝐹 0 = |𝑓 𝑡 = 𝑓(0) =
9:;
16
1 1 5
𝑓𝑜𝑟 𝑥 = 1: 𝐹 1 = |𝑓 𝑡 = 𝑓 0 + 𝑓(1) = + =
9:<
16 4 16
18
Cumulative Distribution Function (Cont’d)
Example 1: f(0)=1/16, f(1)=1/4, f(2)=3/8, f(3)=1/4, and f(4)=1/16
𝑓𝑜𝑟 𝑥 = 2: 𝐹 2 = | 𝑓 𝑡 1 1 3 11
= 𝑓 0 + 𝑓 1 + 𝑓(2) = + + =
9:= 16 4 8 16
1 1 3 1 15
𝑓𝑜𝑟 𝑥 = 3: 𝐹 3 = | 𝑓 𝑡 = 𝑓 0 + 𝑓 1 + 𝑓 2 + 𝑓(3) = + + + =
9:>
16 4 8 4 16
𝑓𝑜𝑟 𝑥 = 4: 𝐹 4 = | 𝑓 𝑡 = 𝑓 0 + 𝑓 1 + 𝑓 2 + 𝑓 3 + 𝑓(4)
9:? 1 1 3 1 1
= + + + +
16 4 8 4 16
=1
19
Cumulative Distribution Function (Cont’d)
Example 1: f(0)=1/16, f(1)=1/4, f(2)=3/8, f(3)=1/4, and f(4)=1/16
0, 𝑥<0
1
, 0≤𝑥<1
16
5
, 1≤𝑥<2
𝐹 𝑥 = 16
11
, 2≤𝑥<3
16
15
, 3≤𝑥<4
16
1, 𝑥≥4
20
Cumulative Distribution Function (Cont’d)
Example 1: Using F(x), verify that f(2)= 3/8
0, 𝑥<0
1
, 0≤𝑥<1
16
𝐹 2 = 𝑓 0 + 𝑓 1 + 𝑓(2) 𝐹 1 5
, 1≤𝑥<2
𝐹 1 = 𝑓 0 + 𝑓(1) 𝐹 𝑥 = 16
11
, 2≤𝑥<3
𝐹 2 − 𝐹 1 = 𝑓(2) 2 16
𝐹 15
, 3≤𝑥<4
𝑓 2 =𝐹 2 −𝐹 1 16
1, 𝑥≥4
11 5
= −
16 16
3
=
8 21
Let’s test our understanding!
Exercise 1.
Exercise 2.
22
Let’s test our understanding!
Exercise 3.
23