0% found this document useful (0 votes)
26 views3 pages

Me404 Pset2 Curve Fitting Removed

Uploaded by

jahnrypaulmunoz3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views3 pages

Me404 Pset2 Curve Fitting Removed

Uploaded by

jahnrypaulmunoz3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

BEDERICO, ALYANNA MAE C.

22 - 09183
PSET 2

PROBLEM SET 2.2 - LEAST SQUARE APPROXIMATION AND CURVE FITTING

SECOND ORDER POLYNOMIAL CURVE FITTING

i xi yi xi2 xi3 xi4 xiyi xi2yi


1 1 4.8 1 1 1 4.8 4.8
2 2 8.8 4 8 16 17.6 35.2
3 2 8 4 8 16 16 32
4 3 7.9 9 27 81 23.7 71.1
5 4 11.9 16 64 256 47.6 190.4
6 5 14.4 25 125 625 72 360
7 6 14.1 36 216 1296 84.6 507.6
8 6 15.8 36 216 1296 94.8 568.8
9 7 15.6 49 343 2401 109.2 764.4
10 8 17.8 64 512 4096 142.4 1139.2
11 9 18.2 81 729 6561 163.8 1474.2
12 9 17.1 81 729 6561 153.9 1385.1
13 10 18.8 100 1000 10000 188 1880
14 10 19.5 100 1000 10000 195 1950
15 11 18.9 121 1331 14641 207.9 2286.9
16 12 21.7 144 1728 20736 260.4 3124.8
17 12 21.9 144 1728 20736 262.8 3153.6
18 13 23.8 169 2197 28561 309.4 4022.2
19 14 26.9 196 2744 38416 376.6 5272.4
20 14 25.1 196 2744 38416 351.4 4919.6

SUMMARY OF VALUES FORMULA

෍ 𝑥𝑖 = 158 ෍ 𝑦𝑖 = 331
𝑛 ෍ 𝑥𝑖 ෍ 𝑥𝑖2 ෍ 𝑦𝑖
෍ 𝑥𝑖2 = 1576 ෍ 𝑥𝑖 𝑦𝑖 = 3081.9 𝑎0
෍ 𝑥𝑖 ෍ 𝑥𝑖2 ෍ 𝑥𝑖3 × 𝑎1 = ෍ 𝑥𝑖 𝑦𝑖
𝑎2
෍ 𝑥𝑖3 = 17450 ෍ 𝑥𝑖 2𝑦𝑖 = 33142.3 ෍ 𝑥𝑖2 ෍ 𝑥𝑖3 ෍ 𝑥𝑖4 ෍ 𝑥𝑖2 𝑦𝑖

෍ 𝑥𝑖4 = 204712 𝑛= 20
SOLUTION

A= 20 158 1576 a0 331


158 1576 17450 x a1 = 3081.9
1576 17450 204712 a2 33142.3

A-1 = 0.647501 -0.17304 0.009765 331


-0.17304 0.057537 -0.00357 x 3081.9
0.009765 -0.00357 0.000234 33142.3

FINAL ANSWER
a0 = 4.678356044
a1 = 1.650339606
a2 = -0.014797448

f(x) = -0.0147974483545896x2 + 1.650339606x +4.678356044

Length-at-Age Data for Fish


30

25 y = -0.0148x2 + 1.6503x + 4.6784


R² = 0.9634

20

15

10

0
0 2 4 6 8 10 12 14 16
SUMMARY OF VALUES
158 ෍ 𝑦𝑖 =
331
෍ 𝑥𝑖 =

1576 3081.9
෍ 𝑥𝑖2 = ෍ 𝑥𝑖 𝑦𝑖 =

17450 33142.3
෍ 𝑥𝑖3 = ෍ 𝑥𝑖 2𝑦𝑖 =

204712 383343.9
෍ 𝑥𝑖4 = ෍ 𝑥𝑖 3𝑦𝑖 =

2493338
෍ 𝑥𝑖5 = 𝑛= 20

31185976
෍ 𝑥𝑖6 =

A= 20 158 1576 17450 a0 331


158 1576 17450 204712 x a1 = 3081.9
1576 17450 204712 2493338 a2 33142.3
17450 204712 2493338 31185976 a3 383343.9

A-1 = 1.672424 -0.8516 0.115485 -0.00458 331


-0.8516 0.506793 -0.07357 0.003031 3081.9
0.115485 -0.07357 0.011139 -0.00047 33142.3
-0.00458 0.003031 -0.00047 2.05E-05 383343.9

FINAL ANSWER
a0 1.210804
a1 3.946086
a2 -0.37247
a3 0.015491131

Length-at-Age Data for Fish


30
y = 0.0155x3 - 0.3725x2 + 3.9461x + 1.2108
25 R² = 0.9803

20

15

10

0
0 2 4 6 8 10 12 14 16

You might also like