describe

@JvmName(name = "describeOfLong")
fun Iterable<Long>.describe(): DescriptiveStatistics(source)

Computes a descriptive statistics summary of the Long values.

Values are converted to Double internally. Long values whose absolute value exceeds 2^53 (9,007,199,254,740,992) may lose precision in the least-significant digits.

Example:

val stats = listOf(1L, 2L, 3L, 4L, 5L).describe()
stats.mean // 3.0
stats.median // 3.0

Return

a DescriptiveStatistics summary of the values.


@JvmName(name = "describeOfInt")
fun Iterable<Int>.describe(): DescriptiveStatistics(source)

Computes a descriptive statistics summary of the Int values.

Values are converted to Double internally. The conversion is exact for all Int values.

Example:

val stats = listOf(1, 2, 3, 4, 5).describe()
stats.mean // 3.0
stats.median // 3.0

Return

a DescriptiveStatistics summary of the values.


Computes a comprehensive descriptive statistics summary of the values in this iterable.

Performs a single sort for order statistics (min, max, quartiles, median) and a single Welford pass for mean, variance, skewness, and kurtosis. This is more efficient than computing each statistic individually.

Example:

val stats = listOf(1.0, 2.0, 3.0, 4.0, 5.0).describe()
stats.count // 5
stats.mean // 3.0
stats.median // 3.0

Return

a DescriptiveStatistics containing all computed statistics.


Computes a comprehensive descriptive statistics summary of the values in this array.

Performs a single sort for order statistics (min, max, quartiles, median) and a single Welford pass for mean, variance, skewness, and kurtosis. This is more efficient than computing each statistic individually.

Example:

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

Return

a DescriptiveStatistics containing all computed statistics.