Probability HW5
Probability HW5
Probability HW5
November 3, 2024
Zhou Ziyue
1. n-floor building
Ans:
(a) For j=2, . . . , n, the probability that the elevator stops at jth floor is
1 k
pj = p = 1 − (1 − )
n−1
Let the number of stops the elevator makes be X,
X ∼ bin(n − 1, p)
1 k
E(X) = (n − 1)p = (n − 1)[1 − (1 − ) ]
n−1
(b) For j=2, . . . , n, the probability that the elevator stops at jth floor is
pj = p = 1 − (1 − pj )k
Ans:
The PGF for one roll is
6
X t + t2 t3 + t4 2t5 9t6
E(tX1 ) = pj tj = + + +
j=1
7 5 35 35
As the five rolls are independent, The PGF for five rolls is
X t + t2 t3 + t4 2t5 9t6 5
E(t ) = ( + + + )
7 5 35 35
Left Header Right Header
3. Poisson
Ans:
∞ ∞ ∞
e−λ λx e−λ X λx
X X x X x!
E[ ]= P (X = x) = · =
k x=0
k x=0
(x − k)!k! x! k! x=0 (x − k)!
As we know ∞
X λx
= eλ
x=0
x!
∞ ∞
X λx X λx−k
= λk = λk · eλ
x=0
(x − k)! x=0
(x − k)!
e−λ k λ λk
X
E[ ]= ·λ ·e =
k k! k!
4. Stein-Chen identity
Ans:
(a)
∞ ∞ ∞
X e−λ λx X e−λ λ(x−1) X e−λ λx
E(Xg(X)) = xg(x) = λg(x) =λ g(x + 1)
x=0
x! x=1
(x − 1)! x=0
x!
= λE(g(X + 1))
(b)
E(X) = V ar(X) = E(X 2 ) − E 2 (X) = λ
E(X 2 ) = λ2 + λ
Page 2
Left Header Right Header
5. HH
Ans: Let the probability that we observe the first occurrence of the pattern
“HTHT” at the nth roll be pk
1 1 1
p0 = p1 = 0, p2 = p3 = p4 =
4 8 8
When k≥ 3, Let Sk be the result of the first toss.
P(N=k)=P(N=k,S1 =H)+P(N=k,S1 =T)
P(N=k,S1 =H)=P(S1 =H)P(S2 =T)P(N=k-2)= 14 pk−2
P(N=k,S1 =T)=P(S1 =T)P(N=k-1)= 21 pk−1
pk = 14 pk−2 + 21 pPk−1
N ∞ k
P∞ k 1 2
P∞ k
g(t)
P∞ = E(t ) = k=0 pk · t = k=2 pk · t = 4 t + k=3 pk · t
k
P ∞ 1 1 k
k=3 pk · t = Pk=3 ( 4 pk−2 + 2 pP k−1 )t
g(t) − 41 t2 = 21 t ∞ p t
k=2 k k + 1 2
4
t ∞ 1 1 2
k=1 pk tk = 2 tg(t) + 4 t g(t)
1 2
t t2
g(t) = 1− 14t− 1 t2 = 4−2t−t2
2 4
p0 = p1 = 0
(k)
W hen k ≥ 2, pk = P (N =(k) = g k!(0)
0 if k = 0, 1
So the PMF of N is pk = g(k) (0)
k!
if k ≥ 2
6. HTHT
Ans:
Let the probability that we observe the first occurrence of the pattern “HTHT”
at the nth roll be pk
1 1 3 11
p0 = p1 = p2 = p3 = 0, p4 = , p5 = , p6 = p7 = p8 = , p9 =
16 16 64 256
1 1 1 1
pk = pk−4 + pk−3 + pk−2 + pk−1 k ≥ 8
16 8 4 2
∞ ∞
N
X
k 1 4 1 5 3 6 3 7 X
g(t) = E(t ) = pk × t = t + t + t + t + pk × tk
k=0
16 16 64 64 k=8
Page 3
Left Header Right Header
∞ ∞
X
k
X 1 1 1 1
pk · t = ( pk−4 + pk−3 + pk−2 + pk−1 )tk k ≥ 8
k=8 k=8
16 8 4 2
1 4 1 5 3 6 3 7 1 4
g(t) − ( 16 t + 16 t + 64
t + 64
t) = 16
t g(t) + 18 t3 [g(t) − 1 4
16
t] + 14 t2 [g(t) − 1 5
16
t] +
1 3 6
2
t[g(t) − 64 t ]
1 4 1 5 3 6
16
t + 16 t + 64 t
g(t) =
1 1 4
− 16 t − 8 t − 4 t − 12 t
1 3 1 2
′
E(N ) = g (1) = 20
V ar(N ) = g ′′ (1) + g ′ (1) − [g ′ (1)]2 = 276
Page 4