(insert graph with model function and original data points)
The graph goes through the first 5 data points and gets close to the last 3 data points only.
Answer 2
Choose 3 data points from the given table above.
To make sure the function would pass through the first and last points and to increase the accuracy of the function, choose the first and last set of data, together with another set of data in between the two, that represent the spread of the original data points.
(1, 10), (5, 74), (8, 149)
(similar process as in Answer 1)
Or use the matrix function on the calculator / other means to solve the matrices,
a =1.285714286, b=8.285714286 and c= 0.4285714286
Substitute into y = ax² + bx + c
y=1.2857x²+8.2857x+0.42847
Therefore the quadratic function is y=1.2857x²+8.2857x+0.42847.
(insert graph with model function and original data points)
The graph goes through the original data points?
Answer 3
Choose 6 data points from the given table above and separate them into 2 sets of 3.
First set: (1, 10), (2, 23), (3, 38)
Second set: (4, 55) (5, 74), (6, 96)
(first set is just Answer 1)
(for the second set, do the same calculation as first set)
The quadratic equation is y=1.5x²+5.5x+9
(insert graph with model function and original data points)
The graph only goes through the 3rd, 5th, 6th and 7th data points and misses the 1st, 2nd, 4th and 8th data points.
Conclusion: These 2 model functions each differ and are constrained depending on the points used in the matrices.
See: http://ceee.rice.edu/Books/LA/leastsq/index.html
Using matrix methods or otherwise, find a cubic function which models this situation.
Explain the process you used.
On a new set of axes draw these model functions and the original data points.
Comment on any differences.
Cubic function form: y=ax3+bx²+cx+d
We need to find a, b, c and d using matrix methods in order to find the cubic function.
Since there are 4 variables, we can create a 4 by 4 (4 x 4) matrix and a 4 by 1 (4 x 1) matrix.
Choose 4 data points from the given table above.
If we choose x values that are all in the range of x = 1 to 5, the matrix will break down and the model will end up with a 0 coefficient for the cubic.
To illustrate this,
We pick:
(1, 10), (2, 23), (3, 38), (4, 55)
Form 4 equations:
a(1)³ + b(1)² + c(1) +1d = 10
a(2)³ + b(2)² + c(2) +1d = 23
a(3)³ + b(3)² + c(3) +1d = 38
a(4)³ + b(4)² + c(4) +1d = 55
which is
1 a + 1 b + 1 c + 1 d = 10
8 a + 4 b + 2 c + 1 d = 23
27 a + 9 b + 3 c + 1 d = 38
64 a + 16 b + 4 c + 1 d = 55
As we carry on, we will find that the cubic equation is y=0x3+x²+10x-1, which is the same as the quadratic equation we found earlier in the previous section.
Therefore, we pick:
(1, 10), (4, 55), (6, 96), (8, 149)
Form 4 equations:
a(1)³ + b(1)² + c(1) +1d = 10
a(4)³ + b(4)² + c(4) +1d = 55
a(6)³ + b(6)² + c(6) +1d = 96
a(8)³ + b(8)² + c(8) +1d = 149
which is
1 a + 1 b + 1 c + 1 d = 10
64 a + 16 b + 4 c + 1 d = 55
216 a + 36 b + 6 c + 1 d = 96
512 a + 64 b + 8 c + 1 d = 149
Transform the equations into matrices:
1…1…1...1...|10
64…16…4…1...|55
216…36...6...1…|96
512…64...8…1...|149
Take -64 x row 1 + row 2 → new row 2
Take -216 x row 1 + row 3 → new row 3
Take -512 x row 1 + row 4 → new row 4
1…1…1…1…|10
0…-48…-60…-63…|-585
0…-180...-210...-215…|-2064
0...-448...-504...-511...|-4971
New row 2 = old row 2 / -48
1…1…1…1…|10
0…1…5/4…21/16…|195/16
0…-180…-210…-215…|-2064
0…-448…-504…-511…|-4971
-row 2 + row 1 → new row 1
180 x row 2 + row 3 → new row 3
448 x row 2 + row 4 → new row 4
1…0…-1/4…-5/16…|35/16
0…1…5/4…21/16…|195/16
0…0…15…85/4…|519/4
0...0…56…77…|489
Divide row 3 by 15 to get new row 3
1…0…-1/4…-5/16…|35/16
0…1…5/4…21/16…|195/16
0…0…1…17/12…|173/20
0…0…56…77…|489
1/4 row 3 + row 1 → new row 1
-5/4 x row 3 + row 2 → new row 2
-56 x row 3 + row 4 → new row 4
1…0…0…1/24…|-1/40
0…1…0…-11/24…|55/40
0…0…1…17/12…|173/20
0…0…0…-7/3…|23/5
Divide row 4 by -7/3
1…0…0…1/24…|-1/40
0…1…0…11/24…|55/40
0…0…1…17/12…|173/20
0…0…0…1…|-69/35
-1/24 row 4 + row 1 → new row 1
11/24 x row 4 + row 2 → new row 2
-17/12 x row 4 + row 3 → new row 3
1…0…0…0…|2/35
0…1…0…0…|33/70
0…0…1…0…|801/70
0…0…0…1…|-69/35
a = 2/35, b = 33/70, c = 801/70 and d = -69/35
Substitute into y = a x ³ + b x² + c x + d
y = (2/35) x ³ + (33/70) x² + (801/70) x – 69/35
Therefore the cubic function is y = (2/35) x ³ + (33/70) x² + (801/70) x – 69/35.
(insert graph with model function and original data points)
Find a polynomial function which passes through every data point.
Explain your choice function, and discuss its reasonableness.
On a new set of axes, draw this model function and the original data points.
Comment on any differences.
A polynomial function is a power function or sum of 2 or more power functions made up of non-negative integer powers.
To find a polynomial function which passes through every data point, we need to use a 7th degree polynomial.
This is because it gives 8 variables which can accommodate all the given data points.
The function is in the form of y=ax7+bx6+cx5+dx4+ex3+fx2+gx+h.
We got the following data points from the given table:
(1, 10), (2, 23), (3, 38); (4, 55); (5, 74), (6, 96), (7, 120), (8, 149)
Substitute each set of data into the equation to form 8 equations:
1a+1b+1c+1d+1e+1f+1g+h=10
128a+64b+32c+16d+8e+4f+2g+h=23
2187a+729b+243c+81d+27e+9f+3g+h=38 16384a+4096b+1024c+256d+64e+16f+4g+h=55 78125a+15625b+3125c+625d+125e+25f+5g+h=74 279936a+46656b+7776c+1296d+216e+36f+6g+h=96 823543a+117649b+16807c+2401d+343e+49f+7g+h=120 2097152a+262144b+32768c+4096d+512e+64f+8g+h=149
Using computer program to solve the matrix by Guassian elimination,
Source:
a = 339285647/118978704 = 2.8516 (5 s.f.) (may present in decimal number)
b = -119466935/1463639418
c = -2928967/454927
d = 3760933/3920712
e = 5166271/8984688
f = -201750957/264438376
g = 750810/24925573
h = 1568092603/2012689223
Substitute into y=ax7+bx6+cx5+dx4+ex3+fx2+gx+h
Therefore the polynomial function is: …
(insert graph with model function and original data points)
The polynomial equation is different form the quadratic and cubic functions in that it passes through every original data point and thus closely resembles the data set.
It represents polynomial regression, the goal of which is to model the expected value of a dependent variable y in terms of the value of an independent variable x.
Using technology, find one other function that fits the data.
On a new set of axes, draw this model function and the original points.
Comment on any differences.
Use Microsoft Excel to plot the table of original data points.
Then add a trendline setting the trend / regression type as “polynomial”.
Display R-squared value on the chart. R2 is the value of coefficient of determination, which represents the proportion of variability in a data set that is accounted for by the statistical model, and thus shows how well the regression function fits the data. It ranges from 0 to 1. When it equals 1, it means the best fit line passes through all the points in the data, and all the variation in the observed values of y is explained by its relationship with the values of x.
By a process of trial and error, set the polynomial order of the trendline with different numbers (the range supported by excel is from 2 to 6) and examine the different functions until the most suitable one is found which fits the data set closely (i.e. R2 is closest to 1).
When order = 2, R2 = 0.99983.
When order = 3, R2 = 0.99997.
When order = 4, R2 = 0.99999.
When order = 5, R2 = 0.99999.
When order = 6, R2 = 1.
Therefore, the function that fits the data using Microsoft Excel is when the polynomial order equals 6, which gives a 6th order polynomial function:
y = 0.0035x6 - 0.0896x5 + 0.9097x4 - 4.5653x3 + 12.735x2 - 4.364x + 5.375
The 6th order polynomial function does not seem to have any difference with the original data points.
It should be noted that Excel has limitation on the polynomial order of up to 6.
It may be more accurate to use a graphics calculator.
Which of your functions found above best models this situation?
Explain your choice.
The function that best models this situation is the 7th degree polynomial function.
This is because it provides a function that passes through, or is only off by an insignificant amount, all the original data points.
Use your quadratic model to decide where you could place a ninth guide.
The quadratic model is y=x²+10x-1.
Substitute 9 which is the number of guides into the function.
y=(9)2+10(9)-1
y=170
Therefore the 9th guide will be 170cm from the tip of the rod.
Discuss the implications of adding a ninth guide to the rod.
The implications of adding a 9th guide to the rod is that there will be less space for the reel and handle for holding the rod.
This may cause problems for the fisher in having a firm grip of the rod to reel the fish in.
Mark has a fishing rod with length 300cm.
The given data about his rod is:
Guide number: 1, 2, 3, 4, 5, 6, 8
Distance from tip (cm): 10, 22, 34, 48, 64, 81, 102, 124
How well does your quadratic model fit this new data?
The quadratic model is y=x²+10x-1.
(insert graph)
The quadratic model fits the new data fairly well?
In the graph, as x increases, the quadratic function develops a steeper slope.
The only value that the graph passes through is x=1.
For every successive data point after x=1, there is increasing variation between the graph and the original data point.
What changes, if any, would need to be made for that model to fit this data?
Discuss any limitations to your model.
Rough method (simple answer)
Since the quadratic function gets steeper as x increases, we can adjust the graph and decrease the slope to make it fits the data better. (e.g. 12y = 34x2 + 10x -1)
Detailed method
To make the quadratic model fit the data better, instead of choosing consecutive data points as was done for Leo’s fishing rod, we choose 3 data points 2 of which would include the first and last set of data.
This represents a wider spread of the original data points taken for modeling in order to make sure the function would pass through the start and end points and increase the accuracy of the model function.
(1, 10), (4, 48), (8, 124)
Form 3 equations:
a(1)²+b(1)+c=10
a(4)²+b(4)+c=48
a(8)²+b(8)+c=124
which is
a + b + c = 10
16a + 4b + c = 48
64a + 8b + c = 124
Conducting a similar process as before:
1…1…1…|10
16…4…1…|48
64…8…1…|124
We get the quadratic function as y=(19/21)x²+(57/7)x+(20/21)
Limitations to my model:
The quadratic model for Leo’s fishing rod is not universal and is probably only meant for a 230cm rod.
Limitations to polynomial models in general:
-
Polynomial models have poor properties. High-degree polynomials are notorious for .
-
Polynomial models have poor properties. Polynomials may provide good fits within the range of data, but they will frequently deteriorate rapidly outside the range of the data.
-
Polynomial models have poor properties. By their nature, polynomials have a finite response for finite x values and have an infinite response if and only if the x value is infinite. Thus polynomials may not model asymptotic phenomena very well.
-
While no procedure is immune to the - tradeoff, polynomial models exhibit a particularly poor tradeoff between shape and degree. In order to model data with a complicated structure, the degree of the model must be high, indicating that the associated number of to be will also be high. This can result in highly unstable models.
^ Summarize as necessary
Source: