Sample Variance Formula
Before going to learn the sample variance formula, let us recall what is sample variance. In a practical situation, when the population size N is large it becomes difficult to obtain value x_{i} for every observation in the population and hence it becomes difficult to calculate the variance for the population. In such cases, we can estimate the variance by calculating it on a sample of size n taken from the population of size N. This estimated variance is called the sample variance (S^{2}). Let us explore the sample variance formula for a given sample below.
What Is Sample Variance Formula?
The sample variance formula involves the sample size and the mean. Given a sample of data (observations) for the random variable x, its sample variance is given by
\(S^2 = \dfrac{1}{n-1} \sum^{n}_{i=1}(x_i - \bar{x})^2\)
where
- S^{2 }is the sample variance
- n is the sample size
- x_{i} is the i^{th} value of the random variable x and x̄ is the sample mean.
Steps to Calculate Sample Variance:
- Find the mean of the data set. Add all data values and divide by the sample size n.
- Find the squared difference from the mean for each data value. Subtract the mean from each data value and square the result.
- Find the sum of all the squared differences.
- Calculate the variance.
Let us see the applications of the sample variance formula in the following section.
Examples Using the Sample Variance Formula
Example 1: There are 45 students in a class. 5 students were randomly selected from this class and their heights (in cm) were recorded as follows:
131 |
148 |
139 |
142 |
152 |
Calculate the sample mean and the sample variance of their heights (in cm).
Solution:
Sample size (n) = 5
Sample Mean = \(\dfrac{131 + 148 + 139 + 142 + 152}{5}\) = \(\dfrac{712}{5}\) = 142.4 cm
Using the sample variance formula,
Sample Variance = \(\dfrac{1}{n-1} \sum^{n}_{i=1}(x_i - \bar{x})^2\) = \(\dfrac{1}{5-1} \sum^{5}_{i=1}(x_i - 142.4)^2 \)
= \( \dfrac{(131 - 142.4)^2 + (148 - 142.4)^2 + (139 - 142.4)^2 + (142 - 142.4)^2 + (152 - 142.4)^2}{4} \) = 66.3 cm^{2}
Answer: Sample Mean = 142.4 cm, Sample Variance = 66.3 cm^{2}
Example 2: If all values in a data set are the same then the sample variance is equal to?
Solution:
Variance is the degree of spread or change in the given data points. The variance is calculated in relation to the mean of the data. The more the spread of the data, the more will be the variance in relation to the mean.
The formula for variance :
σ^{2} = ∑ (X - μ)^{2} / N ,
σ^{2 }= sample variance
X = Each data value
μ = mean of the data set
N = total number of data set.
Special case: When all the data set points are the same
In this case, the mean of the data set i.e. μ is the same as each data value i.e. X
Thus, X - μ = 0
Hence, variance becomes 0.
In order to calculate the variance of the given dataset, we can make use of the online variance calculator.
Answer: So, the variance of the data set in which each value is similar will be equal to 0.
Example 3: Three trees were randomly chosen from this population and their heights are listed as follows. Find the sample standard deviation of their heights. (Use √2594 = 51)
1021 |
982 |
920 |
Solution: Sample size (n) = 3
Let x_{i }be the height of the i^{th} tree.
Sample Mean (x̄) = \( \dfrac{1021+982+920}{3} \) = 974.3 cm
Using the sample variance formula,
Sample Variance = \( \dfrac{\sum^{n}_{i=1} (x_i - \bar{x})}{n-1} \) = \( \dfrac{\sum^{3}_{i=1} (x_i - 974.3)}{3-1} \) = \( \dfrac{(1021 - 974.3)^2 + (982 - 974.3)^2 + (920 - 974.3)^2 + }{2} \) = 2594.3cm^{2}
Sample Standard Deviation = \(\sqrt{2594.3}\) = 51 cm
Answer: The sample standard deviation of the height of the trees is approximately 51 cm.
FAQs on Sample Variance Formula
What Is Sample Variance Formula?
The sample variance formula involves the sample size and the mean. Given a sample of data (observations) for the random variable x, its sample variance is given by
\(S^2 = \dfrac{1}{n-1} \sum^{n}_{i=1}(x_i - \bar{x})^2\)
where
- S^{2 }is the sample variance
- n is the sample size
- x_{i} is the i^{th} value of the random variable x and x̄ is the sample mean.
What Is Population Variance and Sample Variance in Sample Variance Formula?
Population variance is the value of variance that is calculated from population data, and the sample variance formula is applicable only to the sample data. The variance and standard deviation obtained from sample data are more than those calculated from population data.
What Is the Symbol for Sample Variance in Sample Variance Formula?
The symbol 's^{2}' represents the sample variance.
What do Small and Big Variance Mean in Sample Variance Formula?
A small variance obtained using the sample variance formula indicates that the data points are close to the mean and to each other. A big variance indicates that the data values are spread out from the mean, and from one another.