Next: Absolute deviation, Up: Statistics
This function returns the arithmetic mean of data, a dataset of length n with stride stride. The arithmetic mean, or sample mean, is denoted by \Hat\mu and defined as,
\Hat\mu = (1/N) \sum x_iwhere x_i are the elements of the dataset data. For samples drawn from a gaussian distribution the variance of \Hat\mu is \sigma^2 / N.
This function returns the estimated, or sample, variance of data, a dataset of length n with stride stride. The estimated variance is denoted by \Hat\sigma^2 and is defined by,
\Hat\sigma^2 = (1/(N-1)) \sum (x_i - \Hat\mu)^2where x_i are the elements of the dataset data. Note that the normalization factor of 1/(N-1) results from the derivation of \Hat\sigma^2 as an unbiased estimator of the population variance \sigma^2. For samples drawn from a gaussian distribution the variance of \Hat\sigma^2 itself is 2 \sigma^4 / N.
This function computes the mean via a call to
gsl_stats_mean
. If you have already computed the mean then you can pass it directly togsl_stats_variance_m
.
This function returns the sample variance of data relative to the given value of mean. The function is computed with \Hat\mu replaced by the value of mean that you supply,
\Hat\sigma^2 = (1/(N-1)) \sum (x_i - mean)^2
The standard deviation is defined as the square root of the variance. These functions return the square root of the corresponding variance functions above.
This function computes an unbiased estimate of the variance of data when the population mean mean of the underlying distribution is known a priori. In this case the estimator for the variance uses the factor 1/N and the sample mean \Hat\mu is replaced by the known population mean \mu,
\Hat\sigma^2 = (1/N) \sum (x_i - \mu)^2