S2mu {LearningStats}R Documentation

Variance Estimator when the Population Mean is Known

Description

S2mu computes a estimation of the variance, given a sample x with known population mean (denoted by mu).

Usage

S2mu(x, mu)

Arguments

x

a numeric vector containing the sample.

mu

the population mean.

Details

Given \{x_1,\ldots,x_n\} a sample of a random variable, the variance estimator when the population mean (denoted by \mu) is known can be computed as S^2_\mu=\frac{1}{n}\sum_{i=1}^n (x_i-\mu)^2.

Value

A single numerical value corresponding with the variance estimation when the population mean is known.

Examples

x=rnorm(20)
S2mu(x,mu=0)

[Package LearningStats version 0.1.0 Index]