作者ko7751 (雨茜)
看板FJU-STAT95B
标题[正经] 用脑时间
时间Tue May 11 14:54:06 2010
double data[20]={22,34,52,62,30,40,64,84,56,59,
52,71,76,54,67,83,66,90,77,84};
Univar DATA(20,data);
DATA.print(0);
Univar X,Y;
DATA.split(X,10,Y);
X.print(0); Y.print(0);
cout.precision(6);
double t =t_stat(X,Y);
cout<< "two sample t stat.=" << t << endl;
cout<< t_2_tailed_prob(t,18) << endl;
double ind[20]={1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0};
Univar I(20,ind);
I.print(0);
double T1=DATA*I;
cout<< " nonparametric randomization test stat. = " << T1 << endl;
Univar T;
for(i=0;i<1000000;i++)
{
I.shuffle();
T.push_back(DATA*I);
}
T.freq_dist(-1);
Univar x=time_axis(460,760,10);
multi_dis G(x);
G.push_freq_dist(T.freq_dist(-1));
G.print_to_file("C:\\devcpp\\G.dat",5);
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.136.161.80
1F:推 ww770829:感谢~ 05/11 14:55
※ 编辑: ko7751 来自: 140.136.161.80 (05/11 14:56)
※ 编辑: ko7751 来自: 140.136.161.80 (05/11 14:59)
※ 编辑: ko7751 来自: 140.136.161.80 (05/11 15:01)
2F:推 weiching0323:今天轮到你接手!!!! 05/11 15:02
3F:推 weiching0323:帮你改标题!!! 05/11 15:02
※ 编辑: ko7751 来自: 140.136.161.80 (05/11 15:10)
※ 编辑: ko7751 来自: 140.136.161.80 (05/11 15:12)
※ 编辑: ko7751 来自: 140.136.161.80 (05/11 15:23)
4F:推 abidog:楼上人咧 竟然离开工作岗位!! 05/11 15:51