- This is part of probstat
Suppose that we take a sample of size
,
from a population which is normally distributed. Also suppose that the population has mean
and variance
. In this section, we assume that we do not know
but we know the variance
. The case we the variance is unknown will be discussed here.
We would like to estimate the mean
. To do so, we compute the sample mean
. It is very certain that
, but we hope that it will be close to
. In this section, we try to quantify how close the sample mean to the real mean. More precisely, we would like to find an error range
such that we have some confidence that
,
i.e., that
lies within
(or in the range
).
Definitions
When computing
, we usually specify the level of confidence
that we want to get.
Two-sided confidence interval. Suppose that we take the sample
of size
and compute
. We say that an interval
is called a
confidence level confidence interval if the probability that the real mean
is in the range
is
. That is,
.
If we know the distribution of
, we can use that to find
for the required confidence level.
As discussed in the the last section, since the population is normal, the random variable
is a normal random variable with mean
and s.d.
, i.e.,
Remarks: When we say that
we mean that a random variable
is normally distributed with mean
and variance
.
Therefore, we have that
is a unit normal random variable. We can then use the standard normal table to find probabilities related to this random variable.
Examples
EX1: If we look at the standard normal table, we can observe that
,
which means that
.
From our definition, we have that the interval
is a confidence interval with 95 percent confidence.
EX2: Suppose that we know that the population has variance
. We compute a mean from a sample of size 10. Find the confidence interval with 90% confidence.
Solutions: Let
be a unit normal random variable. If we look at the standard normal table, we observe that
Consider
. We have that
.
Plugging in all the values, we have that
. Thus, the confidence interval with 90% confidence is
EX3: Consider the previous population. Suppose that we want the error range to be small. More precisely, we want to sample mean to be accurate within 0.1 with 80% confidence level, i.e.,
What is the size of the sample that we have to take?
Solution: We first look at the standard normal table, and find out that, for unit normal variable
,
Set
.
Therefore we want
. This is true when
, i.e.,
.
One-sided confidence intervals
In many cases, we only want the guarantee of the sample mean on the upper bound side or the lower bound side. For example, we want to say that the real mean is not far too large from the sample mean, i.e.,
In this case, we want to compute the one-sided confidence interval using essentially the same approach as in the two-sided case.
EX1: Suppose that we know that the population has variance
. We compute a mean from a sample of size 10. Find the value
such that
is the confidence interval with 80% confidence level that the sample mean is within this interval.
Solutions: Let
be a unit normal random variable. If we look at the standard normal table, we observe that
.
From this, we can say that
.
Thus, the interval that we want is
.
Be careful when using probability related to confidence interval. We can talk about probabilities that the sample mean is close to the actual mean only before we take a sample. After we get the sample and compute the value
, it does not make any sense to talk about probability, because the interval either contains the mean or does not contain the mean. Therefore, at that point, we can only say that the interval has, for example, 90% confidence level.