Properties

Link copied to clipboard

Fills up an array with the statistics defined by this interface statistics0 = getCount() statistics1 = getAverage() statistics2 = getStandardDeviation() statistics3 = getStandardError() statistics4 = getHalfWidth() statistics5 = getConfidenceLevel() statistics6 = getMin() statistics7 = getMax() statistics8 = getSum() statistics9 = getVariance() statistics10 = getDeviationSumOfSquares() statistics11 = getLastValue() statistics12 = getKurtosis() statistics13 = getSkewness() statistics14 = getLag1Covariance() statistics15 = getLag1Correlation() statistics16 = getVonNeumannLag1TestStatistic() statistics17 = getNumberMissing()

Link copied to clipboard
open val asStrings: List<String>

Returns the values of all the statistics as a list of strings The name is the first string

Link copied to clipboard
abstract val average: Double

Gets the unweighted average of the observations.

Link copied to clipboard
Link copied to clipboard
abstract val binArray: Array<HistogramBin>

Returns an array of Bins based on the current state of the histogram

Link copied to clipboard
abstract val binCounts: DoubleArray
Link copied to clipboard
Link copied to clipboard
abstract val bins: List<HistogramBin>

Returns a List of Bins based on the current state of the histogram

Link copied to clipboard
Link copied to clipboard
abstract val breakPoints: DoubleArray
Link copied to clipboard

A confidence interval for the mean based on the confidence level

Link copied to clipboard
abstract val confidenceLevel: Double

Gets the confidence level. The default is given by Statistic.DEFAULT_CONFIDENCE_LEVEL = 0.95, which is a 95% confidence level

Link copied to clipboard
abstract val count: Double

Gets the count of the number of the observations.

Link copied to clipboard
open val csvHeader: List<String>

Gets the CSV header values as a list of strings

Link copied to clipboard
open override val csvStatistic: String
Link copied to clipboard
open override val csvStatisticHeader: String

The header string for the CVS representation

Link copied to clipboard

A simple estimate of the "density" function for each bin using bin fraction/bin width values for each bin The bin width must be constant across the bins and not equal to 0.0

Link copied to clipboard

Gets the sum of squares of the deviations from the average This is the numerator in the classic sample variance formula

Link copied to clipboard

The first bin's lower limit

Link copied to clipboard
open val halfWidth: Double

Gets the confidence interval half-width. Simply the standard error times the confidence coefficient

Link copied to clipboard
abstract val id: Int
Link copied to clipboard
abstract val kurtosis: Double

Gets the kurtosis of the data

Link copied to clipboard
abstract var label: String?
Link copied to clipboard
abstract val lag1Correlation: Double

Gets the lag-1 generate correlation of the unweighted observations. Note: See Box, Jenkins, Reinsel, Time Series Analysis, 3rd edition, Prentice-Hall, pg 31

Link copied to clipboard
abstract val lag1Covariance: Double

Gets the lag-1 generate covariance of the unweighted observations. Note: See Box, Jenkins, Reinsel, Time Series Analysis, 3rd edition, Prentice-Hall, pg 31

Link copied to clipboard

The last bin's upper limit

Link copied to clipboard
abstract val lastValue: Double
Link copied to clipboard
Link copied to clipboard
abstract val max: Double

Gets the maximum of the observations.

Link copied to clipboard
Link copied to clipboard
abstract val min: Double

Gets the minimum of the observations.

Link copied to clipboard
abstract val name: String
Link copied to clipboard
abstract val negativeCount: Double

Counts the number of observations that were negative, strictly less than zero.

Link copied to clipboard
abstract val numberBins: Int
Link copied to clipboard
abstract val numberMissing: Double

When a data point having the value of (Double.NaN, Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY) are presented it is excluded from the summary statistics and the number of missing points is noted. This method reports the number of missing points that occurred during the collection

Link copied to clipboard
abstract val overFlowCount: Double

The number of observations that fell past the last bin's upper limit

Link copied to clipboard

Counts the number of observations that were positive, strictly greater than zero.

