Improve documentation of different weighted mean standard errors
This commit is contained in:
parent
d25f267529
commit
ed4c11e31d
@ -77,6 +77,11 @@ impl WeightedAverage {
|
|||||||
///
|
///
|
||||||
/// Note that this will return 0 if the sum of the weights is 0.
|
/// Note that this will return 0 if the sum of the weights is 0.
|
||||||
/// For this estimator the sum of weights should be larger than 1.
|
/// For this estimator the sum of weights should be larger than 1.
|
||||||
|
///
|
||||||
|
/// This biased estimator uses the weighted variance and the sum of weights.
|
||||||
|
/// It considers the weights as (noninteger) counts of how often the sample
|
||||||
|
/// has been observed, applying the standard formulas to calculate mean,
|
||||||
|
/// variance and sample size across all "repeats".
|
||||||
pub fn error(&self) -> f64 {
|
pub fn error(&self) -> f64 {
|
||||||
// This uses the same estimate as SPSS.
|
// This uses the same estimate as SPSS.
|
||||||
//
|
//
|
||||||
|
@ -112,6 +112,9 @@ impl WeightedAverage {
|
|||||||
/// Estimate the standard error of the weighted mean of the sequence.
|
/// Estimate the standard error of the weighted mean of the sequence.
|
||||||
///
|
///
|
||||||
/// Returns 0 if the sum of weights is 0.
|
/// Returns 0 if the sum of weights is 0.
|
||||||
|
///
|
||||||
|
/// This unbiased estimator assumes that the samples were independently
|
||||||
|
/// drawn from the same population with constant variance.
|
||||||
pub fn error(&self) -> f64 {
|
pub fn error(&self) -> f64 {
|
||||||
// This uses the same estimate as WinCross.
|
// This uses the same estimate as WinCross.
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user