Counting and Probability

2009-02-24 4:33 am
假定我擲一枚硬幣﹐擲到「公」叫成功﹐擲到「字」叫失敗。那麼我在時候n時(第n次投擲後)﹐得到第一個連續兩次失敗﹐但不連續三次或以上失敗的概率是多少?
舉例。假設成功機率是p﹐失敗機率是q。在n時得到「第一個連續兩次失敗」的機率是f_n
f_1=0
f_2={FF}=q^2
f_3={SFF}=pq^2
f_4={SSFF+FSFF)=pq^2
又n的期望值和變異數是多少?

回答 (2)

2009-02-24 7:14 pm
✔ 最佳答案
for n => 3, the required event occurs iff the last 3 trials are SFF and the first n-3 trials have no consecutive F.
Let g_n be the probability that the first n trials have no consective F. Then for n => 3, we have
f_n = pq^2 g_(n-3).
Next we develop a recurrence relation for g_n. For convenience, we exclude the trivial case p=0. Note that
P(no consecutive F in n trials AND n-th trial=S)
= P(no consecutive F in n-1 trials AND n-th trial = S)
= p g_(n-1)
also
P(no consecutive F in n trials AND n-th trial=F)
= P(no consecutive F in n-2 trials AND (n-1)-th trial=S AND n-th trial = F)
= pq g_(n-2)
Hence,
g_n = p g_(n-1) + pq g_(n-2).
Solve this linear recurrence relation, we get
g_n = Aα^n + Bβ^n,
where α= (p+√(p^2+4pq))/2, β= (p-√(p^2+4pq))/2.
Put g_0 = g_1 = 1, we get
A= (1-β)/(α-β), B=(α-1)/(α-β). (Note that α≠β if p≠0)
Hence for n => 3, f_n = pq^2 (Aα^(n-3) + Bβ^(n-3))
where A,B,α,βare given as above.

E(n) = 2q^2 + Σ(n=3 to ∞) pq^2 (Aα^(n-3) + Bβ^(n-3))n
= 2q^2 + pq^2 AΣ(n=3 to ∞) nα^(n-3) + pq^2 BΣ(n=3 to ∞) nβ^(n-3)
= 2q^2 + pq^2 (A(3 - 2α)/(1-α)^2 + B(3 - 2β)/(1-β)^2)
if α<1, (note that we always have -1<β=<0)
and E(n) = ∞ if α=> 1.

Var(n) = E(n^2) - E(n)^2
E(n^2) = 4q^2 + Σ(n=3 to ∞) pq^2 (Aα^(n-3) + Bβ^(n-3))n^2
= 4q^2+pq^2(A(9-13- 4α^2))/(1-α)^3+B(9-13β-4β^2))/(1-β)^3),
and E(n) is given above. Plug in and you get the answer.
2009-02-24 10:22 pm
VERY GOOD﹐不過和William Feller還是有少少差距。


收錄日期: 2021-04-22 00:52:46
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20090223000051KK01926

檢視 Wayback Machine 備份