信封错装
Messing with Envelops
题目详情
有 封信与 个信封。把 封信随机放入信封(等价于对 个编号做均匀随机排列)。
问:最终装对的信封数量的期望是多少?
提示:指示变量 + 期望线性性。
There are letters and envelopes. You put the letters randomly in the envelopes so that each letter is in one envelope. (Effectively a random permutation of numbers chosen uniformly). Calculate the expected number of envelopes with the correct letter inside them.
Hint
Use Indicator variables and the Linearity of Expectation
解析
答案是 1。
令 表示第 个信封是否装对(装对为 1,否则为 0),则
总装对数 ,因此
Original Explanation
1
Solution
Let be the indicator random variable such that:
- if the th letter ends up in the th envelope.
- otherwise
for any
let be the number of letters that ended up in their respective envelopes.
Now, =
(Using Linearity of Expectations)
Therefore, we expect on average one letter to be in the correct envelope.