Errors: String;
The Errors property returns a message showing all the errors and warnings occurred during calculations.
Sub Main;
Var
st: Statistics;
d0: Double;
y, x: Array Of Double;
Begin
y := New Double[2,3];
x := New Double[2,3];
y[0,0] := 58; y[1,0] := 35;
y[0,1] := 11; y[1,1] := 25;
y[0,2] := 10; y[1,2] := 23;
x[0,0] := 45.35; x[1,0] := 47.65;
x[0,1] := 17.56; x[1,1] := 18.44;
x[0,2] := 16.09; x[1,2] := 16.91;
st := New Statistics.Create;
d0 := st.ChiTest(y,x);
If st.Status <> 0 Then
Debug.WriteLine(st.Errors);
Else
Debug.WriteLine("Chi-square value: " + d0.ToString);
End If;
End Sub Main;
Executing this example shows a probability value for χ2 statistics in the console window:
Module execution started
Chi-square value: 0.0003081920170083093
Module execution finished
See also: