220k views
5 votes
In statistics the sample Standard Deviation (where you divide by the number of data elements in the sample) is not a good example of a sample predicting the overall characteristics of a population because it provides to much emphasis (bias) on the lower data values in the sample set.

A small correction factor can improve this estimate. Dividing the n-1 (one element less than the original number of data elements) instead when taking the average. This is called the unbiased estimator of the population variance.
The Standard Deviation (unbiased estimator of the population - pop est) is just the square root of the unbiased estimator of the population variance.
In MATLAB we use the std function with an additional argument in the second position to indicate if we are calculating the standard deviation with the unbiased estimator or if we are using actual standard deviation (sometimes called sample SD).
Which of the below MATLAB scripts, indicates using the unbiased estimator for standard deviation?

User Yuehan Lyu
by
8.7k points

1 Answer

2 votes

Final answer:

In MATLAB, the unbiased estimator for standard deviation is obtained by using the std function with the second argument set to 1, as in std(sampleData, 1), which applies Bessel's correction for an unbiased estimate of the population standard deviation.

Step-by-step explanation:

To use the unbiased estimator for calculating the standard deviation in MATLAB, which corresponds to the sample standard deviation (denoted as s in statistics), we have to use the std function with an additional argument.

This argument, which is a second input to the std function, should be set to 1 to indicate that MATLAB should perform the calculation using n - 1 as the divisor — this is known as Bessel's correction.

The MATLAB command to apply Bessel's correction, and thus to obtain an unbiased estimate of the population standard deviation, would be std(sampleData, 1), where sampleData is the array containing the sample data.

To account for this bias, a correction factor is used by dividing by (n-1) instead of n. This is known as the unbiased estimator of the population variance.

The standard deviation, which is the square root of the unbiased estimator of the population variance, can be calculated in MATLAB using the std function with an additional argument in the second position to indicate the use of the unbiased estimator.

Therefore, the MATLAB script that indicates using the unbiased estimator for standard deviation is:

std(data, 0)

User Hemant Bhargava
by
8.4k points