In: Statistics and Probability
Does Elevation Affect Temperature
Mid-June?
Suppose that you wanted to determine the effect, if any, that
elevation has on temperature. The table below lists the elevations
(in feet above sea level) of 24 randomly selected cities in the
United States and the low temperatures (in degrees Fahrenheit) of
these cities on June 15, 2020.
Elevation |
1365 |
−282 |
5280 |
4551 |
6910 |
6063 |
3875 |
2730 |
7 |
1201 |
2001 |
1843 |
Low Temp. |
56 |
79 |
56 |
56 |
39 |
55 |
42 |
51 |
74 |
63 |
73 |
48 |
Elevation |
3202 |
2389 |
4226 |
1550 |
2134 |
2080 |
−7 |
141 |
909 |
50 |
338 |
1086 |
Low Temp. |
64 |
73 |
56 |
53 |
58 |
57 |
80 |
55 |
74 |
56 |
69 |
78 |
Our eyes can be fooled by how strong a linear relationship is; we need to use a numerical measure, the correlation coefficient, to accurately describe the association between elevation and low temperature. Correlation measures the strength and direction (type) of linear relationships.
This is quite tedious to compute by hand, so we will use our calculator to obtain the value of r.
Using your calculator, press STAT, choose CALC, then 8: LinReg (a+bx). Enter L1, L2. Then press the ENTER key to get the correlation coefficient (rounded to 4 decimal places).
r ≈
Given the value of r above, what is the strength of the linear relationship? Weak Moderate Strong
When a scatterplot shows a linear relationship, we would like to summarize the overall pattern by drawing a line on the scatterplot. A regression line describes how a response variable changes as an explanatory variable changes. The least-squares regression line is the line that makes the sum of the squares of the vertical distances of the data points to the line as small as possible.
The form of the equation of a line is y = a + bx where a is the y-intercept, the value of y when x=0, and b is the slope, the amount y changes when x increases by one unit.
Using your calculator, press STAT, choose CALC, 8: LinReg (a+bx).
Enter L1, L2. Then press the ENTER key to get
the coefficients for the least-squares regression line
(don't round).
a =
b =
The equation of the least-squares regression line is: _________________________________________________
The coefficient of determination, r2, is the proportion of the variation in the values of y that is explained by the linear relationship with x.
r2 ≈ for this data (write as a decimal rounded to four decimal places)
r ≈ -0.6114
Given the value of r above, what is the strength of the linear relationship? Moderate
The form of the equation of a line is y = a + bx where a is the y-intercept, the value of y when x=0, and b is the slope, the amount y changes when x increases by one unit.
a = 68.872408335884
b = -0.00350355691549934
The equation of the least-squares regression line is: y=68.872408335884-0.00350355691549934x
The coefficient of determination, r2, is the proportion of the variation in the values of y that is explained by the linear relationship with x.
r2 ≈ 0.3738 for this data (write as a decimal rounded to four decimal places)
Regression Analysis | |||||
r² | 0.3738 | ||||
r | -0.6114 | ||||
Std. Error | 9.358 | ||||
n | 24 | ||||
k | 1 | ||||
. | |||||
ANOVA table | |||||
Source | SS | df | MS | F | p-value |
Regression | 1,150.1900 | 1 | 1,150.1900 | 13.13 | .0015 |
Residual | 1,926.7683 | 22 | 87.5804 | ||
Total | 3,076.9583 | 23 | |||
Regression output | confidence interval | ||||
variables | coefficients | std. error | t (df=22) | p-value | 95% lower |
Intercept | 68.8724 | ||||
x | -0.0035 | 0.0010 | -3.624 | .0015 | -0.0055 |
The given data is:
Elevation | Low Temp |
1365 | 56 |
-282 | 79 |
5280 | 56 |
4551 | 56 |
6910 | 39 |
6063 | 55 |
3875 | 42 |
2730 | 51 |
7 | 74 |
1201 | 63 |
2001 | 73 |
1843 | 48 |
3202 | 64 |
2389 | 73 |
4226 | 56 |
1550 | 53 |
2134 | 58 |
2080 | 57 |
-7 | 80 |
141 | 55 |
909 | 74 |
50 | 56 |
338 | 69 |
1086 | 78 |