颜色切换次数期望
Color Switches
题目详情
一个罐子里有 100 个球(50 黑 50 白)。随机不放回逐个取出直到取完。
若相邻两次取出的颜色不同(黑后白或白后黑),称为一次“颜色切换”。
问:颜色切换次数的期望是多少?
提示:期望线性性。
You are given an urn with 100 balls (50 black and 50 white). You pick balls from urn one by one without replacements until all the balls are out. A black followed by a white or a white followed by a black is "a colour change". Calculate the expected number of colour-changes if the balls are being picked randomly from the urn.
Hint
Linearity of expectation
解析
答案是 50。
共有 99 个相邻位置对。对任意相邻对,颜色不同的概率为
用线性性:
Original Explanation
50
Solution
Each time we draw, there could be a possible color-switch, except the first time we draw, hence 99 possible switches.
Let be an indicator variable, value 1 if position has a colour change and zero otherwise, note that goes from to .
Total number of switches,
The expected number of color switches is denoted by the sum of these variables, i.e
Linearity of expectation states that the expected value of the sum of random variables is equal to the sum of their individual expected values.
Hence the answer is
Note that each is identical, and the expected value is equal for each , i.e,
Hence
Also, we can calculate the expected value,
Probability of any given color change is (either first is R second is B, or first is B and second is R)
Finally, the answer is
Note: 's are not independent, but since all the balls are drawn randomly, the probability-distribution is identical for each draw. For instance, if you are given no information about the previous colors, and I ask 'what is the probability that 5th draw has a color change?', your answer will not depend on '5', instead the answer will be same for any index.