In: Statistics and Probability
For this question you must give all answers rounded correct to exactly 3 significant figures (instead of decimal places). Recall that leading zeros are not significant (for example 0.0011 has 4 decimal places, but only 2 significant figures). To obtain more decimal places in the numbers Matlab gives you, type "format short g" first.
The article "The Incorporation of Uranium and Silver by Hydrothermally Synthesized Galena'" (Econ. Geology, 1964: 1003-1024) reports on the determination of silver content of galena crystals grown in a closed hydrothermal system over a range of temperature. The temperature X in degrees C and the silver content Y in mol% for 60 determinations are shown below.
x=[449.91 519.39 569.38 465.53 531.74 397.63 506.26 540.71 448.36 572.70 550.57 378.06 559.48 508.58 369.15 457.83 507.73 543.87 442.33 367.06 575.48 498.97 496.75 372.36 560.20 397.29 591.78 458.89 456.15 484.81 482.09 588.67 578.35 479.79 575.86 420.38 359.95 381.27 545.21 531.08 410.13 462.39 406.06 397.02 476.99 512.79 440.54 366.01 434.86 505.33 519.36 471.37 507.21 537.76 565.59 350.85 350.28 499.35 358.48 568.17]
y=[0.38840 0.71570 0.24052 0.40947 0.48155 0.22107 0.40099 0.64632 0.26808 0.43128 0.36693 0.14536 0.44205 0.51009 -0.17493 0.58739 0.47232 0.13326 0.44586 0.39906 0.41216 0.39967 0.42589 0.12191 0.26051 0.17554 0.73405 0.11417 0.47537 0.33147 0.33647 0.38301 0.26566 0.34267 0.63062 0.26721 0.05650 0.34699 0.53572 0.25349 0.53050 0.31492 0.28622 0.28847 0.44652 0.46920 0.02538 0.20316 0.46319 0.25887 0.58665 0.19936 0.37954 0.49253 0.53430 0.14816 0.25279 0.39067 0.56482 0.57233]
(a) Fit the linear regression of Y on X using Matlab. What is the estimated intercept term β^0?
(b) What is the estimated slope of the fitted line, β^1?
(c) What is the estimated residual variance s2e?
(d) What is the standard error for β^1?
(e) Give a 95% confidence interval for β^1.
(f) What is the predicted silver content of galena crystals grown at 500 degrees C?
(g) Construct a 95% prediction interval for silver content when crystals are grown at 500 degrees C.
x<-c(449.91,519.39,569.38,465.53,531.74,397.63,506.26,540.71,448.36,572.70,550.57,378.06,559.48,
508.58,369.15,457.83,507.73,543.87,442.33,367.06,575.48,498.97,496.75,372.36,560.20,397.29,
591.78,458.89,456.15,484.81,482.09,588.67,578.35,479.79,575.86,420.38,359.95,381.27,545.21,
531.08,410.13,462.39,406.06,397.02,476.99,512.79,440.54,366.01,434.86,505.33,519.36,471.37,
507.21,537.76,565.59,350.85,350.28,499.35,358.48,568.17)
y<-c(0.38840,0.71570,0.24052,0.40947,0.48155,0.22107,0.40099,0.64632,0.26808,0.43128,0.36693,
0.14536,0.44205,0.51009,-0.17493,0.58739,0.47232,0.13326,0.44586,0.39906,0.41216,0.39967,
0.42589,0.12191,0.26051,0.17554,0.73405,0.11417,0.47537,0.33147,0.33647,0.38301,0.26566,
0.34267,0.63062,0.26721,0.05650,0.34699,0.53572,0.25349,0.53050,0.31492,0.28622,0.28847,
0.44652,0.46920,0.02538,0.20316,0.46319,0.25887,0.58665,0.19936,0.37954,0.49253,0.53430,
0.14816,0.25279,0.39067,0.56482,0.57233)
df<-data.frame(x,y)
mod<-lm(y~x,data=df)
mod
summary(mod)
(a) Fit the linear regression of Y on X using Matlab. What is the estimated intercept term β^0?
Intercept = -0.205157
(b) What is the estimated slope of the fitted line, β^1?
Slope of Beta_1= 0.001190
(c) What is the estimated residual variance s2e?
Se^2=(0.1534)^2=0.02353156
(d) What is the standard error for β^1?
Std error= 0.000277
(e) Give a 95% confidence interval for β^1.
> newx<- data.frame( x = c(500))
> predict(mod, newdata = newx, interval = "confidence",level =
0.95)
fit lwr upr
1 0.3899983 0.3484743 0.4315223
Fit is the value at x= 500 and lwr and upr are 95% confidence interval.
95% confidence interval =
( 0.3485, 0.4315)