Variance
The variance is a numerical measure of how the data values is dispersed around the mean. In particular, the sample variance is defined as:
Similarly, the population variance is defined in terms of the population mean μ and population size N:
Problem
Find the sample variance of the eruption duration in the data set faithful.
Solution
We apply the var function to compute the sample variance of eruptions.
> var(duration) # apply the var function
[1] 1.3027
Answer
The sample variance of the eruption duration is 1.3027.
Exercise
Find the sample variance of the eruption waiting periods in faithful.