c*********g 发帖数: 154 | 1 独立同分布的从一个[0,1]均匀分布中采N个样本以使其和大于等于1,而之前N-1个样本
的和小于1。那么随机变量N的期望是多少?
面试的时候不需要给出具体推导,但是猜测得要有一些根据 |
j*****4 发帖数: 292 | 2 E(N)>2.
Is this about the inspection paradox in renewal process?
【在 c*********g 的大作中提到】 : 独立同分布的从一个[0,1]均匀分布中采N个样本以使其和大于等于1,而之前N-1个样本 : 的和小于1。那么随机变量N的期望是多少? : 面试的时候不需要给出具体推导,但是猜测得要有一些根据
|
p*****k 发帖数: 318 | 3 E[N]=e, as the c.d.f. has a nice geometrical interpretation
(volume of the corner of a (n-1)-dim hypercube), so
Pr[N>=n]=1/(n-1)!
thus E[N]=sum{from n=1 to infty} 1/(n-1)!=e |
f***a 发帖数: 329 | 4 ls的方法貌似很强大
笨一点的方法也能求出来:
let Y_n=x_1+...+x_n where x_i iid from unif(0,1)
then
P(N=1)=0
P(N=2)=P(Y_1<1,Y_2>=1)=1/2
P(N=3)=P(Y_2<1,Y_3>=1)= (do some integrations here, not hard)
...
and since P(N=n) decreases fast as n increases.
E(N) /approx sum{n=1:k}(n*P(N=n)), k is some small integer depends on how
much error you allow.
这个的确比较笨。。。-_-| |
c*********g 发帖数: 154 | 5 略微有一点错,应该是:
Pr[N>=n]=1/n*(n-1)!
E[N]=sum{from n=1 to infty} n*Pr[N>=n] = sum{from n=1 to infty} 1/(n-1)! = e
【在 p*****k 的大作中提到】 : E[N]=e, as the c.d.f. has a nice geometrical interpretation : (volume of the corner of a (n-1)-dim hypercube), so : Pr[N>=n]=1/(n-1)! : thus E[N]=sum{from n=1 to infty} 1/(n-1)!=e
|
p*****k 发帖数: 318 | 6 creepingdog, unless i misunderstand your formula, you are calculating
the p.d.f., which is Pr[N=n].
what i did was the c.d.f., which has a geometrical meaning,
(the p.d.f. is simply Pr[N=n]=Pr[N>=n]-Pr[N>=n+1])
then the expectation was calculated via:
http://en.wikipedia.org/wiki/Expected_value#Discrete_distribution_taking_only_non-negative_integer_values |
c*********g 发帖数: 154 | 7 yeah, sorry, you are right. i was thinking Pr[N=n].
【在 p*****k 的大作中提到】 : creepingdog, unless i misunderstand your formula, you are calculating : the p.d.f., which is Pr[N=n]. : what i did was the c.d.f., which has a geometrical meaning, : (the p.d.f. is simply Pr[N=n]=Pr[N>=n]-Pr[N>=n+1]) : then the expectation was calculated via: : http://en.wikipedia.org/wiki/Expected_value#Discrete_distribution_taking_only_non-negative_integer_values
|
i*****e 发帖数: 159 | 8 how do you get Pr[N>=n]=1/(n-1)! ?
and sum{from n=1 to inf} 1/(n-1)! = e ?
Thanks
【在 p*****k 的大作中提到】 : E[N]=e, as the c.d.f. has a nice geometrical interpretation : (volume of the corner of a (n-1)-dim hypercube), so : Pr[N>=n]=1/(n-1)! : thus E[N]=sum{from n=1 to infty} 1/(n-1)!=e
|