我们可以把“不放回抽球”的过程建模为:对所有球进行一次均匀随机排列。
设 R、B 和 G 分别表示红球、蓝球和绿球的集合。
定义 last(C) 为颜色 C 的最后一颗球在该排列中的位置。
我们要求的是:在最后一颗红球被抽出之后,坛中仍至少剩下一颗蓝球和一颗绿球的概率。
等价地说,我们要排除下面两个“坏事件”:
A:last(G)<last(R),B:last(B)<last(R).
因此所求概率为
Pr(good)=1−Pr(A∪B)=1−Pr(A)−Pr(B)+Pr(A∩B).
第 1 步. 计算 Pr(A)
在颜色属于 R∪G 的 r+g 个球中,最后出现的是哪一个球是等可能的,因此
Pr(A)=Pr(R∪G 中最后一个球是红球)=r+gr.
第 2 步. 计算 Pr(B)
用同样的道理,
Pr(B)=r+br.
第 3 步. 计算 Pr(A∩B)
事件 A 和 B 同时发生,当且仅当总体上最后一个被抽出的球是红球(也就是红球的最后出现位置晚于蓝球和绿球的最后出现位置)。因此
Pr(A∩B)=r+b+gr.
通用公式:
Pr(最后一颗红球被抽出后,至少还剩一颗蓝球和一颗绿球)=1−r+gr−r+br+r+b+gr.
当 r=10, b=20, g=30 时:
1−10+3010−10+2010+10+20+3010=1−41−31+61=127.
127
Original Explanation
We can model the process of drawing marbles without replacement as choosing a
uniformly random permutation of all the marbles.
Let R, B, and G denote the sets of red, blue, and green marbles.
Define last(C) as the position of the last marble of color C
in the permutation.
We want the probability that after the last red is drawn, there is at least one
blue and at least one green remaining.
Equivalently, we want to avoid the two “bad” events:
A:last(G)<last(R),B:last(B)<last(R).
Thus the desired probability is
Pr(good)=1−Pr(A∪B)=1−Pr(A)−Pr(B)+Pr(A∩B).
Step 1. Compute Pr(A)
Among the r+g marbles of colors R∪G, the final marble is equally likely
to be any of them. Hence
Pr(A)=Pr(last of R∪G is red)=r+gr.
Step 2. Compute Pr(B)
By the same reasoning,
Pr(B)=r+br.
Step 3. Compute Pr(A∩B)
Both A and B occur iff the overall last marble is red (so red’s last is
after both blue’s and green’s last). Thus
Pr(A∩B)=r+b+gr.
General formula:
Pr(at least one blue and one green left after last red)=1−r+gr−r+br+r+b+gr.
Case r=10, b=20, g=30:
1−10+3010−10+2010+10+20+3010=1−41−31+61=127.
127