Function rgsl::statistics::wvariance_with_fixed_mean
source · [−]pub fn wvariance_with_fixed_mean(
w: &[f64],
wstride: usize,
data: &[f64],
stride: usize,
n: usize,
mean: f64
) -> f64
Expand description
This function computes an unbiased estimate of the variance of the weighted dataset data when the population mean mean of the underlying distribution is known a priori. In this case the estimator for the variance replaces the sample mean \Hat\mu by the known population mean \mu,
\Hat\sigma^2 = (\sum w_i (x_i - \mu)^2) / (\sum w_i)