Lecture 4-Discrete Random Variables .pdf

SThyNguyn 1 views 42 slides May 22, 2025
Slide 1
Slide 1 of 42
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42

About This Presentation

The lecture "Discrete Random Variables in Probability, Statistics & Random Processes" at HCMIU introduces the concept of discrete random variables and their applications. It covers probability mass functions, expected values, and variances for distributions like binomial, Poisson, and ...


Slide Content

Discreterandomvariables
October19,2023
1 / 38

Objectives
1Understandrandomvariables2FordiscreterandomvariablesaDetermine probabilities from probability mass
functions and the reverse
bDetermine probabilities from cumulative
distribution functions and cumulative
distribution functions from probability mass
functions, and the reverse
2 / 38

Intro
•Samplespaceandeventsarebasic
componentsofprobability
•Similartonumbersincalculus
•Studytherelationsbetweennumberswe
usefunctions
•Inprobabilityweuserandomvariables
3 / 38

Definition
ArandomvariableXdefinedonasamplespace
Ωisaquantitythatiscalculatedbytheoutcomes
-afunctionofoutcomes
4 / 38

Example
•Tossacointhreetimes
•Xbethenumberoftimesthattailsappear
•SamplespaceΩ =
{HHH,HHT,HTH,HTT,THH,THT,TTH,TTT}
•X(HHH) =0,X(HHT) =1 ...
5 / 38

wHHHHHTHTHHTTTHHTHTTTHTTT
X(w)0 1 1 2 1 2 2 3
All possible values ofXare 0, 1, 2, 3. We sayRange(X) =
{0,1,2,3}
P(X=0) =P(there is no tail) =P(HHH) =
1
8
P(X=1) =P(there is 1 tail) =P({HHT,HTH,THH}) =
3
8
6 / 38

Example
•TossingafaircoinuntilaHeadappear.
Thesamplespaceis
Ω ={H,TH,TTH,TTTH,...}
•X: thenumberoftossing
•Range(X) ={1,2,3,......}
•X=1ifandonlyifthefirstcointurnshead
soP(X=1) =P(firstcointurnsH) =0.5
7 / 38

Question
Evaluate
P(X=2)
and
P(1<X≤4)
8 / 38

TypesofRV
BasedonrangeoftherandomvariableX
•IfthesetofpossiblevaluesofXisfiniteor
countablelike{0,1,2,3},{1,2,...}then
XiscalleddiscreteRV
•IfthesetofpossiblevaluesofXis
uncountable(liketheinterval[a,b],
[a,∞))thenXiscalledcontinuousRV
9 / 38

Probabilityassociatedwitha
randomvariableX
P(X=a),P(X≥a),P(X>a),
P(X≤b),P(X<b),
P(a≤X≤b),P(a<X≤b),
P(a≤X<b),P(a<X<b)
10 / 38

Cumulativedistributionfunction
(cdf)
cdfofF(.)oftherandomvariableXisafunction
definedby
F(b) =P(X≤b)
istheprobabilitythatXtakesonvalueslessthan
orequaltob
11 / 38

Use cdf to answer questions about a random variable
P(X≤b) =F(b)
P(X<b) = lim
h→0
+
P(X≤b−h) = lim
x→b

F(x) =F(b

)
P(X>a) =1−P(X≤a) =1−F(a)
P(a<X≤b) =P(X≤b)−P(X≤a) =F(b)−F(a)
P(a≤X≤b) =F(b)−F(a

)
P(a<X<b) =F(b

)−F(a)
12 / 38

DiscreteRandomVariables
Randomvariablecantakeonatmostcount-
ablenumberofpossiblevalues
Range(X)={x
1,x
2,...}
13 / 38

Probabilitymassfunction
Theprobabilitymassfunction(p.m.f)ofthedis-
creterandomvariableXisdefinedas
p(xi) =P(X=xi)forallxi∈Range(X)
theprobabilitythatthevalueofXisequaltoxi
14 / 38

Example
Rolltwofairdice
Ω ={(1,1,),...,(6,6)}={(i,j) :1≤i,j≤6}
LetXbe the largest of numbers on two dice, i.e
iftherollingresultis(i,j)then
X(i,j) = max(i,j)
15 / 38

TablevaluesofX
16 / 38

AllpossiblevaluesofXis
Range(X) ={1,2,3,4,5,6}
soXisadiscreterandomvariable.
In order to determine the pmf ofX, we need to
findalltheprobabilities
P(X=1),P(X=2),...,P(X=6)
17 / 38