Link copied to clipboard

Returns the relative error: getStandardError() / getAverage()

Link copied to clipboard

Returns the relative width of the default confidence interval: 2.0 * getHalfWidth() / getAverage()

Link copied to clipboard
abstract val skewness: Double

Gets the skewness of the data

Link copied to clipboard

Gets the sample standard deviation of the observations. Simply the square root of variance

Link copied to clipboard
abstract val standardError: Double

Gets the standard error of the observations. Simply the generate standard deviation divided by the square root of the number of observations

Link copied to clipboard

Fills the map with the values of the statistics. Key is statistic label and value is the value of the statistic. The keys are: "Count" "Average" "Standard Deviation" "Standard Error" "Half-width" "Confidence Level" "Lower Limit" "Upper Limit" "Minimum" "Maximum" "Sum" "Variance" "Deviation Sum of Squares" "Kurtosis" "Skewness" "Lag 1 Covariance" "Lag 1 Correlation" "Von Neumann Lag 1 Test Statistic" "Number of missing observations"

Link copied to clipboard
abstract val sum: Double

Gets the sum of the observations.

Link copied to clipboard
abstract val totalCount: Double

Total number of observations collected including overflow and underflow

Link copied to clipboard
abstract val underFlowCount: Double

The number of observations that fell below the first bin's lower limit

Link copied to clipboard
Link copied to clipboard
abstract val value: Double
Link copied to clipboard
abstract val variance: Double

Gets the sample variance of the observations.

Link copied to clipboard

Gets the Von Neumann Lag 1 test statistic for checking the hypothesis that the data are uncorrelated Note: See Handbook of Simulation, Jerry Banks editor, McGraw-Hill, pg 253.

Link copied to clipboard

Returns the asymptotic p-value for the Von Nueumann Lag-1 Test Statistic:

Link copied to clipboard
open val width: Double
Link copied to clipboard
abstract val zeroCount: Double

Counts the number of observations that were exactly zero.

Functions

Link copied to clipboard
open fun asString(): String
Link copied to clipboard
abstract fun bin(x: Double): HistogramBin

The bin that x falls in. The bin is a copy. It will not reflect observations collected after this call.

abstract fun bin(binNum: Int): HistogramBin

Returns an instance of a Bin for the supplied bin number The bin does not reflect changes to the histogram after this call. May throw IndexOutOfBoundsException

Link copied to clipboard
abstract fun binCount(x: Double): Double

Returns the current bin count for the bin associated with x

abstract fun binCount(binNum: Int): Double

Returns the bin count for the indicated bin

Link copied to clipboard
abstract fun binFraction(x: Double): Double

Returns the fraction of the data relative to those tabulated in the bins for the bin number associated with the x

abstract fun binFraction(binNum: Int): Double

Returns the fraction of the data relative to those tabulated in the bins for the supplied bin number

Link copied to clipboard
abstract fun binNumber(x: Double): Int

Bins are numbered starting at 1 through the number of bins

Link copied to clipboard

Returns the probability for each bin of the histogram based on a continuous interval interpretation of the bin . The distribution, cdf must implement the ContinuousDistributionIfc interface

Returns the probability for each bin of the histogram based on an open integer range interpretation of the bin . The discrete distribution, discreteCDF must implement the ProbInRangeIfc interface

Link copied to clipboard
open fun collect(obs: Boolean)

Collects on the boolean value true = 1.0, false = 0.0

open fun collect(observations: BooleanArray)
open fun collect(observations: DoubleArray)
open fun collect(observations: IntArray)
open fun collect(observations: LongArray)

Collects on the values in the supplied array.

abstract fun collect(obs: Double)

Collect on the supplied value. Double.NaN, Double.NEGATIVE_INFINITY, and Double.POSITIVE_INFINITY values are counted as missing. Null values are not permitted.

open fun collect(fn: () -> Double)

Collect on the double value return by the function

open fun collect(obs: Int)

Collects on the Int value

open fun collect(obs: Long)

