unbiasing.factor | R Documentation |
Finite-sample unbiasing factor for estimating the standard deviation (σ) and the variance (σ^2) under the normal distribution.
c4.factor(n, estimator=c("sd","range", "mad","shamos")) w4.factor(n, estimator=c("mad2","shamos2"))
n |
sample size (n ≥ 1). |
estimator |
a character string specifying the estimator, must be
one of |
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 (σ) is calculated by
sd(x)/c4.factor(length(x), estimator="sd")
Using the range (maximum minus minimum),
an unbiased estimator of σ is calculated by
diff(range(x))/c4.factor(length(x), estimator="range")
Using the median absolute deviation (mad{stats}),
an unbiased estimator of σ is calculated by
mad(x)/c4.factor(length(x), estimator="mad")
Using the Shamos estimator (shamos
{rQCC}),
an unbiased estimator of σ is calculated by
shamos(x)/c4.factor(length(x), estimator="shamos")
Note that the formula for the unbiasing factor c4(n) is given by
c4(n) = √{2/(n-1)}*Γ(n/2)/Γ((n-1)/2).
The squared MAD and squared Shamos are Fisher-consistent for the variance (σ^2) under the normal distribution, but they are not unbiased with a sample of finite size.
An unbiased estimator of the variance (σ^2)
is obtained using the finite-sample unbiasing factor (w4.factor
).
Using the squared MAD, an unbiased estimator of σ^2 is calculated by
mad(x)^2/w4.factor(length(x), estimator="mad2")
Using the squared Shamos estimator,
an unbiased estimator of σ^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, ... ,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).
It returns a numeric value.
Chanseok Park
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.
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 (σ) under the normal distribution.
mad.unbiased
{rQCC} for finite-sample unbiased median absolute deviation (MAD) estimator
of the standard deviation (σ) under the normal distribution.
shamos
{rQCC} for the Fisher-consistent Shamos estimator
of the standard deviation (σ) under the normal distribution.
shamos.unbiased
{rQCC} for finite-sample unbiased Shamos estimator
of the standard deviation (σ) 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 (σ^2) under the normal distribution.
shamos2.unbiased
{rQCC} for finite-sample unbiased squared Shamos estimator
of the variance (σ^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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.