Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. A researcher wants to know the relationship between a person\'s caffeine cons

ID: 3311471 • Letter: 2

Question

2. A researcher wants to know the relationship between a person's caffeine consumption and his/her reaction time (as measured using an interative computer program) Here are the data for n7 subjects (20 pts total) Subject mg Caffiene z-score (x) Initialsper dayxVS Reaction Time z-scorely) msec,y(-s 95 115 210 50 155 180 100 -0.62 -0.26 1.46 DW RE HL JK LT PL 0.93 1.20 1.42 -0.15 0.90 0.64 45 95 that 0.47 0.92 -0.53 85 80 a) Find the correlation coefficient, r, for these data. 5 pts b) Test the null hypothesis of no correlation between caffeine consumption and reaction time. Express Ho in terms of the correlation coefficient. (Use a 2-sided test, =.05) 5 pts c) The slope of the regression line, b between caffeine consumption and reaction time is: (check one) 2 pts Positive NegativeExactly equal to zero d) What proportion of the variance of y is explained by fitting a regression line to these data ? 5 pts e) Suppose a regression line is fitted to these data. (-bo+ byx) What would be the result oftesting the hypothesis: Ho: (Accept or reject; use.05) 3 pts

Explanation / Answer

The all computational of this question is done R-s software and code is as follows

Step: 1 Inter the data in vector form

> Caffiene<-c(95,115,210,50,155,180,100)
> Reaction_time<-c(50,45,95,65,85,80,55)

(a)

Step 2: calculate the Pearson correlation coefficient between caffeine and reaction time is as follows

> cor(Caffiene,Reaction_time,method = c("pearson"))
[1] 0.7566226

hence the corrrelation coefficient between theam is 0.7566 i.e. 75.66% correlation exist.

Step 3: test the significance of the correlation between under this test the null hypothesis is there is no correlation exist.

> cor.test(Caffiene,Reaction_time,method = c("pearson"))

Pearson's product-moment correlation

data: Caffiene and Reaction_time
t = 2.5875, df = 5, p-value = 0.04898
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
0.00828535 0.96171436
sample estimates:
cor
0.7566226

The calculated p- value is 0.04898 which is less than 0.05 it means that null hypothesis is rejected so we say that the correlation is significantly different from zero.

(c)

fit the regression line and Caffeine consider as independent variable and reaction time as the dependent variable and the regression line is as

Reaction time= a + b* Caffeine

> lm(Reaction_time~Caffiene)

Call:
lm(formula = Reaction_time ~ Caffiene)

Coefficients:
(Intercept) Caffiene  
33.9689 0.2621  

hence the value of b is 0.2621 which is a positive quantity.

(d)

In the question find the value of R2 and its value explained up to what percentage the dependent variable explained by the independent variable.

> summary(lm(Reaction_time~Caffiene))

Call:
lm(formula = Reaction_time ~ Caffiene)

Residuals:
1 2 3 4 5 6 7
-8.870 -19.113 5.986 17.925 10.403 -1.150 -5.181

Coefficients:
Estimate Std. Error t value Pr(>|t|)  
(Intercept) 33.9689 14.0823 2.412 0.0607 .
Caffiene 0.2621 0.1013 2.588 0.0490 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 13.69 on 5 degrees of freedom
Multiple R-squared: 0.5725, Adjusted R-squared: 0.487
F-statistic: 6.695 on 1 and 5 DF, p-value: 0.04898

Hence only 57.25% variation explaine by indepenedent variable.

(e)

in this question, we performed the test on the coefficient of the regression model. here we test whether the slope is significant or not significant.

Coefficients:
Estimate Std. Error t value Pr(>|t|)  
(Intercept) 33.9689 14.0823 2.412 0.0607 .
Caffiene 0.2621 0.1013 2.588 0.0490 *

the slope of the regression line is significant at 0.05 but it is insignificant at 0.01 level of significance on the basis of the calculated p-value.