X=1ifandonlyiftheoutcomeis(1,1). So
P(X=1) =P((1,1)) =1/36
X=2 if and only if the outcomes is one of
(1,2),(2,2),(2,2). So
P(X=2) =P({(1,2),(2,1),(2,2)})
=P((1,2))+P((2,1))+P((2,2) =3/36
18 / 38

Similar,wehaveP(X=3) =5/36,P(X=4) =
7/36,P(X=5) =9/36,P(X=6) =11/36.
Wecansummaryp.m.fofXinthe
x 123456
P(X=x)
1
36
3
36
5
36
7
36
9
36
11
36
19 / 38

Similar,wehaveP(X=3) =5/36,P(X=4) =
7/36,P(X=5) =9/36,P(X=6) =11/36.
Wecansummaryp.m.fofXinthe
x 123456
P(X=x)
1
36
3
36
5
36
7
36
9
36
11
36
19 / 38

Illustrationtocalculatepmf
For each possible valuex, we collect all the outcomes that
give rise toX=xand add their probabilities to obtain
pX(x) =P(X=x). 20 / 38

One can use p.m.f of the discrete random vari-
ableXtoansweranyquestionofXsuchas
P(1<X<4) =P(X=2orX=3)
=P(X=2)+P(X=3) =3/36+5/36
usingadditiverulefordisjoinset
P(A∪B) =P(A)+P(B)ifA∩B=∅
forA={X=2},B={X=3}
21 / 38

Practice
Probabilitymassfunctionofdiscreterandomvari-
ableXis
x -2-1012
p(x) =P(X=x)1/82/82/82/81/8
Determine
1P(X≤ −1orX=2)2P(−1≤X≤1)
22 / 38

Practice
A shipment of 20 similar laptop computers to a
retail outlet contains 3 that are defective. If a
school makes a random purchase of 2 of these
computers,find the probability mass function
(p.m.f)for.
23 / 38

Practice
An urn contains 11 balls, 3 white, 3 red, and 5
blue balls. Take out 3 balls at random, without
replacement. You win $1 for each red ball you
select and lose a $1 for each white ball you se-
lect. Determinethep.m.fofyourloss/profitX.
24 / 38

Propertiesofpmf
•Xisdiscrete
→Range(X) ={x1,...,xn...}
•p(xi) =P(X=xi)≥0
•P(X∈A) =
X
xi∈A
p(xi)
•Normalization
P(−∞<X<∞) =1⇒

X
i=1
p(xi) =1
25 / 38

Propertiesofpmf
•Xisdiscrete
→Range(X) ={x1,...,xn...}
•p(xi) =P(X=xi)≥0
•P(X∈A) =
X
xi∈A
p(xi)
•Normalization
P(−∞<X<∞) =1⇒

X
i=1
p(xi) =1
25 / 38

Propertiesofpmf
•Xisdiscrete
→Range(X) ={x1,...,xn...}
•p(xi) =P(X=xi)≥0
•P(X∈A) =
X
xi∈A
p(xi)
•Normalization
P(−∞<X<∞) =1⇒

X
i=1
p(xi) =1
25 / 38

Example
SupposeXhas3values1,2,3and
p(1) =
1
2
,p(2) =
1
3
thenwhatisp(3)?
p(3) =1−p(1)−p(2) =1/6.
26 / 38

Example
SupposeXhas3values1,2,3and
p(1) =
1
2
,p(2) =
1
3
thenwhatisp(3)?
p(3) =1−p(1)−p(2) =1/6.
26 / 38

Graphofp(x)
27 / 38

Practice
Suppose that the pmf of random variableXis
givenby
p(x) =c(x+5),x=0,1,2,3,4
FindcandP(0<X<2.5).
28 / 38

Cumulativedistributionfunction
(cdf)
ProbabilitythatXdoesnotexceedagivenvalue
F(b) =P(X≤b) =
X
xi≤b
P(X=xi)
29 / 38

Example
SupposethatpmfofXisgivenbyp(1) =
1
2
,p(2) =
1
3
,p(3) =
1
6
then
F(0.5) =P(X≤0.5) =0
F(2.4) =P(X≤2.4) =P(X=1)+P(X=2) =
5
6
30 / 38

TheformulaofthecdfofXis
F(x) =











0,x<1
1
2
,1≤x<2
5
6
,2≤x<3
1,x≥3
31 / 38

GraphofF(x)
Remark
Jumpsizeat1isP(X=1),...
32 / 38

Example
Determinethep.m.fofXfromthec.d.f
F(x) =











0 ifx<−2
0.2 if−2≤x<0
0.7 if0≤x<2
1 ifx≥2
33 / 38

Solution
Graph ofF(x)is
P(X=a) =F(a)−F(a

)isnonzeroatthepoints−2,0,2.
The p.m.f at each point is the change (jump size) of c.d.f
at the point 34 / 38

p.m.fofXisgivenby
p(−2) =P(X=−2) =F(−2)−F(−2

)
=0.2−0=0.2
p(0) =P(X=0) =F(0)−F(0

)
=0.7−0.2=0.5
p(2) =P(X=2) =F(2)−F(2

)
=1−0.7=0.3
35 / 38

PropertiesofcdfofadiscreteRV
•lim
x→−∞
F(x) =0andlim
x→∞
F(x) =1
•FXhasapiecewiseconstantand
staircase-likeform.
36 / 38

Practice
c.d.fofdiscreterandomvariableXisgivenby
F(x) =





0 ifx<1
0.7 if1≤x<3
1 ifx≥3
Compute
1P(X≤2)andP(X>2)2P(1≤X≤2)
37 / 38

Keywords
•pmf of a discrete RV with range{x1,...,xn,...}
p(xi) =P(X=xi)
•0≤p(xi)≤1

P
p(xi) =1
•P(X∈A) =
P
xi∈A
p(xi)
•cdf
F(x) =P(X≤x) =
X
xi≤x
p(xi)
38 / 38