ISyE 6644 — Fall 2014

Transcription

ISyE 6644 — Fall 2014
1
ISyE 6644 — Fall 2014
Homework #6 — Due Tues., Nov. 4
1. Let’s look at a first-order autoregressive process [AR(1)], which is often used to
model a process that’s correlated through time, e.g., the unemployment rate. Suppose the first observation X0 ∼ Nor(0, 1). Now let
Xi = φXi−1 + i ,
for i = 1, 2, . . .,
where −1 < φ < 1 and where 1 , 2 , . . . are i.i.d. Nor(0, 1 − φ2 ) and independent of
X0 .
(a) What is the distribution of Xi ?
(b) Find Cov(X0 , X1 ), Cov(Xi , Xi+1 ), and Cov(Xi , Xj ).
(c) Generate and plot 500 AR(1) observations for the following cases:
i. φ = 0.0.
ii. φ = 0.9.
iii. φ = −0.9.
2. Now let’s study an autoregressive moving average process of orders 1 and 1, denoted
as ARMA(1,1). This process has the form
Xi = φXi−1 + i + θi−1 ,
for i = 1, 2, . . .,
where 1 , 2 , . . . are i.i.d. normal with mean zero. Play around this model for various
φ and θ values and report on what you find.
3. Here is a method to generate two Exponentials with approximate correlation ρ.
(a) Generate two i.i.d. standard normal variates Z1 , Z2 .
(b) Make an appropriate transformation (either via the Cholesky method or simply by an almost-trivial linear combination) to obtain X1 , X2 that are bivariate
normal with mean 0, variance 1, and correlation ρ.
(c) Plug each of the two Xi ’s into the standard normal c.d.f. to obtain two
Unif(0,1) random variables, hopefully with correlation ≈ ρ, i.e., U1? = Φ(X1 )
and U2? = Φ(X2 ).
2
(d) Now generate your correlated Exponentials via inverse transform, i.e., Y1 =
− λ1 `n(U1? ) and Y2 = − λ1 `n(U2? ).
(e) Demonstrate your technique for λ = 1 and ρ = 0.9 by simulating such pairs
1000 times. Plot (Y1 , Y2 ) and provide the sample correlation. It “should” be
pretty close to ρ.
4. (sort of from BCNN) Suppose that the arrival process of hits to a web site is a nonhomogeneous Poisson process with rate λ(t) = 50 + 50 sin(2πt/24) hits per hour.
Derive a thinning algorithm for generating arrivals from this NHPP. Demonstrate
by plotting an hourly time series of hits for a one-week period (168 hours).
5. Let’s see if the central limit theorem works. In your favorite language (maybe
even Excel), generate 10000 Unif(0,1)’s and make a histogram of the observed
p.d.f. (Yes, it should look pretty uniform.) Now generate 10000 realizations of
Y (2) = (U1 + U2 )/2 and make a histogram — this should look triangular. Do the
same thing for Y (3) = (U1 + U2 + U3 )/3, Y (4), and Y (12), where I’m using the
obvious notation. By the time you get to Y (12), things should be looking normal.
6. Simulate Brownian motion W(t) on t ∈ [0, 1].
(a) Plot one realization for t = 0, 0.01, 0.02, . . . , 1.
2
(b) Suppose a stock price can be modelled as S(t) = 10 exp{(µ − σ2 )t − σW(t)}.
Plot S(t) for the realization in Part (a). You can use µ = 0.2 and σ 2 = 0.1.
(c) Consider an option to buy this stock at K = 10.50 at time T = 1. What is
the value of the option? To answer this question, run multiple replications of
the simulation to estimate E[max{0, S(T ) − K}].
7. A Brownian bridge B(t) is a Brownian motion process that’s conditioned to equal
0 at times t = 0 and 1. (It sort of looks like a bridge.) It turns out that it can be
written as B(t) = W(t) − tW(1).
(a) Find B(0) and B(1).
(b) Find Cov(B(s), B(t)) for 0 < s < t < 1.
(c) Find the distribution of
R1
0
B(t) dt.
3
8. Pick any three Arena problems from Chapter 7 of the Kelton, Sadowski, and
Swets text. (Don’t worry about doing batch-means-based output analysis, since we
haven’t learned that yet.)