11.01.2015 Views

Method of Moments

Method of Moments

Method of Moments

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Introduction to the Science <strong>of</strong> Statistics<br />

The <strong>Method</strong> <strong>of</strong> <strong>Moments</strong><br />

To investigate the method <strong>of</strong> moments on simulated data using R, we consider 1000 repetitions <strong>of</strong> 100 independent<br />

observations <strong>of</strong> a (0.23, 5.35) random variable.<br />

> xbar x2bar for (i in 1:1000){x mean(betahat)<br />

[1] 6.315644<br />

> sd(betahat)<br />

[1] 2.203887<br />

To obtain a sense <strong>of</strong> the distribution <strong>of</strong> the estimators ˆ↵ and ˆ, we give histograms.<br />

> hist(alphahat,probability=TRUE)<br />

> hist(betahat,probability=TRUE)<br />

Histogram <strong>of</strong> alphahat<br />

Histogram <strong>of</strong> betahat<br />

Density<br />

0 1 2 3 4 5 6<br />

Density<br />

0.00 0.05 0.10 0.15<br />

0.1 0.2 0.3 0.4 0.5<br />

alphahat<br />

0 5 10 15<br />

betahat<br />

As we see, the variance in the estimate <strong>of</strong> is quite large. We will revisit this example using maximum likelihood<br />

estimation in the hopes <strong>of</strong> reducing this variance. The use <strong>of</strong> the delta method is more difficult in this case because<br />

it must take into account the correlation between ¯X and X 2 for independent gamma random variables. Indeed, from<br />

the simulation, we have an estimate.<br />

> cor(xbar,x2bar)<br />

[1] 0.8120864<br />

Moreover, the two estimators ˆ↵ and ˆ are fairly strongly positively correlated. Again, we can estimate this from the<br />

simulation.<br />

> cor(alphahat,betahat)<br />

[1] 0.7606326<br />

In particular, an estimate <strong>of</strong> ˆ↵ and ˆ are likely to be overestimates or underestimates in tandem.<br />

202

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!