Theory:
R-commands and outputs:
x=c(-4,-4,-1,-5,-4,-4,0,-1,-3,-1,0,1,-1,0,-1,4,3,4,-1,7)
y=c(-12,-8,-7,-7,-5,-5,-3,-2,-2,-1,-1,-1,0,3,4,4,6,6,8,10)
summary(x)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-5.00 -3.25 -1.00 -0.55 0.25 7.00
summary(y)
Min. 1st Qu. Median Mean 3rd Qu. Max.
-12.00 -5.00 -1.00 -0.65 4.00 10.00
sd(x)
[1] 3.153528
sd(y)
[1] 5.824404
fit=lm(y~x)
fit
Call:
lm(formula = y ~ x)
Coefficients:
(Intercept) x
0.1617 1.4758
summary(fit)
Call:
lm(formula = y ~ x)
Residuals:
Min 1Q Median 3Q Max
-6.2585 -2.1133 0.0762 1.3383 9.3141
Coefficients:
Estimate Std. Error t value Pr(|t|)
(Intercept) 0.1617 0.8173 0.198 0.845
x 1.4758 0.2618 5.638 2.38e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 3.598 on 18 degrees of
freedom
Multiple R-squared: 0.6385, Adjusted R-squared: 0.6184
F-statistic: 31.79 on 1 and 18 DF, p-value: 2.385e-05
aov(fit)
Call:
aov(formula = fit)
Terms:
x Residuals
Sum of Squares 411.5233 233.0267
Deg. of Freedom 1 18
Residual standard error: 3.598045
Estimated effects may be unbalanced
# Some requirements to find
intervals:
n=20
beta0=as.numeric(fit$coefficients[1])
beta0
[1] 0.161683
beta1=as.numeric(fit$coefficients[2])
beta1
[1] 1.475787
xbar=mean(x)
xbar
[1] -0.55
Sxx=sum((x-xbar)^2)
Sxx
[1] 188.95
sig=summary(fit)$sigma
MSRes=sig^2
MSRes
[1] 12.94593
alpha=0.05
tabt=qt(1-alpha/2,df=n-2)
tabt
[1] 2.100922
#(a)
# Find a 95 % interval to predict the average final score of all
golfers who shoot a 0 on the first round at the
Masters.
x0=0
muyx0=beta0+beta1*x0
muyx0
[1] 0.161683
(1/n)+((x0-xbar)^2/Sxx)
[1] 0.05160095
MSRes*((1/n)+((x0-xbar)^2/Sxx))
[1] 0.6680223
sqrt(MSRes*((1/n)+((x0-xbar)^2/Sxx)))
[1] 0.8173263
muyx0-tabt*sqrt(MSRes*((1/n)+((x0-xbar)^2/Sxx)))
[1] -1.555456
muyx0+tabt*sqrt(MSRes*((1/n)+((x0-xbar)^2/Sxx)))
[1] 1.878822
##Required 95% prediction Interval is [-1.555456,
1.878822]
#(b)
# Find a 95 % interval to predict the final score of a
golfer who shoot a -5 in the first round at the
Masters.
x0=-5
y0hat=beta0+beta1*x0
y0hat
[1] -7.217253
1+(1/n)+((x0-xbar)^2/Sxx)
[1] 1.154803
MSRes*(1+(1/n)+((x0-xbar)^2/Sxx))
[1] 14.95
sqrt(MSRes*(1+(1/n)+((x0-xbar)^2/Sxx)))
[1] 3.866522
y0hat-tabt*sqrt(MSRes*(1+(1/n)+((x0-xbar)^2/Sxx)))
[1] -15.34052
y0hat+tabt*sqrt(MSRes*(1+(1/n)+((x0-xbar)^2/Sxx)))
[1] 0.9060091
##Required 95% prediction Interval is [-15.34052,
0.9060091]
#(c)
# Find a 95 % interval to predict the average final score of all
golfers who shoot a +3 in the first round at the
Masters.
x0=3
muyx0=beta0+beta1*x0
muyx0
[1] 4.589045
(1/n)+((x0-xbar)^2/Sxx)
[1] 0.1166975
MSRes*((1/n)+((x0-xbar)^2/Sxx))
[1] 1.510758
sqrt(MSRes*((1/n)+((x0-xbar)^2/Sxx)))
[1] 1.229129
muyx0-tabt*sqrt(MSRes*((1/n)+((x0-xbar)^2/Sxx)))
[1] 2.006741
muyx0+tabt*sqrt(MSRes*((1/n)+((x0-xbar)^2/Sxx)))
[1] 7.171349
##Required 95% prediction Interval is [2.006741,
7.171349]
9.72 G olf Scores In a professional golf tournament (c) Find a 95% interval to predict the average final e players participate in four rounds of golf and the player with the lowest score after all fo...
Scores in the first and fourth (final) rounds for a sample of 20 golfers who competed in golf tournaments are shown in the following table. Player First Round Final Round Golfer 1 70 72 Golfer 2 71 72 Golfer 3 70 74 Golfer 4 72 71 Golfer 5 70 69 Golfer 6 67 67 Golfer 7 71 68 Golfer 8 68 73 Golfer 9 67 73 Golfer 10 70 69 Player First Round Final Round Golfer 11 72 72 Golfer...
Scores in the first and fourth (final) rounds for a sample of 20 golfers who competed in golf tournaments are shown in the following table First Final Round Round First Final Round Round Player Golfer 1 Golfer 2 Golfer 3 Golfer 4 Golfer 5 Golfer 6 Golfer 7 Golfer 8 Golfer 9 Golfer 1070 Playe Golfer 11 Golfer 12 72 Golfer 13 70 Golfer 14 Golfer 15 68 Golfer 16 68 Golfer 17 71 Golfer 18 Golfer 19 69 Golfer...
Scores in the first and fourth (final) rounds for sample of 20 golfers who competed in golf tournaments are shown in the following table. First Final Player Round Golfer 1 Golfer 2 Golfer 3 Golfer 4 Golfer 5 Golfer 6 Golfer 7 Golfer 8 Golfer 9 Golfer 10 Round Player Round Round 70 72 Golfer 11 Golfer 12 Golfer 13 Golfer 14 Golfer 15 Golfer 166 Golfer 17 71 Golfer 18 Golfer 19 Golfer 20 67 72 72 72 70...
You may need to use the appropriate technology to answer this question. Scores in the first and fourth (final) rounds for a sample of 20 golfers who competed in golf tournaments are shown in the following table. Player First Round Final Round Golfer 1 70 72 Golfer 2 71 72 Golfer 3 70 73 Golfer 4 72 71 Golfer 5 70 69 Golfer 6 67 67 Golfer 7 71 68 Golfer 8 68 73 Golfer 9 67 73 Golfer 10...