Sie sind auf Seite 1von 3

Engr.

Dan Carlo Mendoza Numerical Methods: Assignment 2 Curve Fitting

1. Healthcare costs have been increasing over the years. The following data shows the average
cost of healthcare per person from 1976 to 1998:

Year 1976 1980 1987 1993 1998


Cost (per person) 618 860 1324 1865 2256

Transform date values into numbers. Hence,

Year 1 4 11 17 22
Cost (per person) 618 860 1324 1865 2256

x y xy 𝒙𝟐 (𝒚𝒏 − ȳ)𝟐 ŷ (ŷ − 𝒚)𝟐


1 618.00 618.00 1.00 587,675.56 606.63 129.36
4 860.00 3,440.00 16.00 275,205.16 840.02 399.27
S 1,324.00 14,564.00 121.00 3,672.36 1,384.60 3,672.36
17 1,865.00 31,705.00 289.00 230,784.16 1,851.38 185.39
22 2,256.00 49,632.00 484.00 759,337.96 2,240.37 244.26
55.00 6,923.00 99,959.00 911.00 1,856,675.20 6,923.00 4,630.64

a.) Find the model that fits the data well.


𝑛=5
𝑥̅ = 11
𝑦 = 1,384.60
𝑛∑𝑥 𝑦 − ∑𝑥 ∑𝑦
𝑎 = = 77.80
𝑛 ∑ 𝑥 − ∑(𝑥 )
𝑎 = 𝑦 − 𝑎 𝑥̅ = 528.83
𝑆 −𝑆 (𝒚𝒏 − ȳ)𝟐 − (ŷ − 𝒚)𝟐
𝑟 = =
𝑆 (𝒚𝒏 − ȳ)𝟐
𝑟 = 99.751%
r = 99.50%
𝑦 =𝑎 +𝑎 𝑥
∴ 𝒚 = 𝟓𝟐𝟖. 𝟖𝟑 + 𝟕𝟕. 𝟖𝟎𝒙𝒊
b.) Find the time the average healthcare cost will reach $2800 per person
2800 = 528.83 + 77.80𝒙𝒊
𝑥 = 29.2 ≈ 29
∴ 𝑌𝐸𝐴𝑅 = 1976 + 29 = 𝟐𝟎𝟎𝟓

1
Engr. Dan Carlo Mendoza Numerical Methods: Assignment 2 Curve Fitting

2. The population present in a bacteria culture over 5 days is given in the table below:

time (days) 0 1 2 3 4 5
population 30 133 214 337 527 819

x y xy 𝒙𝟐 (𝒚𝒏 − ȳ)𝟐 ŷ (ŷ − 𝒚)𝟐


0 30 - - 98,177.78 (31.67) 3,802.78
1 133 133.00 1.00 44,240.11 118.33 215.11
2 214 428.00 4.00 16,727.11 268.33 2,952.11
3 337 1,011.00 9.00 40.11 418.33 6,615.11
4 527 2,108.00 16.00 33,733.44 568.33 1,708.44
5 819 4,095.00 25.00 226,258.78 718.33 10,133.78
15.00 2,060.00 7,775.00 55.00 419,177.33 2,060.00 25,427.33

a.) Find a good model for the data.


𝑛=5
𝑥̅ = 2.5
𝑦 = 343.33
𝑛∑𝑥 𝑦 − ∑𝑥 ∑𝑦
𝑎 = = 150
𝑛 ∑ 𝑥 − ∑(𝑥 )
𝑎 = 𝑦 − 𝑎 𝑥̅ = −31.67
𝑆 −𝑆 (𝒚𝒏 − ȳ)𝟐 − (ŷ − 𝒚)𝟐
𝑟 = =
𝑆 (𝒚𝒏 − ȳ)𝟐
𝑟 = 93.934%
r = 96.92%

𝑦 =𝑎 +𝑎 𝑥
∴ 𝒚 = −𝟑𝟏. 𝟔𝟕 + 𝟏𝟓𝟎𝒙𝒊
b.) Estimate the population after 7 days.
𝑦 = −31.67 + 150(7)
𝑥 = 1,018.33
∴ 𝑷𝒐𝒑𝒖𝒍𝒂𝒕𝒊𝒐𝒏 = 𝟏, 𝟎𝟏𝟖

2
Engr. Dan Carlo Mendoza Numerical Methods: Assignment 2 Curve Fitting

3. The table below shows the yield (in mg) of a chemical reaction in the first 6 minutes.

x y xy 𝒙𝟐 (𝒚𝒏 − ȳ)𝟐 ŷ (ŷ − 𝒚)𝟐


1 1.2 1.20 1.00 77.15 3.02 3.31
2 6.9 13.80 4.00 9.51 5.80 1.20
3 9.3 27.90 9.00 0.47 8.59 0.50
4 12.7 50.80 16.00 7.38 11.38 1.75
5 14.1 70.50 25.00 16.95 14.16 0.00
6 15.7 94.20 36.00 32.68 16.95 1.56
21.00 59.90 258.40 91.00 144.13 59.90 8.32

a.) Use the scatterplot to find the best model to fit this data.
𝑛=6
𝑥̅ = 3.5
𝑦 = 9.98
∑ ∑ ∑
𝑎 = ∑ ∑( )
= 2.7857p

𝑎 = 𝑦 − 𝑎 𝑥̅ = 0.2333
𝑆 −𝑆 (𝒚𝒏 − ȳ)𝟐 − (ŷ − 𝒚)𝟐
𝑟 = =
𝑆 (𝒚𝒏 − ȳ)𝟐
𝑟 = 94.224%
r = 97.069%

𝑦 =𝑎 +𝑎 𝑥
∴ 𝒚 = 𝟎. 𝟐𝟑𝟑𝟑 + 𝟐. 𝟕𝟖𝟓𝟕𝒙𝒊
b.) Using that data, determine in how many minutes will the yield be 20mg.
20 = 0.2333 + 2.7857(𝑥 )
𝑥 = 7.10
∴ 𝑻𝑰𝑴𝑬 = 𝟕. 𝟏𝟎 𝒎𝒊𝒏𝒖𝒕𝒆𝒔

Das könnte Ihnen auch gefallen