sample.var {LearningStats} | R Documentation |
Sample Variance
Description
sample.var
computes the sample variance of a sample x
.
Usage
sample.var(x)
Arguments
x |
a numeric vector containing the sample. |
Details
Given \{x_1,\ldots,x_n\}
a sample of a random variable, the sample variance
can be computed as S^2=\frac{1}{n}\sum_{i=1}^n (x_i-\bar{x})^2
.
Value
A single numerical value corresponding with the sample variance.
Examples
x=rnorm(20)
sample.var(x)
[Package LearningStats version 0.1.0 Index]