Greenwood和Sandomire在1950年的JASA论文中给出了以下解决方案。
让是从一个随机样品Ñ(μ ,σ 2)的分布。您将使用作为(偏差)估计量的样本标准偏差
S = √来推断σ。X1,…,XnN(μ,σ2)σ
S=∑i=1n(Xi−X¯)2n−1−−−−−−−−−−−−⎷,
Sσ 0 < u < 1。那是,
PR { 小号< (1 - ü )&CenterDot;&σ} = a和PR { 小号> (1 + Ü )&CenterDot;&σ} = b ,
in which the significance level
γ=1−a−b.
It follows that
Pr{(n−1)S2σ2<(n−1)(1−u)2}=a
and
Pr{(n−1)S2σ2>(n−1)(1+u)2}=b.
Since the pivotal quantity
(n−1)S2/σ2 has
χ2n−1 distribution, adding the two probabilities, we find
γ=Fχ2(n−1)((n−1)(1+u)2)−Fχ2(n−1)((n−1)(1−u)2),
and the necessary sample size is found solving the former equation in n for given γ and u.
R
code.
gamma <- 0.95
u <- 0.1
g <- function(n) pchisq((n-1)*(1+u)^2, df = n-1) - pchisq((n-1)*(1-u)^2, df = n-1) - gamma
cat("Sample size n = ", ceiling(uniroot(g, interval = c(2, 10^6))$root), "\n")
Output for u=10% and γ=95%.
Sample size n = 193