Suppose I have the data set below: Solve for the following using R: (a) Find a 9
ID: 3300283 • Letter: S
Question
Suppose I have the data set below:
Solve for the following using R:
(a) Find a 95% confidence interval for average output when wind speed is 3.2.
(b) Suppose the wind speed at a particular wind mill is 9.05. Find an interval in which you’re 95% sure the output of this wind mill will be.
output speed 0.123 2.45 0.5 2.7 0.653 2.9 0.558 3.05 1.057 3.4 1.137 3.6 1.144 3.95 1.194 4.1 1.562 4.6 1.582 5 1.501 5.45 1.737 5.8 1.822 6.00 1.866 6.2 1.930 6.35 1.800 7 2.088 7.4 2.179 7.85 2.166 8.15 2.112 8.80 2.303 9.1 2.294 9.55 2.386 9.7 2.236 9.7 2.310 10.20Explanation / Answer
speed <- c(2.45,2.7,2.9,3.05,3.4,3.6,3.95,4.1,4.6,5,5.45,5.8,6,6.2,6.35,7,7.4,7.85,8.15,8.8,9.1,9.55,9.7,9.7,10.2 )
output <- c(0.123,0.5,0.653,0.558,1.057,1.137,1.144,1.194,1.562,1.582,1.501,1.737,1.822,1.866,1.93,1.8,2.088,2.179,2.166,2.112,2.303,2.294,2.386,2.236,2.31 )
model <- lm (output ~ speed)
> summary(model)
Call:
lm(formula = output ~ speed)
Residuals:
Min 1Q Median 3Q Max
-0.59307 -0.15069 0.06216 0.16676 0.32247
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.11958 0.12458 0.96 0.347
speed 0.24347 0.01889 12.89 5.22e-12 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.2323 on 23 degrees of freedom
Multiple R-squared: 0.8784, Adjusted R-squared: 0.8731
F-statistic: 166.2 on 1 and 23 DF, p-value: 5.224e-12
a)
> new.dat <- data.frame(speed=3.2)
> predict(model, newdata = new.dat, interval = 'confidence')
fit lwr upr
1 0.898674 0.7494945 1.047853
hence
lower limit is 0.7494945
upper limit is 1.047853
b)
new.dat <- data.frame(speed=9.05)
> predict(model, newdata = new.dat, interval = 'confidence')
fit lwr upr
1 2.322961 2.173482 2.472439
interval is (2.173482,2.47439)
Please rate
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.