Assignment #5 STAT 992 Spring 2015 Complete the following problems below. Within each part, include your R program output with code inside of it and any additional information needed to explain your answer. Your R code and output should be formatted in the exact same manner as in the lecture notes. 1) (19 total points) The Rayleigh distribution is often used to help model wind speed (Celik, Energy Conversion and Management, 2004, p. 1735-1747). Let X be a random variable denoting the average wind speed during a February day in Lincoln, where X has a Rayleigh distribution defined as 1 21( x/ )2 xe f(x) 2 0 for x 0 for x 0 where > 0. The data file wind_speed.csv contains the observed daily average wind speed values for 2000 – 2004 in Lincoln during each February. Assume that each observation is independent (the autocorrelations are all nonsignificant, except for the first autocorrelation in 2002). a) Perform the derivations below without using a computer! All answers should be given in terms of symbols rather than numerical values that use the observed data. i) (2 points) Derive the maximum likelihood estimator of . ii) (1 point) Derive the method of moment estimator for . Note that E(X) = / 2 . iii) (2 points) Through using the asymptotic normality of maximum likelihood estimators, find the estimated asymptotic variance of the maximum likelihood estimator. Note that E(X) = 22. b) (2 points) Find the numerical values for the method of moment estimate, the maximum likelihood estimate, and the estimated asymptotic variance. c) (2 points) Plot the log-likelihood function and first derivative of the log-likelihood function. Include a line on each plot that shows the location of the maximum likelihood estimate relative to the function. d) The purpose of this problem to calculate some of the derivatives in part a) numerically using fderiv() of the pracma package with the function’s defaults. i) (3 points) Find the first derivative of the log-likelihood function using fderiv(). Evaluate this numerical derivative at equal to 7, the maximum likelihood estimate, and 8. Compare these values with the actual values produced by the results in part b). ii) (3 points) Find the second derivative of the log-likelihood function using fderiv(). Evaluate this numerical derivative at the maximum likelihood estimate and then use it to compute the estimated asymptotic variance of the maximum likelihood estimator. Compare the estimated variance to that produced by the results in part b). e) (4 points) Through using optim() (method = "BFGS") with the data, find the maximum likelihood estimate for and the corresponding estimated asymptotic variance. Verify your answers match the results given in part b). Use the method of moment estimate as the initial value for . 1 2) (9 total points) Continuing 1), the Rayleigh distribution is a special case of the Weibull distribution. One representation of the Weibull PDF is 1 x x f(x) e 0 for x 0 for x 0 where > 0 and > 0. Note that when = 2 and 2 , the Weibull simplifies to the Rayleigh distribution. Complete the following. a) (3 points) Find the method of moment estimates for and using the data. Note that 2 2 1 2 2 2 E(X) (1 1/ ) , E(X ) (1 2 / ) , and Var(X) 1 1 . Show all derivations. b) (3 points) Find the maximum likelihood estimates for and using optim() and the observed data. State the estimated covariance matrix. c) (3 points) Construct contour and 3D plots of the log-likelihood function with the maximum likelihood estimates plotted at their appropriate locations. 3) (3 points) Continuing 1) and 2), construct histograms and EDF plots of the data to examine whether a Rayleigh and/or Weibull distribution work well for the data set. Comment on which distribution is better. 2