chapter 3-2 discrete random variables
DESCRIPTION
Chapter 3-2 Discrete Random Variables. 主講人 : 虞台文. Content. Functions of a Single Discrete Random Variable Discrete Random Vectors Independent of Random Variables Multinomial Distributions Sums of Independent Variables Generating Functions Functions of Multiple Random Variables. - PowerPoint PPT PresentationTRANSCRIPT
Chapter 3-2Discrete Random Variables
主講人 :虞台文
Content Functions of a Single Discrete Random Variable Discrete Random Vectors Independent of Random Variables Multinomial Distributions Sums of Independent Variables Generating
Functions Functions of Multiple Random Variables
Functions of a Single Discrete Random Variable
Chapter 3-2Discrete Random Variables
計程車司機的心聲這傢伙上車後會要跑幾公里 (X)?這傢伙上車後會要跑幾公里 (X)?
X 為一隨機變數
計程車司機的心聲這傢伙上車後會要跑幾公里 (X)?這傢伙上車後會要跑幾公里 (X)?
X 為一隨機變數這傢伙上車後我可以從他口袋掏多少錢 (Y)?這傢伙上車後我可以從他口袋掏多少錢 (Y)?
Y 亦為一隨機變數
Y = g(X) 隨機變數之函式亦為隨機變數。
計程車司機的心聲這傢伙上車後會要跑幾公里 (X)?這傢伙上車後會要跑幾公里 (X)?
X 為一隨機變數這傢伙上車後我可以從他口袋掏多少錢 (Y)?這傢伙上車後我可以從他口袋掏多少錢 (Y)?
Y 亦為一隨機變數
Y = g(X) 若 pX(x) 已知, pY(y)=?
The Problem
Y = g(X) and pX(x) is available.
) ?(Yp y ( )P Y y
( )P g X y
( )( )
( )x I Xg x y
P X x
( )
( )
( )Xx I Xg x y
p x
Example 17
這瓶十元
這瓶只要五元福氣啦 !!!
Example 17
這瓶十元
這瓶只要五元福氣啦 !!!
Example 17
1 ?~X1 ?~X
2 ?~X2 ?~X
1) ?(YP y
1) ?(YP y
2) ?(YP y
2) ?(YP y
這瓶十元
這瓶只要五元福氣啦 !!!
Example 17
1 ?~X1 ?~X
2 ?~X2 ?~X
1) ?(YP y
1) ?(YP y
2) ?(YP y
2) ?(YP y
1 ~ ( , )X B n p1 ~ ( , )X B n p
2 ~ ( )X G p2 ~ ( )X G p
1 ~ ( , )X B n p
2 ~ ( )X G p1 110 5Y n X
2 210 5Y X 1
) ?(YP y
2) ?(YP y
Example 18
1 ~ ( , )X B n p
2 ~ ( )X G p1 110 5Y n X
2 210 5Y X 1
) ?(YP y
2) ?(YP y
n=10, p=0.2.
Example 18
1 ~ ( , )X B n p
2 ~ ( )X G p1 110 5Y n X
2 210 5Y X 1
) ?(YP y
2) ?(YP y
1
1010( ) 0.2 0.8 , 0,1, ,10x x
Xp x xx
n=10, p=0.2.
1( ) ?I Y {50,55, ,100}
1 1( ) ( )Yp y P Y y 1100 5P X y 1
100
5
yP X
1
100
5X
yp
100 10010
5 5
100.2 0.8100
5
y y
y
100 50
5 5
100.2 0.8100
5
y y
y
50,55, ,100y
Example 18
1 ~ ( , )X B n p
2 ~ ( )X G p1 110 5Y n X
2 210 5Y X 1
) ?(YP y
2) ?(YP y
2
1( ) 0.8 0.2, 1,2,xXp x x
n=10, p=0.2.
2( ) ?I Y {5,15,25, }
2 2( ) ( )Yp y P Y y 210 5P X y 2
5
10
yP X
2
5
10X
yp
51
100.8 0.2y
5
100.8 0.2y
5,15,25,y
Example 18 n=10, p=0.2.
Pay 100$, #bottles (X3) obtained?
Example 18 n=10, p=0.2.
Pay 100$, #bottles (X3) obtained?
Let Y (X3) denote #lucky bottles obtained.
3100 10( ) 5X Y Y
3( ) ?I X {10,11, , 20}
3
100 5
10
YX
3~ ( ,0.2)Y B X
3 3( ) ( )Xp x P X x 100 5
10
YP x
10 100
5
xP Y
2 20 200.2 0.82 20
x xx
x
2 20P Y x
10,11, , 20.x
Discrete Random Vectors
Chapter 3-2Discrete Random Variables
Definition Random Vectors
A discrete r-dimensional random vector X is a function
X: Rr
with a finite or countable infinite image of {x1, x2, …}.
Example 19
Example 191
1 ?( ) X (7,3,0)
Example 19
2 ?( ) X (12,0,1)
2
Definition Joint Pmf
Let random vector X = (X1, X2, …, Xr). The
joint pmf (jpmf) for X is defined as
pX(x) = P(X1 = x1, X2 = x2, … , Xr = xr),
where x = (x1, x2, … , xr).
Example 20
There are three cards numbered 1, 2 and 3. Randomly draw two cards among them without replacement. Let X, Y represent the number of the 1st and 2nd card, respectively. Find the jpmf of X, Y.
There are three cards numbered 1, 2 and 3. Randomly draw two cards among them without replacement. Let X, Y represent the number of the 1st and 2nd card, respectively. Find the jpmf of X, Y.
1 16 6
1 16 6
1 16 6
1 2 3
1 0
2 0
3 0
XY
Example 20
There are three cards numbered 1, 2 and 3. Randomly draw two cards among them without replacement. Let X, Y represent the number of the 1st and 2nd card, respectively. Find the jpmf of X, Y.
There are three cards numbered 1, 2 and 3. Randomly draw two cards among them without replacement. Let X, Y represent the number of the 1st and 2nd card, respectively. Find the jpmf of X, Y.
1 16 6
1 16 6
1 16 6
1 2 3
1 0
2 0
3 0
XY
16
,
, 1, 2,3,( , )
0 otherwiseX Y
x y x yp x y
Properties of Jpmf's
1. p(x) 0, x Rr;
2. {x | p(x) 0} is a finite or countably infinite subset of Rr;
3. ( )
( ) 1i
iI
p
x X
x
Definition Marginal Probability Mass Functions
Let X = (X1, …, Xi , …, Xr) be an r-dimensional ra
ndom vectors. The ith marginal probability mas
s function defined by( )iXp x
( ) , ,i iX x P xp X
Example 21
Find pX(x) and pY (y) of Example 20.Find pX(x) and pY (y) of Example 20.
1 1 16 6 3
1 1 16 6 3
1 1 16 6 3
1 1 13 3 3
1 2 3 ( )
1 0
2 0
3 0
( ) 1
X
Y
p x
p y
X Y 16
,
, 1, 2,3,( , )
0 otherwiseX Y
x y x yp x y
Example 21
Find pX(x) and pY (y) of Example 20.Find pX(x) and pY (y) of Example 20.
1 1 16 6 3
1 1 16 6 3
1 1 16 6 3
1 1 13 3 3
1 2 3 ( )
1 0
2 0
3 0
( ) 1
X
Y
p x
p y
X Y 16
,
, 1, 2,3,( , )
0 otherwiseX Y
x y x yp x y
13 1,2,3
( )0 otherwiseX
xp x
13 1,2,3
( )0 otherwiseY
yp y
Example 22
4X = #Y = #
1. pX,Y(x, y) = ?2. pX (x) = ? pY (y) = ?3. p(X < 3)= ?4. p(X + Y < 4)= ?
pX,Y(x, y)
Example 22
4X = #Y = #
1. pX,Y(x, y) = ?2. pX (x) = ? pY (y) = ?3. p(X < 3)= ?4. p(X + Y < 4)= ?
pX,Y(x, y)
Example 22
4X = #Y = #
1. pX,Y(x, y) = ?2. pX (x) = ? pY (y) = ?3. p(X < 3)= ?4. p(X + Y < 4)= ?
,
3 5 2
4( , )
10
4
X Y
x y x yp x y
pX,Y(x, y)
Example 22
4X = #Y = #
1. pX,Y(x, y) = ?2. pX (x) = ? pY (y) = ?3. p(X < 3)= ?4. p(X + Y < 4)= ?
pX,Y(x, y)
Example 22
4X = #Y = #
1. pX,Y(x, y) = ?2. pX (x) = ? pY (y) = ?3. p(X < 3)= ?4. p(X + Y < 4)= ?
( 3) 0.1666 0.5 0.3001 0.9667P X
pX,Y(x, y)
Example 22
4X = #Y = #
1. pX,Y(x, y) = ?2. pX (x) = ? pY (y) = ?3. p(X < 3)= ?4. p(X + Y < 4)= ?
( 4) 1 0.0238 0.1429 0.1429 0.0238 0.6666P X Y
Independent Random Variables
Chapter 3-2Discrete Random Variables
Definition
Let X1, X2, …, Xr be r discrete random variables having
densities , respectively. These random variables are said to be mutually independent if th
eir jpdf p(x1, x2, …, xr) satisfies
1 2( ), ( ), , ( )
rX X Xp x p x p x
1 21 2 1 2 1 2( , , , ) ( ) ( ) ( ) , , ,rr X X X r rp x x x p x p x p x x x x
Example 23
Tossing two dice, let X, Y represent the face values of the 1st and 2nd dice, respectively.1. pX,Y (x, y) = ?.
2. Are X, Y independent?
Tossing two dice, let X, Y represent the face values of the 1st and 2nd dice, respectively.1. pX,Y (x, y) = ?.
2. Are X, Y independent?
Example 23
,
1 1 1 1 1 1 136 36 36 36 36 36 6
1 1 1 1 1 1 136 36 36 36 36 36 6
1 1 1 1 1 1 136 36 36 36 36 36 6
1 1 1 1 1 1 136 36 36 36 36 36 6
1 1 1 1 1 1 136 36 36 36 36 36 6
1 1 1 1 1 1 136 36 36 36 36 36 6
1 1 1 1 1 16 6 6 6 6 6
( , ) 1 2 3 4 5 6 ( )
1
2
3
4
5
6
( ) 1
X Y X
Y
Y
p x y p x
X
p y
Tossing two dice, let X, Y represent the f ace values of the 1st and 2nd dice, respectively.1. pX,Y (x, y) = ?.2. Are X, Y independent?
Tossing two dice, let X, Y represent the f ace values of the 1st and 2nd dice, respectively.1. pX,Y (x, y) = ?.2. Are X, Y independent?
,
1( , ) , , {1, ,6}
36X Yp x y x y
1( ) , {1, ,6}
6Xp x x
1( ) , {1, ,6}
6Yp y y
, ( , ) ( ) ( ), ,X Y X Yp x y p x p x x y
X Y
Fact
X Y( , ) ( ) ( )P X x Y y P X x P Y y
( , ) ( ) ( )P X x Y y P X x P Y y
( , ) ( ) ( )P a X b Y c P a X b P Y c
?
?
( , ) ( ) ( ), ,P X A Y B P X A P Y B A B R ?
Fact
X Y( , ) ( , )
x A y B
P X A Y B P X x Y y
X Y X Y( , ) ( ) ( )P X x Y y P X x P Y y
( ) ( )x A y B
P X x P Y y
( ) ( )
x A y B
P X x P Y y
( ) ( )P X A P Y B
Fact
X Y( , ) ( ) ( )P X x Y y P X x P Y y
( , ) ( ) ( )P X x Y y P X x P Y y
( , ) ( ) ( )P a X b Y c P a X b P Y c
( , ) ( ) ( ), ,P X A Y B P X A P Y B A B R
Example 24
Consider Example 23. Find P(X 2, Y 4).Consider Example 23. Find P(X 2, Y 4).
,
1 1 1 1 1 1 136 36 36 36 36 36 6
1 1 1 1 1 1 136 36 36 36 36 36 6
1 1 1 1 1 1 136 36 36 36 36 36 6
1 1 1 1 1 1 136 36 36 36 36 36 6
1 1 1 1 1 1 136 36 36 36 36 36 6
1 1 1 1 1 1 136 36 36 36 36 36 6
1 1 1 1 1 16 6 6 6 6 6
( , ) 1 2 3 4 5 6 ( )
1
2
3
4
5
6
( ) 1
X Y X
Y
Y
p x y p x
X
p y
,
1( , ) , , {1, ,6}
36X Yp x y x y
1( ) , {1, ,6}
6Xp x x
1( ) , {1, ,6}
6Yp y y
, ( , ) ( ) ( ), ,X Y X Yp x y p x p x x y
X Y
( 2, 4) ( 2) ( 4)P X Y P X P Y
2 4
6 6
8
36
8
36
Example 24
Example 24
X Y , ( , ) ( ) ( )X Y X Yp x y p x p y
(1 ) (1 )x yp p p p 2 (1 ) , , 0,1,2,x yp p x y
2, ( , ) (1 ) , , 0,1,2,x y
X Yp x y p p x y
Example 24
2, ( , ) (1 ) , , 0,1,2,x y
X Yp x y p p x y
Z1 有何意義 ?
0 0x y y x y z
Example 24
2, ( , ) (1 ) , , 0,1,2,x y
X Yp x y p p x y
1 1( ) ( )Zp z P Z z
min( , )X zYP
min( , )X Y z
1( ) ?I Z {0,1,2, }
0 0x y x y x z
z y x z z x y z
x y x z y x y z
, ,1
( , ) ( , )X Y X Yy z x z
p z y p x z
Example 24
2, ( , ) (1 ) , , 0,1,2,x y
X Yp x y p p x y
1 1( ) ( )Zp z P Z z
min( , )X zYP
1( ) ?I Z {0,1,2, }
, ,1
( , ) ( , )X Y X Yy z x z
p z y p x z
2 2
1
(1 ) (1 )z y x z
y z x z
p p p p
2 2 2 2 1
0 0
(1 ) (1 )z y z x
y x
p p p p
2 2 2 2 1
0 0
(1 ) (1 ) (1 ) (1 )z y z x
y x
p p p p p p
Example 24
2, ( , ) (1 ) , , 0,1,2,x y
X Yp x y p p x y
1 1( ) ( )Zp z P Z z
1( ) ?I Z {0,1,2, }
2 2 2 2 1
0 0
(1 ) (1 ) (1 ) (1 )z y z x
y x
p p p p p p
1
1 (1 )p 1
p
1
1 (1 )p 1
p
Example 24
2, ( , ) (1 ) , , 0,1,2,x y
X Yp x y p p x y
1 1( ) ( )Zp z P Z z
1( ) ?I Z {0,1,2, }
2 2 2 2 1
0 0
(1 ) (1 ) (1 ) (1 )z y z x
y x
p p p p p p
2 2 1(1 ) (1 )z zp p p p 2(1 ) [1 (1 )]zp p p
2 2(1 ) (2 )z
p p p 2 21 (2 ) (2 )
zp p p p
(1 )zp p p’ p’
0,1,2,z
Example 24
2, ( , ) (1 ) , , 0,1,2,x y
X Yp x y p p x y
1 1( ) ( )Zp z P Z z
1( ) ?I Z {0,1,2, }
(1 )zp p 0,1,2,z
2 2p p p 其中
~ ( )
~ ( )
X G p
Y G p
X Y
21 min , ~ (2 )Z X Y G p p
Example 24
2, ( , ) (1 ) , , 0,1,2,x y
X Yp x y p p x y
21 min , ~ (2 )Z X Y G p p
Fact:cdf
( ) (1 ) , 0,1,yYp y p p y pmf
1
0 0( )
1 (1 ) 0Y y
yF y
p y
~ ( )Y G p
121( ) 1 (1 2 ) , 0zP Z z p p z
Example 24
2, ( , ) (1 ) , , 0,1,2,x y
X Yp x y p p x y
( )P Y X 0x
y x
, ( , )X Yp x y 2
0
(1 )x y
x y x
p p
2 2
0 0
(1 ) x y
x y
p p
2 2
0 0
(1 ) (1 )x y
x y
p p p
2
0
(1 )x
x
p p
21 (1 )
p
p
1
2 p
Example 24
2, ( , ) (1 ) , , 0,1,2,x y
X Yp x y p p x y
2 2( ) ( )Zp z P Z z
YP X z
2( ) ?I Z {0,1,2, }
,0
( , )z
X Yx
p x z x
2
0
(1 )z
z
x
p p
2( 1) (1 )zz p p 0,1,2,z
Example 24
2, ( , ) (1 ) , , 0,1,2,x y
X Yp x y p p x y
2 2( ) ( )Zp z P Z z
2( ) ?I Z {0,1,2, }
2( 1) (1 )zz p p 0,1,2,z
( | )P Y y X Y z ( and )
( )
P Y y X Y z
P X Y z
( , )
( )
P X z y Y y
P X Y z
2
2
(1 )
( 1) (1 )
z
z
p p
z p p
1
1z
0,1,2,z 0,1,2, ,y z
Multinomial Distributions
Chapter 3-2Discrete Random Variables
Generalized Bernoulli Trials
A sequence of n independent trials. Each trial has r distinct outcomes with
probabilities p1, p2, …, pr such that
1
1r
ii
p
Multinomial Distributions
?( )p X n
A sequence of n independent trials. Each trial has r distinct outcomes with
probabilities p1, p2, …, pr such that1
1r
iip
Define X=(X1, X2, …, Xr) st Xi is the number of trials that resulted in the ith outcome.
1 2( , , , )rn n nn satisfies 1 2 .rn n n n
1
n
n
1
2
n n
n
1 2
3
n n n
n
1 2 1r
r
n n n n
n
1
1np 2
2np 3
3np rn
rp
31 21 1 21 2 3
1 1 2 1 2 3 1 2 3
( )! ( )!!
!( )! !( )! !( )!rnn n n
r
n n n n nnp p p p
n n n n n n n n n n n n
Multinomial Distributions
?( )p X n
A sequence of n independent trials. Each trial has r distinct outcomes with
probabilities p1, p2, …, pr such that1
1r
iip
Define X=(X1, X2, …, Xr) st Xi is the number of trials that resulted in the ith outcome.
1 2( , , , )rn n nn satisfies 1 2 .rn n n n
1
n
n
1
2
n n
n
1 2
3
n n n
n
1 2 1r
r
n n n n
n
1
1np 2
2np 3
3np rn
rp
1 21 2
1 2
!
! ! !rn n n
rr
np p p
n n n
31 2
1 2 31 2
rnn n nr
r
np p p p
n n n
Example 26
If a pair of dice are tossed 6 times, what is the probability of obtaining a total of 7 or 11 twice, a matching pair one, and any other combination 3 times?
If a pair of dice are tossed 6 times, what is the probability of obtaining a total of 7 or 11 twice, a matching pair one, and any other combination 3 times?
Three outcomes:
1. 7 or 11
2. match
3. others
1 ?p
2 ?p
3 ?p
2 / 9
1/ 6
11/18
X1 #7 or 11;
X2 #matches;
X3 #others.
2 3
1 2 3
6 2 1 11( 2, 1, 3)
2 1 3 9 6 18P X X X
2 36! 2 1 11
2!1!3! 9 6 18
0.1127
Sums of Independent Variables
Generating Functions
Chapter 3-2Discrete Random Variables
The Sum of Independent Random Variables
X Y 1 2
1 2
( ) { , , }
( ) { , , }
I X x x
I Y y y
Z X Y ) ?(Zp z
( ) ( )Zp z P Z z ( )P X Y z
,i iiP X x Y z x ( , )i i
i
P X x Y z x ( ) ( )i i
i
P X x P Y z x ( ) ( )X i Y i
i
p x p z x
Example 27
Let X, Y be two independent random variables each uniformly distributed over 0, 1, 2, …, n. Find P(X+Y = z).
Let X, Y be two independent random variables each uniformly distributed over 0, 1, 2, …, n. Find P(X+Y = z).
?( )I Z X Y {0,1,2, , 2 }n
[ ]X Y z [0 ][0 ][ ]x n y n x y z
[0 ][0 ][ ]x n y n y z x
[0[0 ] [ ]]zx n z xx yn
[[0 [ ]]] z x n zx n y z x
[0 ][ ][ ]x n z n x z y z x [ ]X Y z
2
,
1( , ) ( ) ( )
1X Y X Yp x y p x p yn
, 0,1, ,x y n
Example 27
Let X, Y be two independent random variables each uniformly distributed over 0, 1, 2, …, n. Find P(X+Y = z).
Let X, Y be two independent random variables each uniformly distributed over 0, 1, 2, …, n. Find P(X+Y = z).
[0 ][ ][ ]x n z n x z y z x [ ]X Y z
0 n
z n z
0 n
z n z
Case 1: z{0, 1, …, n} Case 2: z{n+1, n+2, …, 2n}
[ ] [0 ][ ]X Y z x z y z x [ ] [ ][ ]X Y z z n x n y z x
?( )I Z X Y {0,1,2, , 2 }n
, 2
1( , ) ( ) ( )
( 1)X Y X Yp x y p x p yn
, 0,1, ,x y n
Example 27
Let X, Y be two independent random variables each uniformly distributed over 0, 1, 2, …, n. Find P(X+Y = z).
Let X, Y be two independent random variables each uniformly distributed over 0, 1, 2, …, n. Find P(X+Y = z).
Case 1: z{0, 1, …, n} Case 2: z{n+1, n+2, …, 2n}
[ ] [0 ][ ]X Y z x z y z x [ ] [ ][ ]X Y z z n x n y z x
?( )I Z X Y {0,1,2, , 2 }n
, 2
1( , ) ( ) ( )
( 1)X Y X Yp x y p x p yn
, 0,1, ,x y n
,0
( ) ( , )z
X Yx
P X Y z p x z x
,( ) ( , )n
X Yx z n
P X Y z p x z x
2
1
( 1)
z
n
2
2 1
( 1)
n z
n
Example 27
Let X, Y be two independent random variables each uniformly distributed over 0, 1, 2, …, n. Find P(X+Y = z).
Let X, Y be two independent random variables each uniformly distributed over 0, 1, 2, …, n. Find P(X+Y = z).
Case 1: z{0, 1, …, n} Case 2: z{n+1, n+2, …, 2n}
[ ] [0 ][ ]X Y z x z y z x [ ] [ ][ ]X Y z z n x n y z x
?( )I Z X Y {0,1,2, , 2 }n
, 2
1( , ) ( ) ( )
( 1)X Y X Yp x y p x p yn
, 0,1, ,x y n
,0
( ) ( , )z
X Yx
P X Y z p x z x
,( ) ( , )n
X Yx z n
P X Y z p x z x
2
1
( 1)
z
n
2
2 1
( 1)
n z
n
2
2
10,1, ,
( 1)( )
2 11, 2, , 2
( 1)
zz n
nP X Y z
n zz n n n
n
2
2
10,1, ,
( 1)( )
2 11, 2, , 2
( 1)
zz n
nP X Y z
n zz n n n
n
Probability Generating Functions
Probabilities
Probabilities
機率母函數
Probability Generating Functions
Let X be a nonnegative integer-valued random variable. Its probability generating function GX(t) is defined as:
0 1 2( ) (0) (1) (2) ( )X X X Xx
Xt t t tG t p p p p x
0
( ) ( ) xX X
x
G t p x t
pgf
Probability Generating Functions
Let X be a nonnegative integer-valued random variable. Its probability generating function GX(t) is defined as:
0 1 2( ) (0) (1) (2) ( )X X X Xx
Xt t t tG t p p p p x
0
( ) ( ) xX X
x
G t p x t
pgf
0011
22
xx
?( )P X x
Probability Generating Functions
Let X be a nonnegative integer-valued random variable. Its probability generating function GX(t) is defined as:
0 1 2( ) (0) (1) (2) ( )X X X Xx
Xt t t tG t p p p p x
0
( ) ( ) xX X
x
G t p x t
pgf
0011
22
xx
?( )P X x
Probability Generating Functions0
( ) ( ) xX X
x
G t p x t
pgf
Compute the pgf’s for the following distributions:1. X ~ B(n, p); 2. Y ~ P(); 3. Z ~ G(p); 4. U ~ NB(r, p).
Compute the pgf’s for the following distributions:1. X ~ B(n, p); 2. Y ~ P(); 3. Z ~ G(p); 4. U ~ NB(r, p).
Probability Generating Functions0
( ) ( ) xX X
x
G t p x t
pgf
Compute the pgf’s for the following distributions:1. X ~ B(n, p); 2. Y ~ P(); 3. Z ~ G(p); 4. U ~ NB(r, p).
Compute the pgf’s for the following distributions:1. X ~ B(n, p); 2. Y ~ P(); 3. Z ~ G(p); 4. U ~ NB(r, p).
( ) (1 ) , 0,1, ,x n xX
np x p p x n
x
0
( ) (1 )n
x xn xX
x
nG t p p t
x
0
( ) (1 )n
x n x
x
np pt
x
( 1 )npt p
( )npt q 1q p
Probability Generating Functions0
( ) ( ) xX X
x
G t p x t
pgf
Compute the pgf’s for the following distributions:1. X ~ B(n, p); 2. Y ~ P(); 3. Z ~ G(p); 4. U ~ NB(r, p).
Compute the pgf’s for the following distributions:1. X ~ B(n, p); 2. Y ~ P(); 3. Z ~ G(p); 4. U ~ NB(r, p).
( ) , 0,1,2,!
y
Y
ep y y
y
0
( )!
y
Yy
yte
G ty
0
( )
!
y
y
et
y
te e
( 1)te
Probability Generating Functions0
( ) ( ) xX X
x
G t p x t
pgf
Compute the pgf’s for the following distributions:1. X ~ B(n, p); 2. Y ~ P(); 3. Z ~ G(p); 4. U ~ NB(r, p).
Compute the pgf’s for the following distributions:1. X ~ B(n, p); 2. Y ~ P(); 3. Z ~ G(p); 4. U ~ NB(r, p).
1( ) (1 ) , 1, 2,zZp z p p z
1
1
( ) (1 )z zZ
z
tG t p p
1
0
(1 ) zz
z
tp p
0
(1 )z z
z
p pt t
0
(1 )z
z
p pt t
1 (1 )
p
p
t
t
1
p
q
t
t
1q p
Probability Generating Functions0
( ) ( ) xX X
x
G t p x t
pgf
Compute the pgf’s for the following distributions:1. X ~ B(n, p); 2. Y ~ P(); 3. Z ~ G(p); 4. U ~ NB(r, p).
Compute the pgf’s for the following distributions:1. X ~ B(n, p); 2. Y ~ P(); 3. Z ~ G(p); 4. U ~ NB(r, p).
( )1
r
U
pG
t
tt
q
1q p
Exercise
Important Generating Functions
( 1)
~ ( , ) ( ) ( )
~ ( ) ( )
~ ( ) ( )1
~ ( , ) ( )1
nX
tX
X
r
X
X B n p G t pt q
X P G t e
ptX G p G t
qt
ptX NB r p G t
qt
Theorem 2 Sums of Independent Random Variables
Let X, Y be two independent, nonnegative integer-valued random variables. Then,
( ) ( ) ( )X Y X YG t G t G t
Theorem 2 Sums of Independent Random Variables
( ) ( ) ( )X Y X YG t G t G t
X Y ( ), ( ) {0,1,2, }I X I Y and
Let Z=X+Y.Pf)( ) ( )X Y ZG t G t
0
( ) zZ
z
tp z
00, ( , )
z
X Yx
z
z
tp x z x
0 x z
0 z
0 x z
0 x
x z 0
( ) ( ) z
x z xX Yp z x tx p
0
( ) ( )x z x
x z xX Yt tp x p z x
0 0
( ) ( )Xx z
x zY z tp x t p
( ) ( )X YG t G t
Theorem 2 Sums of Independent Random Variables
( ) ( ) ( )X Y X YG t G t G t
X Y ( ), ( ) {0,1,2, }I X I Y and
Fact:
1 2 1 2( ) ( ) ( ) ( )
n nX X X X X XG t G t G t G t
1 2( ), ( ), , ( ) {0,1,2, }nI X I X I X and1 2 nX X X. . .
Example 29
Example 27 Let X, Y be two independent random variables each uniformly distributed over 0, 1, 2, …, n. Find P(X+Y = z).
Example 27 Let X, Y be two independent random variables each uniformly distributed over 0, 1, 2, …, n. Find P(X+Y = z).
Use pgf to recompute Example 27.Use pgf to recompute Example 27.
( ) ( )X YG t G t11 1
1 1
nt
n t
0 11
1nt t t
n
( ) ( ) ( )X Y X YG t G t G t 1 2 22
1(1 ) (1 )
( 1)nt t
n
1 2 22
0
11(1 2 )
( 1)n n z
z
zt t t
zn
1 2 22
0
1(1 2 ) ( 1)
( 1)n n z
z
t t z tn
Example 29
Example 27 Let X, Y be two independent random variables each uniformly distributed over 0, 1, 2, …, n. Find P(X+Y = z).
Example 27 Let X, Y be two independent random variables each uniformly distributed over 0, 1, 2, …, n. Find P(X+Y = z).
Use pgf to recompute Example 27.Use pgf to recompute Example 27.
( ) ( )X YG t G t11 1
1 1
nt
n t
0 11
1nt t t
n
( ) ( ) ( )X Y X YG t G t G t 1 2 22
1(1 ) (1 )
( 1)nt t
n
1 2 22
0
11(1 2 )
( 1)n n z
z
zt t t
zn
1 2 22
0
1(1 2 ) ( 1)
( 1)n n z
z
t t z tn
2
2
10,1, ,
( 1)( )
2 11, 2, , 2
( 1)
zz n
nP X Y z
n zz n n n
n
2
2
10,1, ,
( 1)( )
2 11, 2, , 2
( 1)
zz n
nP X Y z
n zz n n n
n
Theorem 3
Theorem 3
1 2 rX X X
表 何 意 義 ?~ ?( , )B r p
Theorem 31 2 1 2
( ) ( ) ( ) ( )r rX X X X X XG t G t G t G t
1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .
1 2 rX X X. . .
1 2 rX X X ~ ?
) ?(iXG t ( 1)
~ ( , ) ( ) ( )
~ ( ) ( )
~ ( ) ( )1
~ ( , ) ( )1
nX
tX
X
r
X
X B n p G t pt q
X P G t e
ptX G p G t
qt
ptX NB r p G t
qt
( 1)
~ ( , ) ( ) ( )
~ ( ) ( )
~ ( ) ( )1
~ ( , ) ( )1
nX
tX
X
r
X
X B n p G t pt q
X P G t e
ptX G p G t
qt
ptX NB r p G t
qt
1 2( ) ?
rX X XG t
pt q
rpt q
( , )B r p
Theorem 3
1 2 rX X X
表 何 意 義 ?
1 2~ ( ?, )rB n n n p
1 2 1 2( ) ( ) ( ) ( )
r rX X X X X XG t G t G t G t 1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .
1 2 rX X X. . .
Theorem 3
1 2 rX X X ~ ?) ?(
iXG t
( 1)
~ ( , ) ( ) ( )
~ ( ) ( )
~ ( ) ( )1
~ ( , ) ( )1
nX
tX
X
r
X
X B n p G t pt q
X P G t e
ptX G p G t
qt
ptX NB r p G t
qt
( 1)
~ ( , ) ( ) ( )
~ ( ) ( )
~ ( ) ( )1
~ ( , ) ( )1
nX
tX
X
r
X
X B n p G t pt q
X P G t e
ptX G p G t
qt
ptX NB r p G t
qt
1 2( ) ?
rX X XG t
inpt q
1 2 rn n npt q
1 2 1 2( ) ( ) ( ) ( )
r rX X X X X XG t G t G t G t 1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .
1 2 rX X X. . .
1 2( , )rB n n n p
Theorem 31 2 1 2
( ) ( ) ( ) ( )r rX X X X X XG t G t G t G t
1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .
1 2 rX X X. . .
1 2 rX X X
表 何 意 義 ?, )?~ (NB r p
Theorem 31 2 1 2
( ) ( ) ( ) ( )r rX X X X X XG t G t G t G t
1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .
1 2 rX X X. . .
1 2 rX X X ~ ?
) ?(iXG t
( 1)
~ ( , ) ( ) ( )
~ ( ) ( )
~ ( ) ( )1
~ ( , ) ( )1
nX
tX
X
r
X
X B n p G t pt q
X P G t e
ptX G p G t
qt
ptX NB r p G t
qt
( 1)
~ ( , ) ( ) ( )
~ ( ) ( )
~ ( ) ( )1
~ ( , ) ( )1
nX
tX
X
r
X
X B n p G t pt q
X P G t e
ptX G p G t
qt
ptX NB r p G t
qt
1 2
( ) ?rX X XG t
1
pt
qt
1
rpt
qt
( , )NB r p
Theorem 31 2 1 2
( ) ( ) ( ) ( )r rX X X X X XG t G t G t G t
1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .
1 2 rX X X. . .
1 2 rX X X
表 何 意 義 ?1 2~ ( , )?rNB p
Theorem 31 2 1 2
( ) ( ) ( ) ( )r rX X X X X XG t G t G t G t
1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .
1 2 rX X X. . .
1 2 rX X X ~ ?) ?(
iXG t
( 1)
~ ( , ) ( ) ( )
~ ( ) ( )
~ ( ) ( )1
~ ( , ) ( )1
nX
tX
X
r
X
X B n p G t pt q
X P G t e
ptX G p G t
qt
ptX NB r p G t
qt
( 1)
~ ( , ) ( ) ( )
~ ( ) ( )
~ ( ) ( )1
~ ( , ) ( )1
nX
tX
X
r
X
X B n p G t pt q
X P G t e
ptX G p G t
qt
ptX NB r p G t
qt
1 2( ) ?
rX X XG t
1
ipt
qt
1 2
1
rpt
qt
1 2( , )rNB p
Theorem 31 2 1 2
( ) ( ) ( ) ( )r rX X X X X XG t G t G t G t
1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .
1 2 rX X X. . .
1 2 rX X X
表 何 意 義 ?1 2~ ( )?rP
Theorem 31 2 1 2
( ) ( ) ( ) ( )r rX X X X X XG t G t G t G t
1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .1 2( ), ( ), , ( ) {0,1,2, }rI X I X I X and1 2 rX X X. . .
1 2 rX X X. . .
1 2 rX X X ~ ?
) ?(iXG t
( 1)
~ ( , ) ( ) ( )
~ ( ) ( )
~ ( ) ( )1
~ ( , ) ( )1
nX
tX
X
r
X
X B n p G t pt q
X P G t e
ptX G p G t
qt
ptX NB r p G t
qt
( 1)
~ ( , ) ( ) ( )
~ ( ) ( )
~ ( ) ( )1
~ ( , ) ( )1
nX
tX
X
r
X
X B n p G t pt q
X P G t e
ptX G p G t
qt
ptX NB r p G t
qt
1 2( ) ?
rX X XG t
( 1)i te
1 2( )( 1)r te
1 2( )rP
Theorem 3熟記 !!! 請靈活的將它們用於解題
Functions of Multiple Random
Variables
Chapter 3-2Discrete Random Variables
Functions of Multiple Random Variables
Let X, Y be two random variables with jpmf pX,Y(x, y).
Suppose that 1
2
( , )
( , )
U
V
g X Y
g X Y
1-1 pU,V(u, v)=?
Functions of Multiple Random Variables
Let X, Y be two random variables with jpmf pX,Y(x, y).
Suppose that 1-1 pU,V(u, v)=?
Example:
U
V
X Y
X Y
X $/month Y $/month
pX,Y(x, y) 已知
pU,V(u, v) = ?
1
2
( , )
( , )
U
V
g X Y
g X Y
Functions of Multiple Random Variables
Let X, Y be two random variables with jpmf pX,Y(x, y).
Suppose that 1-1 pU,V(u, v)=?
Example:
U
V
X Y
X Y
pX,Y(x, y) 已知
pU,V(u, v) = ?
1-1 implies invertible.
1
2
( , )
( , )
X h
Y h
U V
U V
2
2
U V
U V
X
Y
1
2
( , )
( , )
U
V
g X Y
g X Y
Functions of Multiple Random Variables
Let X, Y be two random variables with jpmf pX,Y(x, y).
Suppose that 1-1 pU,V(u, v)=?
1-1 implies invertible.
1
2
( , )
( , )
X h
Y h
U V
U V
, ( , ) ( , )U Vp Pu v U u V v
1 2( , ), ( , )P X h Y vhu v u
, 1 2( , ), ( , )X Y u vp h uh v
1
2
( , )
( , )
U
V
g X Y
g X Y
Example 30
Let X~B(n, p1), Y~B(m, p2) be two independent random variables.
U = X + YV = X Y
Let X~B(n, p1), Y~B(m, p2) be two independent random variables.
U = X + YV = X Y
Let Find pU,V(u, v).
Example 30
Let X~B(n, p1), Y~B(m, p2) be two independent random variables.
U = X + YV = X Y
Let X~B(n, p1), Y~B(m, p2) be two independent random variables.
U = X + YV = X Y
Let Find pU,V(u, v).
, 1 2 1 2( , ) (1 ) (1 )x y n x m yX Y
n mp x y p p p p
x y
X Y
2
2
U V
U V
X
Y
, , 2 2( , ) ,X Yu v u v
U V u vp p
2 2 2 21 2 1 2
2 2
(1 ) (1 )u v u v u v u vn
u v u v
mn mp p p p
0,1, ,
0,1, ,
x n
y m
, , 1 2( , ) ( , ), ( , )X YU Vp p h v hu v u u v , , 1 2( , ) ( , ), ( , )X YU Vp p h v hu v u u v
{0,1, , }u n m { , , }v m n
2 {0,1, , }u v n
2 {0,1, , }u v m and