# Math 542D: Test 1

Math 542D: Test 1 (Part II: Take-home)
October 31, 2019
Due Date:At 6:30AM on Saturday, November 1st, 2019. No late submission will
be accepted. Please comment on each question.
10 Give an efficient algorithm to simulate the value of a random variable X such
that
P(X = 1) = 0:3; P(X = 2) = :2; P(X = 3) = :4; P(X = 4) = 0:1
1. (10) When you generate the Q-Q plot of N(µ1; σ12) and N(µ2; σ22) for some
arbitrary µi and σi, you will always get a straight line. Prove this fact by
determining the equation of the line.
2. (10) If X ∼ N(0; 1), the c.d.f. of X is given by
Φ(x) = p12π Z-1 x exp -2z2 dz:
It can be shown that
Φ-1(x) ≈ t – a0 + a1t
1 + b1t + b2t2
for constants a0 = 2:30753; a1 = 0:27061; b1 = 0:99229; b2 = 0:04481 (t2 =
-2 log x). Write a function that generate the standard normal random numbers using the integral transform method. Is your random number generator
sufficiently good enough?
3. (10) Estimate p = P(X12 + X22 ≥ 5) where Xi are iid N(0; 1) using simple
Monte-Carlo integration technique.
4. (15) Cauchy distribution is defined as g(x) = π(1+1 x2), x 2 R. Write a function that generate Cauchy random numbers. Then, using the Cauchy random
number generator, write a function that produce the standard normal random
numbers using the accept-reject method. Compare the performance of the two
standard normal random number generators using the Q-Q plot.
5. (15) Estimate the above probability using importance sampling method. Show
your importance sampling method gives a better performance compared to the
simple Monte-Carlo integration technique.
6. (15) Plot the power curves for the t-test in Example 6.9 for sample sizes 10,
20, 30, 40, and 50, but omit the standard error bars. Plot the curves on the
same graph, each in a different color or different line type, and include a legend.
Comment in the relation between the power and sample size.
7. (15) Using strength:data, test if the population variance of arm strength is
σ2 = 202 at α = 0:1 based on Monte-Carlo simulation. Do not assume any
parametric model. Estimate the 90% confidence interval for σ2 based on the
simulation.
2