Classical statistics for small analyses: descriptive statistics, the Student t, normal, chi-square and F distributions, t-tests with confidence intervals and effect sizes, Pearson correlation with a p-value, and an ordinary least squares fit with the full summary table (standard errors, t statistics, p values, confidence intervals, F test, R-squared, AIC and BIC). Compile with -lib stats,gen_collect; it needs nothing from System.ML.
No call here ends the program on bad input. A function that returns a Float returns NaN, and a function that returns a result object returns one whose IsValid() is false and whose GetError() says why. Design and verification notes: docs/AI.md, "Statistics".
CorrelationResult
The outcome of a correlation test. A failed one (IsValid() false) has NaN in every number.
Operations
GetCiHigh #
Upper end of the Fisher-z confidence interval for r (NaN when n is 3 or less).
method : public : GetCiHigh() ~ FloatReturn
| Type | Description |
|---|---|
| Float | upper bound |
GetCiLow #
Lower end of the Fisher-z confidence interval for r (NaN when n is 3 or less).
method : public : GetCiLow() ~ FloatReturn
| Type | Description |
|---|---|
| Float | lower bound |
GetDf #
Degrees of freedom, n - 2.
method : public : GetDf() ~ FloatReturn
| Type | Description |
|---|---|
| Float | degrees of freedom |
GetError #
Why the test did not run, or an empty string.
method : public : GetError() ~ StringReturn
| Type | Description |
|---|---|
| String | reason |
GetP #
Two-sided p-value for the null hypothesis of no correlation.
method : public : GetP() ~ FloatReturn
| Type | Description |
|---|---|
| Float | p |
GetR #
The correlation coefficient, between -1 and 1.
method : public : GetR() ~ FloatReturn
| Type | Description |
|---|---|
| Float | r |