抽样的不同数个数
Distinct Number Draws
题目详情
从集合 中进行有放回抽样,独立均匀地抽取 次。
问:抽到的不同数值的期望个数是多少?
提示:指示变量 + 期望线性性。
Given the set of numbers from 1 to n: { 1, 2, 3 .. n } We draw n numbers randomly (with uniform distribution) from this set (with replacement). What is the expected number of distinct values that we would draw?
Hint
Linearity of expectation
解析
令 指示数 是否至少出现一次,则
不同值总数 ,因此
Original Explanation
E(n) = n[1-(1-1/n)^n]
Solution
Notice that number of distinct points in the produced set is same as number of distinct points selected from the given set {1..n} . For that we denote indicator function Si, that is, Si = 1 if the interger i is taken into produced set.
Let S denote the number of distinct points selected, S = S1+..+Sn E(S) = E(S1) +...+ E(Sn) and E(Si) = 1 * P(Si) = 1 - (Probability that 'i' is not chosen in any draw)
= 1 - ( Prob that is i is not chosen in one 1st draw)^n = 1 - ( 1 - 1/n )^n
Thus E(S) = n * ( 1 - ( (n-1) / n)^n )