DescriptiveStatistics

data class DescriptiveStatistics(val count: Long, val mean: Double, val standardDeviation: Double, val min: Double, val q1: Double, val median: Double, val q3: Double, val max: Double, val variance: Double, val skewness: Double, val kurtosis: Double, val sum: Double, val range: Double, val interquartileRange: Double, val standardError: Double)(source)

A snapshot of common descriptive statistics for a dataset.

Returned by the describe function. Contains measures of central tendency, dispersion, shape, and position. Fields that require a minimum number of data points are set to Double.NaN when there is insufficient data (e.g. variance needs at least 2, skewness needs at least 3, kurtosis needs at least 4).

Example:

val stats = doubleArrayOf(1.0, 2.0, 3.0, 4.0, 5.0).describe()
stats.mean // 3.0
stats.median // 3.0
stats.variance // 2.5

Constructors

Link copied to clipboard
constructor(count: Long, mean: Double, standardDeviation: Double, min: Double, q1: Double, median: Double, q3: Double, max: Double, variance: Double, skewness: Double, kurtosis: Double, sum: Double, range: Double, interquartileRange: Double, standardError: Double)

Properties

Link copied to clipboard
val count: Long

the number of observations.

Link copied to clipboard

the difference between Q3 and Q1.

Link copied to clipboard

the sample-adjusted excess kurtosis, or NaN if n < 4.

Link copied to clipboard
val max: Double

the largest value in the dataset.

Link copied to clipboard

the arithmetic mean.

Link copied to clipboard

the second quartile (50th percentile).

Link copied to clipboard
val min: Double

the smallest value in the dataset.

Link copied to clipboard
val q1: Double

the first quartile (25th percentile).

Link copied to clipboard
val q3: Double

the third quartile (75th percentile).

Link copied to clipboard

the difference between the maximum and minimum values.

Link copied to clipboard

the sample-adjusted Fisher-Pearson skewness, or NaN if n < 3.

Link copied to clipboard

the sample standard deviation (divides by n-1), or NaN if n < 2.

Link copied to clipboard

the standard error of the mean (stddev / sqrt(n)), or NaN if n < 2.

Link copied to clipboard
val sum: Double

the sum of all values.

Link copied to clipboard

the sample variance (divides by n-1), or NaN if n < 2.