Unformatted text preview: Homework 12 Due Friday Dec 7 (1) Show that the least squares estimates that minimize are given by and (2) Show that where . Find the Fisher information matrix based on the joint density of the data . Use to find the asymptotic standard error of . How does this compare to the exact formula for the standard error? (4) If the Universe is expanding, as predicted by general relativity, then all galaxies should be receding from us. Furthermore, the velocity with which each galaxy is moving away from us should be proportional to its distance from us. (Think of dots on a balloon and imagine blowing up the balloon.) This leads to Hubble's law: Recession Velocity for some constant . In 1929 Edwin Hubble investigated this relationship by collecting data on 24 galaxies. The data can be obtained from: 1 $ YSVQ!YpQ W $ YS`Q!YXQ1 W 7yxvt r w u s q ! $iYSVQ!YXQhgf" 7ec%d c )a b 7B@"!98 A (3) Suppose that $ 5 $ ' 2" 147 6" " ' !2"$$ " 44%" %" $ ' 12$ " 31" 6" 4 6" !) $ ! 5 " !) ) ' 2" 4%" $ $ $ 1 32" 1%" 0 !) q V$UTSRPIHGECA ' QF D ('&%$#"! http://lib.stat.cmu.edu/DASL/Datafiles/Hubble.html The variables are distance (in megaparsecs = 3.26 light years) and velocity (in km/sec). (4a) Do a linear regression of velocity on distance. Get , , their standard errors and 95 per cent confidence intervals for and . First, write your own R program using the formulas we derived in class. Then compare your answers to the builtin R programs. Here is how to use the builtin routines: data < scan("hubble.dat") ### get data and put it in a matr data < matrix(data,ncol=2,byrow=T) distance < data[,1] velocity < data[,2] plot(distance,velocity) out < lm(velocity ~ distance) ### do the linear regression abline(out) ### add regression line to the pl names(out) temp < summary(out) print(temp) names(temp) sigma.hat < temp$sigma ### get sigma.hat ### plot the residuals (standardized to have st. dev 1) ### These should look roughly like random N(0,1) numbers residuals < residuals(out) plot(distance,residuals/sigma.hat,ylim=c(4,4)) beta0.hat < out$coeff[1] beta1.hat < out$coeff[2] var.covar < sigma.hat^2*temp$cov ### this is how to extract the ### variancecovariance matrix Note: The age of the universe, in billions of years, is . With your estimate of this would make the Universe 2 billion years old, which is far too small. Even the Earth is older than 2 billion years. Thus, people were skepical about Hubble's value for . However, Hubble made some errors in calibrating distances. Correcting for these errors has led to a new estimates of around 65 suggesting that the age of the Universe is 15 billion years. (4b) Hubble's law says that where and . This implies that there should be no intercept in the model. Is your fit consistent with this, i.e. does your confidence interval for include 0? 2 q I U q q !) ) ! 4 2 !B84 q q (4c) We can force the regression line to omit the intercept. This is called "regression through the origin." The model is: Derive the least squares estimate for this model and its standard error. (4d) Fit the Hubble data to the regressionthroughtheorigin model. Get the estimate, standard error and fitted value. First use your formulas. The use the R builtin functions. To get R to fit this the model, you have to do this: D < matrix(distance,ncol=1) junk < lm.fit(x=D,y=velocity) beta1.hat < junk$coef plot(distance,velocity) abline(a=0,b=beta1.hat) !) 35B "! A
3 ...
View
Full
Document
This note was uploaded on 05/25/2008 for the course STAT 36625 taught by Professor Larrywasserman during the Fall '01 term at Carnegie Mellon.
 Fall '01
 LarryWasserman
 Least Squares, Standard Error

Click to edit the document details