1~50號的號碼球各一個, 每次抽取一球,抽取後不放回,當1~8號球均抽出時即停止,求抽出球個數的期望值?

2015-10-09 4:55 pm

回答 (1)

2015-10-10 3:21 pm
✔ 最佳答案
設第 x 個停止

P(x)
= (第x個必為1~8號球其中一個) * (前x-1個選取與排列數) / P(50,x)
= 8 * C(42,x-8) * (x-1)! / P(50,x)
= 8 * { 42! / [ (x-8)! * (50-x)! ] } * (x-1)! * [ (50-x)! / 50! ]
= 8 * 42! * (x-1)! / [ (x-8)! * 50! ]
= 8 * (x-1)(x-2)*.....*(x-7) / (50*49*.....*43)

x*P(x) = 8*x(x-1)(x-2)*.....*(x-7) / (50*49*.....*43)

所求期望值
= Σ x*P(x) , from x=8 to x=50
= Σ [ 8*x(x-1)(x-2)*.....*(x-7) / (50*49*.....*43) ] , from x=8 to x=50

Σ 的公式一般只有計算到3次方, 也就是 Σ x^3 ; 但此題為8次方,
故以下用 Excel VBA 程式計算, 程式碼如下:

-----------------------------------------------------------------
Sub my_combination()

S = 0

For x = 8 To 50
P = 1
For i = 0 To 7
P = P * (x - i) / (50 - i)
Next
S = S + 8 * P
Next

[A1] = S

End Sub
-----------------------------------------------------------------

計算結果 = 45.33333..... = 45 1/3

Ans: 45 1/3


收錄日期: 2021-05-02 14:09:15
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20151009085531AAHDTxl

檢視 Wayback Machine 備份