delphi数值算法集光盘源代码,用于delphi7科学出版社出版.
源代码在线查看: ftest.txt
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;