Package-level declarations

Types

Link copied to clipboard
data class ControlChartLimits(val centerLine: Double, val ucl: Double, val lcl: Double)

Control limits for a single Shewhart control chart.

Link copied to clipboard
data class CusumResult(val sPlus: DoubleArray, val sMinus: DoubleArray, val alarmIndex: Int)

Results of a two-sided tabular CUSUM control chart analysis.

Link copied to clipboard
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)

A snapshot of common descriptive statistics for a dataset.

Link copied to clipboard
data class EwmaResult(val smoothedValues: DoubleArray, val ucl: DoubleArray, val lcl: DoubleArray, val outOfControl: IntArray)

Results of an EWMA (Exponentially Weighted Moving Average) control chart analysis.

Link copied to clipboard

A mutable accumulator that counts the frequency of discrete values.

Link copied to clipboard
data class FrequencyEntry<T>(val value: T, val count: Long)

A data holder representing a single value and its observed frequency.

Link copied to clipboard

A streaming one-pass accumulator for descriptive statistics.

Link copied to clipboard

Selects between sample and population formulas for variance and standard deviation.

Link copied to clipboard
data class ProcessCapabilityResult(val cp: Double, val cpk: Double, val pp: Double, val ppk: Double)

Results of a process capability analysis.

Link copied to clipboard

Controls how values between two data points are interpolated when computing quantiles and percentiles.

Link copied to clipboard

Selects the algorithm used to compute quantiles and percentiles from sample data.

Link copied to clipboard

Selects which side of the threshold to measure in a semi-variance calculation.

Link copied to clipboard
data class SpcConstants(val a2: Double, val a3: Double, val d3: Double, val d4: Double, val b3: Double, val b4: Double, val c4: Double)

Standard Statistical Process Control (SPC) constants for a given subgroup size.

Link copied to clipboard
data class WesternElectricRulesResult(val rule1: IntArray, val rule2: IntArray, val rule3: IntArray, val rule4: IntArray)

Indices of observations that violate each of the four Western Electric Rules.

Link copied to clipboard
data class XBarRChartResult(val centerLine: Double, val ucl: Double, val lcl: Double, val rChart: ControlChartLimits)

Results of an x-bar and R (range) control chart analysis.

Link copied to clipboard
data class XBarSChartResult(val centerLine: Double, val ucl: Double, val lcl: Double, val sChart: ControlChartLimits)

Results of an x-bar and S (standard deviation) control chart analysis.

Functions

Link copied to clipboard

Computes the n-th central moment of the values.

Computes the n-th central moment of the values in this sequence.

Link copied to clipboard

Computes the coefficient of variation (CV) of the values in this array.

Computes the coefficient of variation (CV) of the values in this iterable.

Computes the coefficient of variation (CV) of the values in this sequence.

Link copied to clipboard
fun cusum(observations: DoubleArray, target: Double, k: Double, h: Double): CusumResult

Computes a two-sided tabular CUSUM control chart for the given observations.

fun cusum(observations: Iterable<Double>, target: Double, k: Double, h: Double): CusumResult

Computes a two-sided tabular CUSUM control chart for an Iterable of observations.

fun cusum(observations: Sequence<Double>, target: Double, k: Double, h: Double): CusumResult

Computes a two-sided tabular CUSUM control chart for a Sequence of observations.

Link copied to clipboard

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

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

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

Computes a descriptive statistics summary of the Int values.

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

Computes a descriptive statistics summary of the Long values.

Link copied to clipboard
fun ewma(observations: DoubleArray, target: Double, sigma: Double, lambda: Double, controlLimitWidth: Double): EwmaResult

Computes an EWMA (Exponentially Weighted Moving Average) control chart for the given observations.

fun ewma(observations: Iterable<Double>, target: Double, sigma: Double, lambda: Double, controlLimitWidth: Double): EwmaResult

Computes an EWMA control chart for an Iterable of observations.

fun ewma(observations: Sequence<Double>, target: Double, sigma: Double, lambda: Double, controlLimitWidth: Double): EwmaResult

Computes an EWMA control chart for a Sequence of observations.

Link copied to clipboard

Computes the geometric mean of the values in this array.

Computes the geometric mean of the values in this iterable.

Computes the geometric mean of the values in this sequence.

Link copied to clipboard

Computes the harmonic mean of the values in this array.

Computes the harmonic mean of the values in this iterable.

Computes the harmonic mean of the values in this sequence.

Link copied to clipboard
fun DoubleArray.interquartileRange(method: QuantileMethod = QuantileMethod.LINEAR): Double

Computes the interquartile range (IQR) of the values in this array.

fun Iterable<Double>.interquartileRange(method: QuantileMethod = QuantileMethod.LINEAR): Double

Computes the interquartile range (IQR) of the values in this iterable.

fun Sequence<Double>.interquartileRange(method: QuantileMethod = QuantileMethod.LINEAR): Double

Computes the interquartile range (IQR) of the values in this sequence.

Link copied to clipboard

