rStats.js v1.3.0
    Preparing search index...

    Function distSummary

    • Mean, variance, standard deviation, median, mode, skewness and excess kurtosis of a distribution, given by the name of its d/p/q/r functions and their parameters (with the same names and defaults; gamma takes rate or scale, nbinom takes prob or mu). Invalid parameters give NaN throughout. The distributions are the central ones: ncp of chisq, beta, t and f is not taken (an unknown key, a RangeError). Not an R function. R has no function for these summaries; the R references are closed forms checked against numerical moments.

      Parameters

      • distribution: DistName
      • params: Record<string, number | undefined> = {}

      Returns DistSummary

      distSummary("gamma", { shape: 2.5, rate: 2 }); // { mean: 1.25, variance: 0.625, ..., mode: 0.75, kurtosis: 2.4 }
      distSummary("binom", { size: 9, prob: 0.5 }).mode; // 5 (4 and 5 are equally likely: the larger)