FrequencyBin

data class FrequencyBin(val range: ClosedRange<Double>, val count: Int, val relativeFrequency: Double, val cumulativeFrequency: Double)(source)

A histogram bin with frequency statistics but without the original items.

This is a stable value type: its property set (range, count, relativeFrequency, cumulativeFrequency) is fixed and will not change in future versions.

Example:

val freq = listOf(1.0, 2.0, 3.0, 4.0, 5.0).frequencyTable(2)
freq[0].range // bin boundaries
freq[0].count // how many values in this bin
freq[0].relativeFrequency // proportion of total
freq[0].cumulativeFrequency // running proportion

Constructors

Link copied to clipboard
constructor(range: ClosedRange<Double>, count: Int, relativeFrequency: Double, cumulativeFrequency: Double)

Properties

Link copied to clipboard
val count: Int

the number of values that fall within range.

Link copied to clipboard

the running total of relative frequencies up to and including this bin (between 0 and 1, with the last bin always equal to 1).

Link copied to clipboard

the closed interval of values that this bin covers.

Link copied to clipboard

the proportion of total values in this bin (between 0 and 1).