Statistics 371 Spring 2010
Assignment 4
Due: Thursday July 8
1.
We can think of simulations, (often called Monte Carlo Methods) as applications of
SRS. These methods are often used to evaluate an integral in high dimensions when
the integrand is expensive to compute. The integral correspond to expected values of
quantities of interest in the simulation. Here is a toy example estimating a definite
integral. Suppose we want to evaluate
Af
t
d
t
t
dt
==
−
z
z
()
exp(
.
)
0
1
2
0
1
05
2
π
. This is the
probability that a standard gaussian random variable falls in the interval
(,
so we
know that
A=0.3413
.
Consider the very large frame
Uu
)
01
u
N
=
( ,.
...,
)
1
that is the finite
set of possible values returned by a uniform
random number generator and let
)
y
f u
i
=
( )
i
. Then the population average
y
N
i
U
∑
is very close to the integral. Any
difference is frame error.
a)
Use the code u<runif(100,0,1) to generate a simple random sample of 100 units
from the frame. Calculate f<exp(.5*u*u)/sqrt(2*pi). Hence find an estimate of
A
and the corresponding 95% confidence interval.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Fall '09
 AHMED
 Statistics, Variance, Probability theory, Randomness

Click to edit the document details