In: Statistics and Probability
Use R studio
A certain golf club manufacturer advertises that its new driver (the club you use to hit golf balls off the tee) will increase the distance that golfers achieve relative to their current driver. We decide to test this claim by having 15 golfers hit a drive using the new driver, and then hit one using their current driver. Here are the data for 15 people, with yardages using both clubs:
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
|
New |
247 |
259 |
248 |
275 |
282 |
307 |
288 |
215 |
221 |
260 |
292 |
198 |
240 |
304 |
295 |
Current |
240 |
254 |
238 |
268 |
275 |
301 |
292 |
197 |
203 |
262 |
281 |
189 |
225 |
297 |
274 |
a) Show a side-by-side boxplot of the driving distances for the current and new drivers as well as the difference between new and current drivers (a total of three boxplots, side-by-side. Conduct a paired t-test to test whether the new driver produces longer drives, on average, when compared to the current driver using .05 as the probability of a Type 1 error. State your hypotheses, and be sure to check the conditions for your test. State the P-value of your test. (Use R studio - and show commands and output for using R.)
b) By using a 95% confidence interval, estimate the true difference in length produced by the new driver relative to the current one, and explain what this confidence interval means in context of this problem. (Use R studio - and show commands and output for using R.)
We will sove it using R
a) Show a side-by-side boxplot of the driving distances for the current and new drivers as well as the difference between new and current drivers (a total of three boxplots, side-by-side.
New=c(247 ,259 ,248 ,275 ,282 ,307 ,288 ,215 ,221 ,260
,292 ,198 ,240 ,304 ,295)
Current=c(240 ,254 ,238 ,268 ,275 ,301 ,292 ,197 ,203 ,262 ,281
,189 ,225 ,297 ,274)
difference=New-Current
d=data.frame(Current,New,difference)
boxplot(d)
# it will give you the boxplot
Conduct a paired t-test to test whether the new
driver produces longer drives, on average, when compared to the
current driver using .05 as the probability of a Type 1 error
State your hypotheses
Ho:
Normality assumption
> qqnorm(Current)
> qqline(Current)
> qqnorm(New)
> qqline(New)
so for Current and New using Q-Q plot we can conclude that data follows normality assumption.
so let's perform paired t-test.
> t.test(New,Current, paired = TRUE, alternative = "greater")
Paired t-test
data: New and Current
t = 5.0088, df = 14, p-value = 9.568e-05
alternative hypothesis: true difference in means is greater than
0
95 percent confidence interval:
5.835238 Inf
sample estimates:
mean of the differences
9
P-value = 9.568e-05
Conclusion : since p-value =9.568e-05 < 0.05 level of significance so we reject the null hypothesis and conclude that the new driver produces longer drives, on average, when compared to the current driver using .05 as the probability of a Type 1 error.
b)
By using a 95% confidence interval, estimate the true difference in length produced by the new driver relative to the current one, and explain what this confidence interval means in context of this problem.
R-code for 95% confidence interval
> tc=-qt(0.05,14)
> lower=mean(difference)-tc*(sd(difference)/sqrt(15))
> lower
[1] 5.835238
> upper=mean(difference)+tc*(sd(difference)/sqrt(15))
> upper
[1] 12.16476
so 95% confidence interval is (5.835238,12.16476)
estimate the true difference in length produced by the new driver relative to the current one
> length=upper-lower
> length
[1] 6.329524
so the true difference in length produced by the new driver relative to the current one is 6.329524
It can be concluded that we are 95% confident that mean difference between New & Current drive lies between (5.835238,12.16476)