Finite-sample unbiasing factor for estimating the standard deviation (\(\sigma\)) and the variance (\(\sigma^2\)) under the normal distribution.
c4.factor(n, estimator=c("sd","range", "mad","shamos"))
w4.factor(n, estimator=c("mad2","shamos2"))
It returns a numeric value.
sample size (\(n \ge 1\)).
a character string specifying the estimator, must be
one of "sd"
(default), "range"
, "mad"
, "shamos"
for c4.factor
, and one of "mad2"
(default), "shamos2"
for w4.factor
.
Chanseok Park
The conventional sample standard deviation, range, median absolute deviation (MAD) and Shamos estimators are Fisher-consistent under the normal distribution, but they are not unbiased with a sample of finite size.
Using the sample standard deviation,
an unbiased estimator of the standard deviation (\(\sigma\)) is calculated by
sd(x)/c4.factor(length(x), estimator="sd")
Using the range (maximum minus minimum),
an unbiased estimator of \(\sigma\) is calculated by
diff(range(x))/c4.factor(length(x), estimator="range")
Using the median absolute deviation (mad{stats}),
an unbiased estimator of \(\sigma\) is calculated by
mad(x)/c4.factor(length(x), estimator="mad")
Using the Shamos estimator (shamos
{rQCC}),
an unbiased estimator of \(\sigma\) is calculated by
shamos(x)/c4.factor(length(x), estimator="shamos")
Note that the formula for the unbiasing factor \(c_4(n)\) is given by
$$c_4(n) = \sqrt{\frac{2}{n-1}}\cdot\frac{\Gamma(n/2)}{\Gamma((n-1)/2)}.$$
The squared MAD and squared Shamos are Fisher-consistent for the variance (\(\sigma^2\)) under the normal distribution, but they are not unbiased with a sample of finite size.
An unbiased estimator of the variance (\(\sigma^2\))
is obtained using the finite-sample unbiasing factor (w4.factor
).
Using the squared MAD, an unbiased estimator of \(\sigma^2\) is calculated by
mad(x)^2/w4.factor(length(x), estimator="mad2")
Using the squared Shamos estimator,
an unbiased estimator of \(\sigma^2\) is calculated by
shamos(x)^2/w4.factor(length(x), estimator="shamos2")
The finite-sample unbiasing factors for the median absolute deviation (MAD) and Shamos estimators are obtained for \(n=1,2,\ldots,100\) using the extensive Monte Carlo simulation with 1E07 replicates. For the case of \(n > 100\), they are obtained using the method of Hayes (2014).
Park, C., H. Kim, and M. Wang (2022).
Investigation of finite-sample properties of robust location and scale estimators.
Communications in Statistics - Simulation and Computation,
51, 2619-2645.
tools:::Rd_expr_doi("10.1080/03610918.2019.1699114")
Shamos, M. I. (1976). Geometry and statistics: Problems at the interface. In Traub, J. F., editor, Algorithms and Complexity: New Directions and Recent Results, 251--280. Academic Press, New York.
Hayes, K. (2014). Finite-sample bias-correction factors for the median absolute deviation. Communications in Statistics: Simulation and Computation, 43, 2205--2212.
mad{stats} for the Fisher-consistent median absolute deviation (MAD) estimator of the standard deviation (\(\sigma\)) under the normal distribution.
mad.unbiased
{rQCC} for finite-sample unbiased median absolute deviation (MAD) estimator
of the standard deviation (\(\sigma\)) under the normal distribution.
shamos
{rQCC} for the Fisher-consistent Shamos estimator
of the standard deviation (\(\sigma\)) under the normal distribution.
shamos.unbiased
{rQCC} for finite-sample unbiased Shamos estimator
of the standard deviation (\(\sigma\)) under the normal distribution.
n.times.eBias.of.mad
{rQCC} for the values of the empirical bias of
the median absolute deviation (MAD) estimator under the standard normal distribution.
n.times.eBias.of.shamos
{rQCC} for the values of the empirical bias of
the Shamos estimator under the standard normal distribution.
mad2.unbiased
{rQCC} for finite-sample unbiased squared
MAD estimator of the variance (\(\sigma^2\)) under the normal distribution.
shamos2.unbiased
{rQCC} for finite-sample unbiased squared Shamos estimator
of the variance (\(\sigma^2\)) under the normal distribution.
n.times.evar.of.mad
{rQCC} for the values of the empirical variance of
the median absolute deviation (MAD) estimator under the standard normal distribution.
n.times.evar.of.shamos
{rQCC} for the values of the empirical variance of
the Shamos estimator under the standard normal distribution.
# unbiasing factor for estimating the standard deviation
c4.factor(n=10, estimator="sd")
c4.factor(n=10, estimator="mad")
c4.factor(n=10, estimator="shamos")
# Note: d2 notation is widely used for the bias-correction of the range.
d2 = c4.factor(n=10, estimator="range")
d2
# unbiasing factor for estimating the variance
w4.factor(n=10, "mad2")
w4.factor(n=10, "shamos2")
Run the code above in your browser using DataLab