EstimatedResponse

@Serializable
data class EstimatedResponse(val name: String, val average: Double, val variance: Double, val count: Double)

Represents an estimated response based on an independent sample. For the case of sample size 1 (count equals 1) the variance will be undefined (Double.NaN).

Parameters

name

the name of the response that was estimated

average

the sample average of the sample

variance

the sample variance of the sample

count

the number of observations in the sample

Constructors

Link copied to clipboard
constructor(name: String, data: DoubleArray)
constructor(name: String, data: List<Double>)
constructor(name: String, average: Double, variance: Double, count: Double)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun halfWidth(level: Double = DEFAULT_CONFIDENCE_LEVEL): Double

Gets the confidence interval half-width. Simply the standard error times the confidence coefficient based on a StudentT distribution approximation.

Link copied to clipboard
Link copied to clipboard

Combine this estimate with another independent estimate

Link copied to clipboard

Computes the pooled variance when combining samples from the same population. The pooling process assumes a weighted average of the variances. In the case where each estimate only has count equal to 1, the variance is computed from the two data points. In the cases where the pooled sample will have 3 elements, the variance associated with the sample size of 2 is used. In the cases where both samples have 2 or more elements, a weighted pooled variance is computed.

Link copied to clipboard
fun screeningWidth(estimate: EstimatedResponse, level: Double = DEFAULT_CONFIDENCE_LEVEL): Double

Computes the pair-wise screening width assuming that the estimates are independent. This width is used to specify screening intervals within screening procedures. This quantity is the square root of the sum of squared half-widths of the estimates.