Computes the k-statistic of the given order, the unique symmetric unbiased estimator of the corresponding cumulant.

Link copied to clipboard
fun DoubleArray.kurtosis(kind: PopulationKind = SAMPLE, excess: Boolean = true): Double

Computes the kurtosis of the values in this array.

fun Iterable<Double>.kurtosis(kind: PopulationKind = SAMPLE, excess: Boolean = true): Double

Computes the kurtosis of the values in this iterable.

fun Sequence<Double>.kurtosis(kind: PopulationKind = SAMPLE, excess: Boolean = true): Double

Computes the kurtosis of the values in this sequence.

Link copied to clipboard

Computes the arithmetic mean of the values in this array.

Computes the arithmetic mean of the values in this iterable.

@JvmName(name = "meanOfInt")
fun Iterable<Int>.mean(): Double

Computes the arithmetic mean of the Int values.

@JvmName(name = "meanOfLong")
fun Iterable<Long>.mean(): Double

Computes the arithmetic mean of the Long values.

Computes the arithmetic mean of the values in this sequence.

Link copied to clipboard

Computes the mean absolute deviation (MAD) of the values in this array.

Computes the mean absolute deviation (MAD) of the values in this iterable.

Computes the mean absolute deviation (MAD) of the values in this sequence.

Link copied to clipboard

Computes the median of the values in this array.

Computes the median of the values in this iterable.

@JvmName(name = "medianOfInt")
fun Iterable<Int>.median(): Double

Computes the median of the Int values.

@JvmName(name = "medianOfLong")
fun Iterable<Long>.median(): Double

Computes the median of the Long values.

Computes the median of the values in this sequence.

Link copied to clipboard

Computes the median absolute deviation (median AD) of the values in this array.

Computes the median absolute deviation (median AD) of the values in this iterable.

Computes the median absolute deviation (median AD) of the values in this sequence.

Link copied to clipboard
fun <T> Iterable<T>.mode(): Set<T>

Returns the mode (most frequently occurring values) of this iterable.

Link copied to clipboard
fun DoubleArray.percentile(p: Double, method: QuantileMethod = QuantileMethod.LINEAR): Double

Computes the p-th percentile of the values in this array.

fun Iterable<Double>.percentile(p: Double, method: QuantileMethod = QuantileMethod.LINEAR): Double

Computes the p-th percentile of the values in this iterable.

@JvmName(name = "percentileOfIntDeprecated")
fun Iterable<Int>.percentile(p: Double, interpolation: QuantileInterpolation): Double
@JvmName(name = "percentileOfInt")
fun Iterable<Int>.percentile(p: Double, method: QuantileMethod = QuantileMethod.LINEAR): Double

Computes the p-th percentile of the Int values.

@JvmName(name = "percentileOfLongDeprecated")
fun Iterable<Long>.percentile(p: Double, interpolation: QuantileInterpolation): Double
@JvmName(name = "percentileOfLong")
fun Iterable<Long>.percentile(p: Double, method: QuantileMethod = QuantileMethod.LINEAR): Double

Computes the p-th percentile of the Long values.

fun Sequence<Double>.percentile(p: Double, method: QuantileMethod = QuantileMethod.LINEAR): Double

Computes the p-th percentile of the values in this sequence.

Link copied to clipboard
fun <T : Comparable<T>> List<T>.percentileSelect(p: Double, method: QuantileMethod = QuantileMethod.NEAREST): T

Selects the element at the p-th percentile position from this sorted list.

Link copied to clipboard

Computes process capability indices (Cp, Cpk, Pp, Ppk) for the values in this array.

Computes process capability indices (Cp, Cpk, Pp, Ppk) for the values in this iterable.

@JvmName(name = "processCapabilityOfInt")
fun Iterable<Int>.processCapability(lsl: Double, usl: Double): ProcessCapabilityResult

Computes process capability indices (Cp, Cpk, Pp, Ppk) for the Int values.

@JvmName(name = "processCapabilityOfLong")
fun Iterable<Long>.processCapability(lsl: Double, usl: Double): ProcessCapabilityResult

Computes process capability indices (Cp, Cpk, Pp, Ppk) for the Long values.

Computes process capability indices (Cp, Cpk, Pp, Ppk) for the values in this sequence.

Link copied to clipboard
fun DoubleArray.quantile(q: Double, method: QuantileMethod = QuantileMethod.LINEAR): Double

Computes the q-th quantile of the values in this array.

fun Iterable<Double>.quantile(q: Double, method: QuantileMethod = QuantileMethod.LINEAR): Double

Computes the q-th quantile of the values in this iterable.

fun Sequence<Double>.quantile(q: Double, method: QuantileMethod = QuantileMethod.LINEAR): Double

Computes the q-th quantile of the values in this sequence.

Link copied to clipboard
fun <T : Comparable<T>> List<T>.quantileSelect(q: Double, method: QuantileMethod = QuantileMethod.NEAREST): T

Selects the element at the q-th quantile position from this list.

