相关代码 |
|
Sub FTEST(DATA1(), N1, DATA2(), N2, F, PROB) Call AVEVAR(DATA1(), N1, AVE1, VAR1) Call AVEVAR(DATA2(), N2, AVE2, VAR2) If VAR1 > VAR2 Then F = VAR1 / VAR2 DF1 = N1 - 1 DF2 = N2 - 1 Else F = VAR2 / VAR1 DF1 = N2 - 1 DF2 = N1 - 1 End If 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 Sub