PIC

part (a)

First, I want to say that I am using the following defintion of the Gamma function (using β  instead of      λ  ) in the defintion. Since The data given has units of time and are not rate (i.e. 1/time). So I am using this definition of Gamma PDF

|-----------------------|
|f (t) = 1--1-- tα −1e− tβ|
|        βΓ (α )        |
------------------------

Now to answer part (A).

Yes. The following shows the histogram of the data, and a plot of a Gamma distribution with the shape parameter α = 1  and scale parameter β  set to the average of the data.

PIC

Part(b)

Using method of moments.  We need 2 equations since we have to estimate 2 parameters α,λ.  For Gamma

pict

Now from the data itself, calculate the First and Second moments and equate to the above and solve for α, λ   and these will be our estimate. This little code does the above

PIC

PIC

Now using the MLE method. For α

pict

Hence we obtain the 2 equations

pict

From the second equation, set it to zero we obtain

ˆ    -n-ˆα--   αˆ-
λ =  ∑n    =  X¯
        Xi
      i

Substitute the above in the first equation and set to zero we obtain

pict

And solve for αˆ  . Once we find ˆα  we then find also ˆλ =  ˆα¯X-

This code below does the above.

PIC

Part(C)

Now Fit this model again, and compare the MLE fitting to the method of moments fitting

PIC

This plot shows more closely the fitting on top of each others. They are very close so hard to see the difference other than near the high frequency part.

PIC

The fits above both look reasonable.

___________________________________________________________________________________________________________________________

Part(d)

Use bootstrap method.

For the method of moments.

Try for n =  500  be the same size.  Use the method of moments parameters to generate an n  random variables from Gamma distribution. First time use the parameters estimated from the data as shown above.

Now, use the sample generated above to estimate the parameters from it again using also the method of moments. Use these parameters to generate another n  random variables. repeat this process for say N  = 5000  and find the variances of the parameters α,λ  , and hence we find the standard error which is the square root of these variances.

Here is the code to do the above  and the result

(Last minute update), I am getting large result for standard error from the bootstrap method. I think I have something wrong. Here is the result I get and the code

For Method of moments, I get standard error for alpha=918 and for lambda=18

PIC

For MLE I get

Standard error for alpha=1.68697*10^8

Standard error for lambda=60.2585

PIC

Part (e) and (f)

sorry, run out of time.