全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件
8353 1
2010-03-08
想知道如何计算两个正态分布的重叠面积,有现成的公式或者现成的计算程序吗?最好是较常用的编程语言。
//bow
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2010-3-10 01:39:29
damker 发表于 2010-3-8 15:40
想知道如何计算两个正态分布的重叠面积,有现成的公式或者现成的计算程序吗?最好是较常用的编程语言。
//bow
Here is the example to calculate 两个正态分布的重叠面积 in SAS/IML with call quad routine. See detail explaination in PGM.





****numerical integration***;
proc iml;
/* Define the integrand */
start fun(t) global (cnt);
cnt=cnt+1;
/*PDF('NORMAL',t , 1, 1)=normal (1,1)
PDF('NORMAL',t , 0, 1 ) ) = normal (0,1)*/

/* Overlap parts = integal of (-m to +m) v dx */

v = min( PDF('NORMAL',t , 1, 1), PDF('NORMAL',t , 0, 1 ) );

return(v);

finish;

/* Call QUAD */
a = { .M .P};
cnt=0;
call quad(z,"fun",a);
print z[format=best.] cnt;

quit;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群