Re: confidence interval
- From: "m00es" <m00es@xxxxxxxxx>
- Date: 20 Oct 2005 00:50:02 -0700
Several people have already replied to the original post. But for the
fun of it, let's just approach this problem from first principles.
Let Y = x1 + x2 + ... xn
and assume that the xi's are independent (if they were not, then we
would not be able to get very far without knowing what the correlation
between the xi's is). Also, assume that the xi's are normally
distributed. Then xi ~ N( mu, sigma^2 ). As far as I can tell from the
original post, sigma^2 is actually not given. In other words, sigma^2
is the true but unknown variance here. Therefore:
E(Y) = E(x1 + ... + xn) = n mu
V(Y) = V(x1 + ... + xn) = V(x1) + ... + V(xn) = n sigma^2
and therefore Y ~ N( n mu, n sigma^2 ). It follows that
(Y - n mu) ~ N(0, n sigma^2)
and
(Y - n mu) / sqrt(n sigma^2) ~ N(0,1).
Now, we do not actually know sigma^2, but we have s^2 (the variance in
the sample). From first principles we know that
s^2 ~ sigma^2 X^2(n-1),
where X^2(n-1) is a random variable following a chi-square distribution
with n-1 degrees of freedom. Thus,
(Y - n mu) / sqrt( n s^2 / (n-1) )
is distributed
N(0, n sigma^2) / sqrt( n sigma^2 X^2(n-1) / (n-1) )
which in turn is distributed
N(0,1) / sqrt( X^2(n-1) / (n-1) )
which in turn we know follows a t-distribution with n-1 degrees of
freedom (well, we also would have to show independence between the
numerator and denominator, but this is getting boring already). So, it
follows that
P( t(alpha/2, n-1) <= (Y - n mu) / sqrt( n s^2 / (n-1) ) <=
t(1-alpha/2, n-1) ) = 1-alpha,
where t(alpha/2, n-1) is the (alpha/2)*100-th quantile of a
t-distribution with n-1 degrees of freedom.
Now, just rearrange this into
P( Y + t(alpha/2, n-1) * sqrt( n s^2 / (n-1) ) <= n mu <= Y +
t(1-alpha/2, n-1) * sqrt( n s^2 / (n-1) ) )
and therefore
Y +- t(1-alpha/2, n-1) * sqrt( n s^2 / (n-1) )
provides a (1-alpha)*100% CI for (n mu),
where Y = n X-bar and s^2 is the variance observed in the sample.
m00es
.
- Follow-Ups:
- Re: confidence interval
- From: Thanaset
- Re: confidence interval
- References:
- confidence interval
- From: thanaset
- confidence interval
- Prev by Date: Re: test for trend
- Next by Date: Re: confidence interval
- Previous by thread: Re: confidence interval
- Next by thread: Re: confidence interval
- Index(es):
Relevant Pages
|