返回题库

红糖取完时剩下蓝绿的概率

Left Some Candies

专题
Probability / 概率
难度
L6

题目详情

罐子里有 10 颗红糖、20 颗蓝糖、30 颗绿糖。你随机逐颗取出(不放回)。

当你取完所有红糖时,罐子里仍至少剩 1 颗蓝糖且至少剩 1 颗绿糖的概率是多少?

(同色糖视为不可区分。)

提示:把 60 次取糖视为一个颜色序列。

You are taking out candies one by one from a jar that has 1010 red candies, 2020 blue candies, and 3030 green candies in it. What is the probability that there is at least 11 blue candy and 11 green candy left in the jar when you have taken out all the red candies?

Assume that the candies of the same color are indistinguishable from one another.

Hint

Consider the sequences of 60 candies, in which red candies finish before blue and green.

解析

答案是 712\frac{7}{12}

一种做法是把“第 60 颗(最后一颗)红糖出现的位置”与“蓝/绿谁先被取光”分情形计数,可得到

30602030+20603040=712.\frac{30}{60}\cdot\frac{20}{30}+\frac{20}{60}\cdot\frac{30}{40}=\frac{7}{12}.

Original Explanation

7/12

Solution

30602030+20603040=712\dfrac{30}{60} \cdot \dfrac{20}{30}+\dfrac{20}{60} \cdot \dfrac{30}{40} =\dfrac{7}{12}

We will reach this formula by considering the complete sequence of 60 candies.

Any scenario that satisfies the given question will match one of the following two:

  1. The 60th60^{\text{th}} candy in this sequence is green, and some blue candy exists before this and after the last red candy.

  2. The 60th60^{\text{th}} candy is blue, and some green candy exists before this and after the last red candy.

In the first scenario, let GG be the event that the 60th60^{\text{th}} candy is green. Let BB^* be the event that there is a blue candy before that but after the last red. Since these two events are not independent, we want to calculate:

P(GB)=P(G)P(BG)P(G \cap B^*) = P(G) \cdot P(B^* | G)

P(G)=30/60P(G) = 30/60 because the 60th60^{\text{th}} candy will be one of 30 greens, and there are a total of 60 choices.

P(BG)P(B^* | G) is the probability of finding a blue candy after the last red, given that the 60th60^{\text{th}} candy is green. Now remove all green candies from consideration, there are 30 candies (10 red & 20 blue). Imagine a random sequence of these 30 candies (it might be scattered anywhere from position 1 to 5959, but still, it is a random sequence of 30 candies only). The probability that the 30th30^{\text{th}} one of these is blue is 20/3020/30.

Thus P(GB)=(30/60)(20/30)P(G \cap B^*) = (30/60) \cdot (20/30).

Similarly, for the second scenario, let BB be the event that the 60th60^{\text{th}} candy is blue and let GG^* be the event that there is a green candy before that but after the last red. We want to calculate P(BG)=P(B)P(GB)=(20/60)(30/40)P(B \cap G^*) = P(B) \cdot P(G^* | B) = (20/60) \cdot (30/40)

Since these two scenarios are mutually exclusive, the probability of union is the sum of these probabilities.

Hence the answer: 1/3+1/4=7/121/3 + 1/4 = 7/12


Not convinced? Here is a simulation script that shows the probability converging to 7/12.

Colab Script