由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Science版 - Re: help!!--problem of probability: solution
相关主题
help!!--problem of probability[转载] Re: 请教一个排列问题
Re: 概率题!概率题!请教!A simpler solution Re: [转载] 概率难题
Re: A real analysis problem, one solution.a simple high school question
数学系高手请进:A math question4856严格解和讨论
两堆石子问题Re: 问个最小二乘法的问题
一个数学题Re: A mathematical Analysis Question
Re: 我来说个题帮我想想这个数学展开吧。
Is this a NP-complete problem?Re: 请教一道概率题
相关话题的讨论汇总
话题: var话题: sum话题: denoting话题: solution
进入Science版参与讨论
1 (共1页)
P***a
发帖数: 9
1
Sorry now I believe the variance is 155, and the expectation
is still 12.
I guess this is one of non's homework, right?
*********************************************
Let D be the random variable denoting the days the prisoner
in the cell, and T the random variable denoting the times
the prisoner selecting doors other than Door3.
The answer is E[D]=12 and var[D]=155.
E[D]=E[E[D|T]]
=Sum[ E[D|T=t]*0.8^t*0.2, {t,0,infinity}]
var[D]=E[var[D|T]]+var[E[D|T]]
=Sum[ var[D|T=t]*0.8^t*0.2, {t,0,infinity}]
d*z
发帖数: 150
2
It seems (12,155)
#include
#include
#include
#define MAX_COUNT 1000000
void main()
{
int days;
int i;
double sum,var;
srand(time(NULL));
sum=0;var=0;
for(i=0;i {
days=0;
do
{
int r=rand()%10;
if(r<5)
{
days+=2;
}
else if(r<8)
{
days+=4;
}
else
{
days++;
break;
}
}while(1);
sum+=days;
var+=days*days;
}
sum/=MAX_COUNT;
var/=MAX_COUNT;
var-=sum*sum;
printf("Mean is %f,and Var is %f\n",sum,var);
}

【在 P***a 的大作中提到】
: Sorry now I believe the variance is 155, and the expectation
: is still 12.
: I guess this is one of non's homework, right?
: *********************************************
: Let D be the random variable denoting the days the prisoner
: in the cell, and T the random variable denoting the times
: the prisoner selecting doors other than Door3.
: The answer is E[D]=12 and var[D]=155.
: E[D]=E[E[D|T]]
: =Sum[ E[D|T=t]*0.8^t*0.2, {t,0,infinity}]

1 (共1页)
进入Science版参与讨论
相关主题
Re: 请教一道概率题两堆石子问题
Re: 标准模型问题请教--学粒子的朋友请看一下一个数学题
赌场问题: frequentist vs. KaynesianRe: 我来说个题
Re: is this probability problem hard?Is this a NP-complete problem?
help!!--problem of probability[转载] Re: 请教一个排列问题
Re: 概率题!概率题!请教!A simpler solution Re: [转载] 概率难题
Re: A real analysis problem, one solution.a simple high school question
数学系高手请进:A math question4856严格解和讨论
相关话题的讨论汇总
话题: var话题: sum话题: denoting话题: solution