EstimatedResponse

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

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
open override val average: Double
Link copied to clipboard
open override val count: Double
Link copied to clipboard
open override var label: String?
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val variance: Double

Functions

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.