7.3Interval Estimates 251
Now, the values of independent uniform (0, 1) random variables can be approximated on
a computer (by so-calledpseudo random numbers); if we generate a vector ofrof them,
and evaluatefat this vector, then the value obtained, call itX 1 , will be a random variable
with meanθ. If we now repeat this process, then we obtain another value, call itX 2 ,
which will have the same distribution asX 1. Continuing on, we can generate a sequence
X 1 ,X 2 ,...,Xnof independent and identically distributed random variables with meanθ;
we then use their observed values to estimateθ. This method of approximating integrals
is calledMonte Carlo simulation.
For instance, suppose we wanted to estimate the one-dimensional integral
θ=
∫ 1
0
√
1 −y^2 dy=E[
√
1 −U^2 ]
whereUis a uniform (0, 1) random variable. To do so, letU 1 ,...,U 100 be independent
uniform (0, 1) random variables, and set
Xi=
√
1 −Ui^2 , i=1,..., 100
In this way, we have generated a sample of 100 random variables having meanθ. Suppose
that the computer generated values ofU 1 ,...,U 100 , resulting inX 1 ,...,X 100 having
sample mean .786 and sample standard deviation .03. Consequently, sincet.025,99 =
1.985, it follows that a 95 percent confidence interval forθwould be given by
.786±1.985(.003)
As a result, we could assert, with 95 percent confidence, thatθ(which can be shown to
equalπ/4) is between .780 and .792. ■
7.3.2 Confidence Intervals for the Variance of a
Normal Distribution
IfX 1 ,...,Xnis a sample from a normal distribution having unknown parametersμand
σ^2 , then we can construct a confidence interval forσ^2 by using the fact that
(n−1)
S^2
σ^2
∼χn^2 − 1
Hence,
P
{
χ 12 −α/2,n− 1 ≤(n−1)
S^2
σ^2
≤χα^2 /2,n− 1
}
= 1 −α
or, equivalently,
P
{
(n−1)S^2
χα^2 /2,n− 1
≤σ^2 ≤
(n−1)S^2
χ 12 −α/2,n− 1
}
= 1 −α