Collects on the Long value

open fun collect(observations: Collection<Double>)

Collects on all the values in the supplied collection.

open fun collect(v: GetValueIfc)

Collects on the values returned by the supplied GetValueIfc

Link copied to clipboard
abstract operator fun compareTo(other: AbstractStatistic): Int
Link copied to clipboard

A confidence interval for the mean based on the confidence level

Link copied to clipboard

Return a copy of the information as an instance of a statistic

Link copied to clipboard
abstract fun cumulativeBinCount(x: Double): Double

Returns the cumulative count of all bins up to and including the bin containing the value x

abstract fun cumulativeBinCount(binNum: Int): Double

Returns the cumulative count of all the bins up to and including the indicated bin number

Link copied to clipboard

Returns the cumulative fraction of the data up to and including the bin containing the value of x

abstract fun cumulativeBinFraction(binNum: Int): Double

Returns the cumulative fraction of the data up to and including the indicated bin number

Link copied to clipboard
abstract fun cumulativeCount(x: Double): Double

Returns the cumulative count of all the data (including underflow and overflow) for all bins up to and including the bin containing x

abstract fun cumulativeCount(binNum: Int): Double

Returns the cumulative count of all the data (including underflow and overflow) up to and including the indicated bin

Link copied to clipboard
abstract fun cumulativeFraction(x: Double): Double

Returns the cumulative fraction of all the data up to an including the bin containing the value x, (includes over and under flow)

abstract fun cumulativeFraction(binNum: Int): Double

Returns the cumulative fraction of all the data up to and including the supplied bin (includes over and under flow)

Link copied to clipboard
open override fun estimate(): Double
Link copied to clipboard

Returns the expected count for each bin of the histogram based on a continuous interval interpretation of the bin . The distribution, cdf must implement the ContinuousDistributionIfc interface

open fun expectedCounts(discreteCDF: ProbInRangeIfc): DoubleArray

Returns the expected count for each bin of the histogram based on a continuous interval interpretation of the bin . The discrete distribution, discreteCDF must implement the ProbInRangeIfc interface

Link copied to clipboard
abstract fun findBin(x: Double): HistogramBin
Link copied to clipboard
open fun halfWidth(level: Double): Double

Gets the confidence interval half-width. Simply the standard error times the confidence coefficient as determined by an appropriate sampling distribution

Link copied to clipboard

The data of the histogram bins

Link copied to clipboard
open fun histogramPlot(proportions: Boolean = true): HistogramPlot

Creates a plot for the histogram. The parameter, proportions indicates whether proportions (true) or frequencies (false) will be shown on the plot. The default is true.

Link copied to clipboard
open fun leadingDigitRule(multiplier: Double): Int

Computes the right most meaningful digit according to (int)Math.floor(Math.log10(a*getStandardError())) See doi 10.1287.opre.1080.0529 by Song and Schmeiser

Link copied to clipboard
open fun relativeWidth(level: Double): Double

Returns the relative width of the level of the confidence interval: 2.0 * getHalfWidth(level) / getAverage()

Link copied to clipboard
abstract fun reset()

Resets the collector as if no observations had been collected.

Link copied to clipboard
open fun statisticData(level: Double = 0.95): StatisticData

Returns a data class holding the statistical data with the confidence interval specified by the given level.

Link copied to clipboard
open fun statisticDataDb(level: Double = 0.95, context: String? = null, subject: String? = null, tableName: String = "tblStatistic"): StatisticDataDb

Returns a data class holding the statistical data with the confidence interval specified by the given level. The class is suitable for inserting into a database table.

Link copied to clipboard

Converts the histogram bin data into a dataframe representation

Link copied to clipboard
fun StatisticIfc.toStatDataFrame(valueLabel: String = "Value"): DataFrame<StatSchema>

Converts a statistic to a data frame with two columns. The first column holds the names of the statistics and the second column holds the values. The valueLabel can be used to provide a column name for the value columns. By default, it is "Value".

Link copied to clipboard
open fun width(level: Double): Double