Skip to content

This site describes solve-engine as it is on main: 2.43.0, which npm does not have yet. npm installs 2.40.0, so a page may show an answer that version does not give yet.

STATISTICS_PACKAGE

const STATISTICS_PACKAGE: IEnginePackage;

Defined in: packages/engine/src/packages/statistics/StatisticsPackage.ts:26

The second tier of statistics (issues #244, #245): the relationship between two lists, and position within one. correlation of A and B, slope of A and B, intercept of A and B; percentile([list], p) and zscore(x, [list]). Every form also has a call spelling.

And the probability distributions (#517): the normal (normalcdf, normalpdf, normalinv), binomial (binompdf, binomcdf), Poisson (poissonpdf, poissoncdf) and Student’s t (tpdf, tcdf, tinv), with the special functions behind them (erf, erfc, gamma, lgamma).

A companion to the spread, shape and weighted-average forms already in the language (and to median of, which the maths-phrases package supplies). On by default and removable. Lists are [bracketed] vectors (or an integer range), and a bad shape, a length mismatch, too few points, an argument outside a distribution’s domain or an argument the form does not read is answered with a structured Error rather than a wrong number.