相关代码 |
|
procedure FTEST(DATA1:array of real; N1:integer; DATA2:array of real; N2:integer;var F, PROB:real); var DF1,DF2,DUM1,DUM2,AVE1,VAR1,AVE2,VAR2:real; begin AVEVAR(DATA1, N1, AVE1, VAR1); AVEVAR(DATA2, N2, AVE2, VAR2); If VAR1 > VAR2 Then begin F:=VAR1 / VAR2; DF1:=N1 - 1; DF2:=N2 - 1; end else begin F:=VAR2 / VAR1; DF1:=N2 - 1; DF2:=N1 - 1; end; DUM1:=BETAI(0.5 * DF2, 0.5 * DF1, DF2 / (DF2 + DF1 * F)); DUM2:=1 - BETAI(0.5 * DF1, 0.5 * DF2, DF1 / (DF1 + DF2 / F)); PROB:=DUM1 + DUM2; end;