data temp;
input x1 x2 n1 n2 s1 s2;
sc=sqrt((1/n1+1/n2)*((n1-1)*s1**2+(n2-1)*s2**2)/(n1+n2-2));
t=(x2-x1)/sc;
v=n1+n2-2;
p=probt(t,v);
cards;
0.03 0.08 77 236 0.15 0.18
;
proc print;
run;
data temp;
input x1 x2 n1 n2 s1 s2;
sc=sqrt((1/n1+1/n2)*((n1-1)*s1**2+(n2-1)*s2**2)/(n1+n2-2));
t=(x2-x1)/sc;
v=n1+n2-2;
p=probt(t,v);
cards;
0.03 0.08 77 236 0.15 0.18
;
proc print;
run;
本文标题:无原始数据的两个独立样本t检验代码
本文链接:https://www.haomeiwen.com/subject/juqbyltx.html
网友评论