algebra_nonlinear_project
Hello Dolores:
Here is the project.
Math Professor
Curve-fitting Proje
c
t – Nonlinear Models
For this assignment, two sets of data will be anal
y
zed. For this part of the project, you will be supplied with the data. You will carry out quadratic regression for the first data set and e
x
ponential regression for the second data set.
Quadratic Regression (QR):
Data: On a particular day in July,
2
0
1
2, the outdoor temperature was recorded at 7 times of the day, and the following table was compiled.
Time of day (hour)
x
Temperature (degrees F.
y
5
70
8
75
11
86
14
91
17
91
20
84
2
3
77
REMARKS: The times are the hours since midnight. For instance, 5 means 5 am, and 14 means 2 pm.
The temperature is low in the morning, reaches a peak in the afternoon, and then decreases.
Tasks for Quadratic Regression Model (QR):
(QR-1) Plot the points (x, y) to obtain a scatterplot. Note that the trend is definitely non-linear. Use an appropriate scale on the horizontal and vertical axes and be sure to label carefully.
(QR-2) Find the quadratic polynomial of best fit and graph it on the scatterplot. State the formula for the quadratic polynomial.
(QR-3) Find and state the value of
r2, the coefficient of determination. Discuss your findings. (r2 is calculated using a different formula than for linear regression. However, just as in the linear case, the closer r2 is to 1, the better the fit.) Is a parabola a good curve to fit to this data?
(QR-4) Use the quadratic polynomial to make an outdoor temperature estimate. Each class member will compute a temperature estimate for a different time of day. Your number 27, multiply it by 0.5 and add to 6 to get a time x in hours; that is, compute x
=
0.5n
+
6. The value of x is the time you will substitute into the quadratic polynomial to make a temperature estimate. For instance, if your n is 15, then x = 0.5(15) + 6 = 13.5 hours (1:30 pm), and then you would substitute x = 13.5 into your polynomial equation to get the corresponding outdoor temperature estimate for 1:30 pm. State your results clearly — the time of day and the corresponding outdoor temperature estimate.
(QR-5) Using algebra, find the maximum temperature predicted by the quadratic model and find the time when it occurred. Show work.
Solutions:
(QR-1): Graphed on the next page.
(QR-2): I chose the following 4 points:
X |
5 |
11 |
17 |
23 |
Y |
70 |
86 |
91 |
77 |
Each of the points must satisfy the standard quadratic equation for the same coefficients. So we get the following system:
77
23
23
91
17
86
11
70
5
3
2
2
1
3
2
2
1
3
2
2
1
3
2
2
1
=
+
+
=
+
+
=
+
+
=
+
+
c
c
c
c
c
c
c
c
c
c
c
c
Where c1, c2, and c3 are the coefficients we’re looking for.
So now we convert this system into a matrix equation:
ú
ú
ú
ú
û
ù
ê
ê
ê
ê
ë
é
=
ú
ú
ú
û
ù
ê
ê
ê
ë
é
·
ú
ú
ú
ú
û
ù
ê
ê
ê
ê
ë
é
91
86
529
23
1
289
17
1
121
11
1
25
5
1
3
2
1
c
c
c
Now we multiply both sides of the matrix equation by the transverse of the first matrix. So now we have:
ú
ú
ú
ú
û
ù
ê
ê
ê
ê
ë
é
·
ú
ú
ú
û
ù
ê
ê
ê
ë
é
=
ú
ú
ú
û
ù
ê
ê
ê
ë
é
·
ú
ú
ú
ú
û
ù
ê
ê
ê
ê
ë
é
·
ú
ú
ú
û
ù
ê
ê
ê
ë
é
77
91
70
529
289
121
25
23
17
11
5
1
1
1
1
529
23
1
289
17
1
121
11
1
25
5
1
529
289
121
25
23
17
11
5
1
1
1
1
3
2
1
c
c
c
After multiplying, we get:
This gives us the following system:
ú
ú
ú
û
ù
ê
ê
ê
ë
é
=
ú
ú
ú
û
ù
ê
ê
ê
ë
é
·
ú
ú
ú
û
ù
ê
ê
ê
ë
é
79188
4614
324
378628
18536
964
18536
964
56
964
56
4
3
2
1
c
c
c
79188
378628
18563
964
4614
18536
964
56
324
964
56
4
3
2
1
3
2
1
3
2
1
=
+
+
=
+
+
=
+
+
c
c
c
c
c
c
c
c
c
Using a systems of three equations calculator technology, we get:
208
.
0
267
.
6
475
.
43
3
2
1
–
=
=
=
c
c
c
So the quadratic equation of best fit (estimated by choosing the four points) is:
475
.
43
267
.
6
208
.
0
2
+
+
–
=
x
x
y
(QR-3): The formula for the coefficient of determination for a quadratic regression is :
(
)
(
)
å
å
–
–
=
2
2
2
mean
obs
mean
est
y
y
y
y
R
So we will create the following table to assist in the calculation of R2:
x
y
(
)
2
mean
obs
y
y
–
est
y
(
)
2
mean
est
y
y
–
5
70
144
69.61
153.51
8
75
49
80.299
2.8934
11
86
16
87.244
27.5
14
91
81
90.445
71.318
17
91
81
89.902
62.442
20
84
4
85.615
13.068
23
77
25
77.584
19.501
(
)
å
–
2
mean
est
y
y
= 350.234
So with this, we get R2 =
88
.
0
400
234
.
350
=
(
)
å
–
2
mean
obs
y
y
= 400
Alternatively, by use of Excel, we also retrieve the following as our quadratic equation of best fit:
804
.
40
4497
.
6
2116
.
0
2
+
+
–
=
x
x
y
(QR-4): If my n is 27, the we compute
(
)
6
27
5
.
0
+
=
x
to get
5
.
19
=
x
, which is 7:30pm.
So using the polynomial equation:
804
.
40
4497
.
6
2116
.
0
2
+
+
–
=
x
x
y
, we get the following result:
11225
.
86
804
.
40
)
5
.
19
(
4497
.
6
)
5
.
19
(
2116
.
0
2
=
+
+
–
=
y
So the outdoor temperature is approximated to be 86oF.
(QR-5): To find the maximum temperature predicted by the quadratic model and the time that this temperature occurs, we must find the vertex of the function.
The X value of the vertex is:
(
)
24
.
15
2116
.
0
2
4497
.
6
2
=
–
–
=
–
=
a
b
x
. This approximates to 3:15pm.
So:
90
95
.
89
804
.
40
)
24
.
15
(
4497
.
6
)
24
.
15
(
2116
.
0
2
»
=
+
+
–
=
y
°F
Exponential Regression (ER)
Data: A cup of hot coffee was placed in a room maintained at a constant temperature of 69 degrees.
The temperature of the coffee was recorded periodically, and the following table was compiled.
Time Elapsed (minutes)
Coffee Temperature (deg F)
x
T
0
166
10
140.5
20
125.2
30
110.3
40
104.5
50
98.4
60
93.9
REMARKS: Common sense tells us that the coffee will be cooling off and its temperature will decrease and approach the ambient temperature of the room, 69 degrees.
So, the temperature difference between the coffee temperature and the room temperature will decrease to 0.
We will be fitting the data to an exponential curve of the form y = A e- bx. Notice that as x gets large, y will get closer and closer to 0, which is what the temperature difference will do.
So, we want to analyze the data where x = time elapsed and y = T – 69, the temperature difference between the coffee temperature and the room temperature.
Time Elapsed (minutes)
Temperature Difference (deg F)
x
y = T – 69
0
97
10
71.5
20
56.2
30
41.3
40
35.5
50
29.4
60
24.9
Tasks for Exponential Regression Model (ER)
(ER-1) Plot the points (x, y) in the second table to obtain a scatterplot. Note that the trend is definitely non-linear. Use an appropriate scale on the horizontal and vertical axes and be sure to label carefully.
(ER-2) Find the exponential function of best fit and graph it on the scatterplot. State the formula for the exponential function. It should have the form y = A e- bx where software has provided you with the numerical values for A and b.
(ER-3) Find and state the value of
r2, the coefficient of determination. Discuss your findings.(r2 is calculated using a different formula than for linear regression. However, just as in the linear case, the closer r2 is to 1, the better the fit.) Is an exponential curve a good curve to fit to this data?
(ER-4) Use the exponential function to make a coffee temperature estimate. Each class member will compute a temperature estimate for a different elapsed time. Look at the Class Members list in our Webtycho classroom, and look for the number “n” next to your name. Take your number n, multiply it by 6 to get an elapsed time x; that is, compute x = 6n. The value of x is the time (in minutes) you will substitute into the exponential function to make a temperature estimate. For instance, if your n is 14, then x = 6(14) = 84 minutes, and then you would substitute x = 84 minutes into your exponential function to get y, the corresponding temperature difference between the coffee temperature and the room temperature. Since y = T – 69, we have coffee temperature T = y + 69. Take your y estimate and add 69 degrees to get the coffee temperature estimate. State your results clearly — the elapsed time and the corresponding estimate of the coffee temperature.
(ER-5) Use the exponential function together with algebra to estimate the elapsed time when the coffee arrived at a particular target temperature. Report the time to the nearest tenth of a minute. Each class member will work with a different target temperature. Take your “n” value from ER-4 and add it to 69 to get your target temperature T. For instance, if your n is 14, then your target temperature T is 69 + 14 = 83 degrees, and your goal is to find out how long it took the coffee to cool to 83 degrees. Note that 14 is the temperature difference between the coffee and the room, what we are calling y. So, for this particular target temperature, the goal is finding how long it took for the temperature difference y to reach 14 degrees; that is, solving the equation 14 = A e- bx for x. In general, you are solving your equation y = A e- bx for x, where y = your particular temperature difference. Show algebraic work in solving your equation. State your results clearly — your target temperature and the estimated elapsed time, to the nearest tenth of a minute.
(ER-1): See Previous Page
(ER-2): As seen in the Excel page, the exponential function of best fit is:
x
e
y
023
.
0
976
.
89
–
=
.
(ER-3): As seen in the Excel page, the coefficient of determination is:
9848
.
0
2
=
r
, which gives this a very strong positive correlation.
(ER-4): If my n is 27, then we compute
(
)
27
6
=
x
to get
162
=
x
minutes. So using the exponential regression:
x
e
y
023
.
0
976
.
89
–
=
, we get the following result:
)
162
(
023
.
0
976
.
89
–
=
e
y
= 2.16
»
2.2OF
So the coffee temperature is approximated to be
2
.
71
69
2
.
2
=
+
=
T
OF
(ER-5): My target temperature is 69 + 27 = 96 OF. So we will solve for x in the exponential equation:
x
e
y
023
.
0
976
.
89
–
=
to find out how long it took for the temperature difference to reach 27O.
So:
976
.
89
976
.
89
976
.
89
27
023
.
0
x
e
–
=
x
e
023
.
0
3
.
0
–
=
x
e
023
.
0
ln
3
.
0
ln
–
=
023
.
0
023
.
0
023
.
0
3
.
0
ln
–
–
=
–
x
3
.
52
34
.
52
»
=
x
minutes.
_1416606996.unknown
_1416607109.unknown
_1416630888.unknown
_1416631035.unknown
_1416631301.unknown
_1416631373.unknown
_1416631174.unknown
_1416630993.unknown
_1416608032.unknown
_1416608133.unknown
_1416608162.unknown
_1416608218.unknown
_1416608098.unknown
_1416607320.unknown
_1416607013.unknown
_1416607088.unknown
_1416607004.unknown
_1416595840.unknown
_1416597814.unknown
_1416605062.unknown
_1416605141.unknown
_1416605226.unknown
_1416605410.unknown
_1416605110.unknown
_1416604911.unknown
_1416604951.unknown
_1416604454.unknown
_1416596195.unknown
_1416596596.unknown
_1416596091.unknown
_1416594733.unknown
_1416594968.unknown
_1416595778.unknown
_1416594913.unknown
_1416565232.unknown
_1416565481.unknown
_1416564092.unknown