In: Math
5. The table below shows actual temperatures and predicted temperatures for San Antonio from August 01 through 15th. | ||||||||||
https://www.accuweather.com/en/us/san-antonio-tx/78205/august-weather/351198 | ||||||||||
Day | Temperature | |||||||||
1 | 100 | |||||||||
2 | 100 | |||||||||
3 | 99 | |||||||||
4 | 98 | |||||||||
5 | 101 | |||||||||
6 | 100 | |||||||||
7 | 101 | |||||||||
8 | 102 | |||||||||
9 | 103 | |||||||||
10 | 103 | |||||||||
11 | 104 | |||||||||
12 | 104 | |||||||||
13 | 104 | |||||||||
14 | 103 | |||||||||
15 | 100 | |||||||||
a. Decide which variable should be the independent variable and which should be the dependent variable. | ||||||||||
b. Draw a chart for the data. Make sure to show the equation and the r-squared on the chart. | ||||||||||
c. Does it appear from inspection that there is a relationship between the variables? Why or why not? | ||||||||||
d. Calculate the least-squares line. Put the equation in the form of: ŷ = a + bx | ||||||||||
e. Find the correlation coefficient. Is it significant? | ||||||||||
f. Does it appear that a line is the best way to fit the data? Why or why not? | ||||||||||
g. Are there any outliers in the data? Which ones? | ||||||||||
h. Use the least squares line to estimate what will be be the temperature for August 16, 17 and 18. | ||||||||||
16-Aug | 17-Aug | 18-Aug | ||||||||
i. Do you believe the answers above are reasonable? Why or why not? | ||||||||||
j. What is the slope of the least-squares (best-fit) line? Interpret the slope. | ||||||||||
a.
Independent variable: Day
Dependent variable: Temperature
b.
This part is solved in excel by following these steps,
Step 1: Write the data values in excel. The screenshot is shown below,
Step 2: Select the data values then INSERT> Recommended Charts> X Y Scatter > OK.
The chart is obtained. The screenshot is shown below,
Step 3: To add Trend line, linear equation and R-square value in plot.
Click on Add Chart element> Trendline > More options>OK. The screenshot is shown below,
Now tick box for TRENDLINE OPTION: Linear, Display Equation on Chart and Display R-squared value on Chart. The screenshot is shown below,
The chart is obtained. The screenshot is shown below,
c.
From the scatter plot and trend line slope we can observe that there is a positive correlation between two variable day and temperature.
d.
The least square equation is,
The regression equation can also be estimated as shown below,
The regression equation is defined as,
The least square estimate of intercept and slope are,
Day, X | Temperature, Y | X^2 | Y^2 | XY | |
1 | 100 | 1 | 10000 | 100 | |
2 | 100 | 4 | 10000 | 200 | |
3 | 99 | 9 | 9801 | 297 | |
4 | 98 | 16 | 9604 | 392 | |
5 | 101 | 25 | 10201 | 505 | |
6 | 100 | 36 | 10000 | 600 | |
7 | 101 | 49 | 10201 | 707 | |
8 | 102 | 64 | 10404 | 816 | |
9 | 103 | 81 | 10609 | 927 | |
10 | 103 | 100 | 10609 | 1030 | |
11 | 104 | 121 | 10816 | 1144 | |
12 | 104 | 144 | 10816 | 1248 | |
13 | 104 | 169 | 10816 | 1352 | |
14 | 103 | 196 | 10609 | 1442 | |
15 | 100 | 225 | 10000 | 1500 | |
Sum | 120 | 1522 | 1240 | 154486 | 12260 |
The estimated regression line is,
e.
The correlation coefficient is obtained using the formula,
From the data values from the previous part,
g.
There is one potential outlier with data value (day: 15, temperature: 100)
The least square regression model doesn't seems to be a best fit the data as the data values are seems to be curvilinear. (Polynomial model can be best fit)
h.
From the estimated regression line,
For x = 16,
For x = 17,
i.
The answer above are not reasonable since the trend of the actual data values is decreasing after day 13
j.
Slope = 0.3