Link copied to clipboard
fun DoubleArray.quartiles(method: QuantileMethod = QuantileMethod.LINEAR): Triple<Double, Double, Double>

Computes the three quartiles (Q1, Q2, Q3) of the values in this array.

fun Iterable<Double>.quartiles(method: QuantileMethod = QuantileMethod.LINEAR): Triple<Double, Double, Double>

Computes the three quartiles (Q1, Q2, Q3) of the values in this iterable.

fun Sequence<Double>.quartiles(method: QuantileMethod = QuantileMethod.LINEAR): Triple<Double, Double, Double>

Computes the three quartiles (Q1, Q2, Q3) of the values in this sequence.

Link copied to clipboard

Computes the range of the values in this array.

Computes the range of the values in this iterable.

Computes the range of the values in this sequence.

Link copied to clipboard
fun Iterable<Double>.semiVariance(direction: SemiVarianceDirection = SemiVarianceDirection.DOWNSIDE, kind: PopulationKind = SAMPLE): Double

Computes the semi-variance using the mean as the threshold.

fun Sequence<Double>.semiVariance(direction: SemiVarianceDirection = SemiVarianceDirection.DOWNSIDE, kind: PopulationKind = SAMPLE): Double
fun DoubleArray.semiVariance(threshold: Double = mean(), direction: SemiVarianceDirection = SemiVarianceDirection.DOWNSIDE, kind: PopulationKind = SAMPLE): Double
fun Iterable<Double>.semiVariance(threshold: Double, direction: SemiVarianceDirection = SemiVarianceDirection.DOWNSIDE, kind: PopulationKind = SAMPLE): Double
fun Sequence<Double>.semiVariance(threshold: Double, direction: SemiVarianceDirection = SemiVarianceDirection.DOWNSIDE, kind: PopulationKind = SAMPLE): Double

Computes the semi-variance of the values on one side of a threshold.

Link copied to clipboard

Computes the skewness of the values in this array.

Computes the skewness of the values in this iterable.

Computes the skewness of the values in this sequence.

Link copied to clipboard
fun spcConstants(subgroupSize: Int): SpcConstants

Returns the standard SPC constants for the given subgroupSize.

Link copied to clipboard

Computes the standard deviation of the values in this array.

Computes the standard deviation of the values in this iterable.

@JvmName(name = "standardDeviationOfInt")
fun Iterable<Int>.standardDeviation(kind: PopulationKind = PopulationKind.SAMPLE): Double

Computes the standard deviation of the Int values.

@JvmName(name = "standardDeviationOfLong")
fun Iterable<Long>.standardDeviation(kind: PopulationKind = PopulationKind.SAMPLE): Double

Computes the standard deviation of the Long values.

Computes the standard deviation of the values in this sequence.

Link copied to clipboard

Computes the standard error of the mean for the values in this array.

Computes the standard error of the mean for the values in this iterable.

Computes the standard error of the mean for the values in this sequence.

Link copied to clipboard

Creates a Frequency accumulator from the elements of this iterable.

Link copied to clipboard

Computes the trimmed (truncated) mean by removing a fraction of values from each tail.

Link copied to clipboard
fun DoubleArray.trimmedStd(proportion: Double, kind: PopulationKind = SAMPLE): Double
fun Iterable<Double>.trimmedStd(proportion: Double, kind: PopulationKind = SAMPLE): Double
fun Sequence<Double>.trimmedStd(proportion: Double, kind: PopulationKind = SAMPLE): Double

Computes the standard deviation of the values after removing a fraction from each tail.

Link copied to clipboard
fun DoubleArray.trimmedVariance(proportion: Double, kind: PopulationKind = SAMPLE): Double
fun Iterable<Double>.trimmedVariance(proportion: Double, kind: PopulationKind = SAMPLE): Double
fun Sequence<Double>.trimmedVariance(proportion: Double, kind: PopulationKind = SAMPLE): Double

Computes the variance of the values after removing a fraction from each tail.

Link copied to clipboard

Computes the variance of the values in this array.

Computes the variance of the values in this iterable.

@JvmName(name = "varianceOfInt")
fun Iterable<Int>.variance(kind: PopulationKind = PopulationKind.SAMPLE): Double

Computes the variance of the Int values.

@JvmName(name = "varianceOfLong")
fun Iterable<Long>.variance(kind: PopulationKind = PopulationKind.SAMPLE): Double

Computes the variance of the Long values.

Computes the variance of the values in this sequence.

Link copied to clipboard

Computes the weighted arithmetic mean of the values using the given weights.

Link copied to clipboard

Applies the Western Electric Rules to the given observations to detect non-random patterns on a control chart.

Applies the Western Electric Rules to an Iterable of observations to detect non-random patterns on a control chart.

Applies the Western Electric Rules to a Sequence of observations to detect non-random patterns on a control chart.

Link copied to clipboard

Computes x-bar and R control chart limits for the given subgroups.

Link copied to clipboard

Computes x-bar and S control chart limits for the given subgroups.