Stats 0.3.0 distributions - CyrilB1531/lodestar GitHub Wiki

Lodestar.Stats 0.3.0. This page is frozen at that release. Read the current documentation for what main says now. A link to a decision or a migration page follows main, and leaves the archive.

Distributions

The tail probabilities and the quantile a caller holding its own statistic needs.

public static class Distributions

Example — a coefficient's two-sided p-value and its 95% multiplier, the two numbers a regression table prints beside an estimate.

using Lodestar.Stats;

// A t of 2.0 on 12 residual degrees of freedom.
double twoSided = 2.0 * Distributions.StudentSf(2.0, 12.0);   // => 0.0686550…
double multiplier = Distributions.StudentQuantile(0.975, 12.0); // => 2.1788128296672298

// And the overall F test of a model with two regressors and twenty residual df.
double overall = Distributions.FisherSf(4.0, 2.0, 20.0);        // => 0.0345716…

// And a log-rank test's p-value, on one degree of freedom.
double logRank = Distributions.ChiSquaredSf(3.84, 1.0);          // => 0.0500…

Remarks — these are the members a second package has asked for, and no more: four for Lodestar.Stats.Regression under decisions/0095, and the chi-squared tail for a log-rank test under decisions/0097. The machinery underneath — log-gamma, the incomplete beta and gamma, the normal tail — stays internal; decisions/0081 says why, and the index page says what publishing them cost.

Applies to — net10.0, netstandard2.0.

See alsoTTest, OneWayAnova, the distributions index.

Members

Member What it does
Distributions.ChiSquaredSf The upper tail of the chi-squared distribution.
Distributions.FisherSf The upper tail of the F distribution.
Distributions.StudentQuantile The value a Student's t falls below with a given probability.
Distributions.StudentSf The upper tail of Student's t.