BoxStatistics Class

The statistics of box plots: quantiles with linear interpolation (R's type 7, the default of R, NumPy and Excel) and Tukey's whiskers.

public static class BoxStatistics

Methods

NameDescription
Quantile(IReadOnlyList<double>, double)Computes a quantile of sorted values, by linear interpolation between the closest ranks (R's type 7).
Summarize(IEnumerable<double>)Computes the summary of a sample. NaN values are ignored.

Quantile(IReadOnlyList<double>, double)

BoxStatistics.cs

Computes a quantile of sorted values, by linear interpolation between the closest ranks (R's type 7).

public static double Quantile(IReadOnlyList<double> sortedValues, double probability)

Parameters

sortedValues IReadOnlyList<double>
The values, in increasing order.
probability double
The probability, from 0 to 1.

Returns

double The quantile, or NaN when there is no value.

Summarize(IEnumerable<double>)

BoxStatistics.cs

Computes the summary of a sample. NaN values are ignored.

public static BoxSummary? Summarize(IEnumerable<double> values)

Parameters

values IEnumerable<double>
The values.

Returns

BoxSummary? The summary, or null when there is no value.