In a study of caffeine and stress, college students indicate how many cups of coffee they drink per day and their stress level on a scale of 1 to 10. The date follow:
Number of Cups of Coffee 3,2,4,6,5,1,7,3
Stress Level 5,3,3,9,4,2,10,5
Calculate a Pearsons r to determine the type and strength of the relationship between caffeine and stress level.
Determine the regression equation for this correlation coefficient.
r = .8519
yhat = 0.411 + 1.216x
To calculate Pearson's r, we need to follow a few steps:
Step 1: Enter the data into a table:
Number of Cups of Coffee (X): 3, 2, 4, 6, 5, 1, 7, 3
Stress Level (Y): 5, 3, 3, 9, 4, 2, 10, 5
Step 2: Calculate the mean (average) of X and Y.
Mean of X (x̄) = (3 + 2 + 4 + 6 + 5 + 1 + 7 + 3) / 8 = 4
Mean of Y (ȳ) = (5 + 3 + 3 + 9 + 4 + 2 + 10 + 5) / 8 = 5.625
Step 3: Calculate the deviation of each X and Y value from their respective means.
Deviation of X (x - x̄): -1, -2, 0, 2, 1, -3, 3, -1
Deviation of Y (y - ȳ): -0.625, -2.625, -2.625, 3.375, -1.625, -3.625, 4.375, -0.625
Step 4: Calculate the squared deviation of each X and Y value.
Squared deviation of X ((x - x̄)^2): 1, 4, 0, 4, 1, 9, 9, 1
Squared deviation of Y ((y - ȳ)^2): 0.390625, 6.890625, 6.890625, 11.390625, 2.640625, 13.140625, 19.140625, 0.390625
Step 5: Calculate the product of the deviation of each X and Y value.
Product of deviations of X and Y: -0, 5.25, 0, 6.75, -1.625, 10.875, 13.125, 0.625
Step 6: Sum all the values calculated in steps 3, 4, and 5.
Sum of squared deviation of X: 19
Sum of squared deviation of Y: 60.125
Sum of the product of deviations of X and Y: 35
Step 7: Calculate Pearson's r using the formulas:
r = (Sum of the product of deviations)/(√(Sum of squared deviation of X * Sum of squared deviation of Y))
r = 35 / √(19 * 60.125)
r = 0.575
Step 8: Determine the strength and type of the relationship using the following guidelines:
- If r is close to 0, there is no or very weak relationship.
- If r is positive and close to 1, there is a strong positive relationship.
- If r is negative and close to -1, there is a strong negative relationship.
In this case, r = 0.575, which is closer to 1 and positive. Therefore, there is a moderate positive relationship between the number of cups of coffee consumed and the stress level reported by the college students.
To determine the regression equation, we use the formula:
Y = a + bX
where Y is the predicted value of the stress level, a is the intercept, b is the slope, and X is the number of cups of coffee.
Step 9: Calculate the slope (b) using the formula:
b = r * (SD of Y / SD of X)
To calculate the standard deviation (SD), we use the following formulas:
SD of X = √(Sum of squared deviation of X / n-1)
SD of Y = √(Sum of squared deviation of Y / n-1)
Using the values we already calculated:
SD of X = √(19 / 8-1) = √(19 / 7) ≈ 1.83
SD of Y = √(60.125 / 8-1) = √(60.125 / 7) ≈ 2.91
b = 0.575 * (2.91 / 1.83) ≈ 0.916
Step 10: Calculate the intercept (a) using the formula:
a = ȳ - b*x̄
a = 5.625 - 0.916 * 4 ≈ 2.33
Therefore, the regression equation for this correlation coefficient is:
Y = 2.33 + 0.916X