You are on page 1of 43

X Y Y/100k Y/100k' Y'

y=ax+b 2003 52941 0.52941 0.50068 50068.4 y=alnx+b


2004 55957 0.55957 0.52697 52697.4
2005 56568 0.56568 0.55326 55326.4
2006 56784 0.56784 0.57955 57955.4
2007 59612 0.59612 0.60584 60584.4
2008 60821 0.60821 0.63213 63213.4
2009 61934 0.61934 0.65842 65842.4
2010 67743 0.67743 0.68471 68471.4
2011 69176 0.69176 0.711 71100.3
2012 72922 0.72922 0.73729 73729.3
2013 75266 0.75266 0.76358 76358.3
2014 77261 0.77261 0.78987 78987.3
2015 82413 0.82413 0.81616 81616.3
2016 90798 0.90798 0.84245 84245.3

SUMMARY OUTPUT

Regression Statistics
Multiple R 0.9706971
R Square 0.9422528
Adjusted R 0.9374405
Standard Er 0.0283381
Observation 14

ANOVA
df SS MS F Significance F
Regression 1 0.157239 0.157239 195.80229 8.581E-09
Residual 12 0.0096366 0.0008031
Total 13 0.1668756

CoefficientsStandard Error t Stat P-value Lower 95% Upper 95%Lower 95.0%Upper 95.0%
Intercept -52.15805 3.7754568 -13.81503 9.922E-09 -60.38407 -43.93204 -60.38407 -43.93204
X Variable 1 0.0262899 0.0018788 13.992937 8.581E-09 0.0221964 0.0303835 0.0221964 0.0303835
X lnX Y Y/100k Y/100k' Y' y=ax+blnx+c
2003 7.6024 52941 0.52941 0.50055 50054.7
2004 7.6029 55957 0.55957 0.52691 52691
2005 7.6034 56568 0.56568 0.55326 55326.1
2006 7.6039 56784 0.56784 0.5796 57959.8
2007 7.6044 59612 0.59612 0.60592 60592.2
2008 7.60489 60821 0.60821 0.63223 63223.3
2009 7.60539 61934 0.61934 0.65853 65853.1
2010 7.60589 67743 0.67743 0.68482 68481.6
2011 7.60639 69176 0.69176 0.71109 71108.7
2012 7.60688 72922 0.72922 0.73735 73734.6
2013 7.60738 75266 0.75266 0.76359 76359.2
2014 7.60788 77261 0.77261 0.78982 78982.4
2015 7.60837 82413 0.82413 0.81604 81604.4
2016 7.60887 90798 0.90798 0.84225 84225

SUMMARY OUTPUT

Regression Statistics
Multiple R 0.9705104
R Square 0.9418905
Adjusted R 0.937048
Standard Er 0.0284269
Observation 14

ANOVA
df SS MS F Significance F
Regression 1 0.1571786 0.1571786 194.50654 8.91E-09
Residual 12 0.0096971 0.0008081
Upper 95.0% Total 13 0.1668756

CoefficientsStandard Error t Stat P-value Lower 95% Upper 95%Lower 95.0%Upper 95.0%
Intercept -401.0531 28.804571 -13.92325 9.081E-09 -463.8129 -338.2933 -463.8129 -338.2933
X Variable 1 52.819316 3.7872648 13.94656 8.91E-09 44.567575 61.071057 44.567575 61.071057
X lnX Y Y/100k Y/100k' Y'
2003 7.6024 52941 0.52941 0.54191 54191.4
2004 7.6029 55957 0.55957 0.54915 54915.4
2005 7.6034 56568 0.56568 0.55958 55957.9
2006 7.6039 56784 0.56784 0.57319 57318.7
2007 7.6044 59612 0.59612 0.58997 58997.4
2008 7.60489 60821 0.60821 0.60994 60993.6
2009 7.60539 61934 0.61934 0.63307 63307.2
2010 7.60589 67743 0.67743 0.65938 65937.7
2011 7.60639 69176 0.69176 0.68885 68884.8
2012 7.60688 72922 0.72922 0.72148 72148.3
2013 7.60738 75266 0.75266 0.75728 75727.8
2014 7.60788 77261 0.77261 0.79623 79623
2015 7.60837 82413 0.82413 0.83834 83833.6
2016 7.60887 90798 0.90798 0.88359 88359.3

SUMMARY OUTPUT

Regression Statistics
Multiple R 0.9929942
R Square 0.9860374
Adjusted R 0.9834988
Standard Er 0.014554
Observation 14

ANOVA
df SS MS F Significance F
Regression 2 0.1645456 0.0822728 388.40977 6.271E-11
Residual 11 0.00233 0.0002118
Total 13 0.1668756

Upper 95.0% CoefficientsStandard Error t Stat P-value Lower 95% Upper 95%Lower 95.0%Upper 95.0%
Intercept 84452.325 14388.173 5.8695658 0.0001078 52784.171 116120.48 52784.171 116120.48
X Variable 1 6.3924579 1.0839373 5.8974427 0.0001035 4.0067281 8.7781877 4.0067281 8.7781877
X Variable 2 -12792.78 2178.1658 -5.873191 0.0001072 -17586.89 -7998.673 -17586.89 -7998.673
Upper 95.0%
EE 146: Exercise 1
Problem 1 : Simple Linear Regression

X Y INSTRUCTIONS
1 1 1. Regress Y from X using the closed form equation.
3 2 2. Verify your answers in (1) using the following:
4 4 a. ESS minimization using MS Excel Solver
6 4 b. MS Excel's Regression toolkit
8 5
9 7
11 8
14 9

Solution using the closed form equation

X Y X2 XY �=(𝑛∑▒ 〖��−∑▒�
1 1 1 1 ∑▒�〗 )/(𝑛∑▒ 〖� ^2−
3 2 9 6 〖 (∑▒�) 〗^2 〗)
16 16 �=(∑▒�−�∑▒�)/𝑛
4 4
6 4 36 24
8 5 64 40
9 7 81 63 b 0.636363636
11 8 121 88 a 0.545454545
14 9 196 126 �=𝟎.𝟓𝟒𝟓𝟓+𝟎.𝟔𝟑𝟔𝟒�
y=0.5455+0.6364x
Sum 56 40 524 364
n 8

Solution using ESS minimization using MS Excel Solver

X Y Y' Y-Y' (Y-Y')2


1 1 1.181818 -0.18182 0.033058 b 0.636364
3 2 1.909091 0.090909 0.008264 a 0.545455
4 4 2.545455 1.454545 2.115702 y=0.5455+0.6364x
�=𝟎.𝟓𝟒𝟓𝟓+𝟎.𝟔𝟑𝟔𝟒�
6 4 3.818182 0.181818 0.033058 same as #1
8 5 5.727273 -0.72727 0.528926
9 7 6.272727 0.727273 0.528926
11 8 7 1 1
14 9 8.909091 0.090909 0.008264
Sum 56 40 35.63636 2.636364 4.256198

Solution using MS Excel Regression Toolkit

Regression Statistics
Multiple R 0.97700842
R Square 0.95454545
Adjusted R Square0.9469697
Standard Error 0.65133895
Observations 8
ANOVA
df SS MS F Significance F
Regression 1 53.4545455 53.4545455 126 2.9862578E-05
Residual 6 2.54545455 0.42424242
Total 7 56

CoefficientsStandard Error t Stat P-value Lower 95% Upper 95%


a 0.54545455 0.4588183 1.18882474 0.27942173 -0.5772333925 1.66814248
b 0.63636364 0.05669178 11.2249722 2.9863E-05 0.4976438515 0.77508342
�=𝟎.𝟓𝟒𝟓𝟓+𝟎.𝟔𝟑𝟔𝟒�
y=0.5455+0.6364x
same as #1
m equation.

𝟓+𝟎.𝟔𝟑𝟔𝟒�
Lower 95.0%Upper 95.0%
-0.5772334 1.66814248
0.49764385 0.77508342
EE 146: Exercise 1
Problem 2 : Multiple Linear Regression

Y X1 X2 INSTRUCTIONS
95 42 272 1. Regress Y from X1 and X2 using the closed form equation.
77 33 226 2. Verify your answers in (1) using the following:
80 33 259 a. Matrix approach to multiple linear regression
100 45 292 b. ESS minimization using MS Excel Solver
97 39 311 c. MS Excel's Regression toolkit
70 36 183
50 32 173
80 41 236
92 40 230
84 38 235

Solution using the closed form equation

Y X1 X2 X1 2 X2 2 X1 Y X2 Y X1 X2
95 42 272 1764 73984 3990 25840 11424
77 33 226 1089 51076 2541 17402 7458 Aβ=�
80 33 259 1089 67081 2640 20720 8547 β 〖 =� 〗 ^(−1) �
100 45 292 2025 85264 4500 29200 13140 [█(β_0@β_1@β_2 )]=
97 39 311 1521 96721 3783 30167 12129
70 36 183 1296 33489 2520 12810 6588
50 32 173 1024 29929 1600 8650 5536
80 41 236 1681 55696 3280 18880 9676
92 40 230 1600 52900 3680 21160 9200
84 38 235 1444 55225 3192 19740 8930
sum 825 379 2417 14533 601365 31726 204569 92628
n 10

Solution using the matrix approach to multiple linear regression

Y X0 X1 X2 �= (�^� �)^(−𝟏)
95 1 42 272 𝑿^� �
77 1 33 226 XT
80 1 33 259 1 1 1 1
100 1 45 292 42 33 33 45
97 1 39 311 272 226 259 292
70 1 36 183
50 1 32 173 XT X
80 1 41 236 10 379 2417
92 1 40 230 379 14533 92628
84 1 38 235 2417 92628 601365
sum 825
count 10
Solution using ESS minimization using MS Excel Solver

Y X1 X2 Y' Y-Y' (Y-Y')^2


95 42 272 94.81595 0.184055 0.033876
77 33 226 72.24467 4.755328 22.61314
80 33 259 79.42591 0.574085 0.329574
100 45 292 103.3552 -3.35523 11.25758 β
97 39 311 99.11585 -2.11585 4.476818 0
70 36 183 67.07431 2.925686 8.559636 1.395673
50 32 173 59.31549 -9.31549 86.77833 0.217613
80 41 236 85.58619 -5.58619 31.20551
92 40 230 82.88484 9.115164 83.08621
84 38 235 81.18156 2.818443 7.943618
SUM 825 379 2417 825 -1.7E-12 256.2843

Solution using MS Excel Regression Toolkit

Regression Statistics
Multiple R 0.93442923
R Square 0.87315798
Adjusted R 0.8369174
Standard Err6.05078864
Observation 10

ANOVA
df SS MS F Significance F
Regression 2 1764.2157 882.107849 24.0933795 0.00072681
Residual 7 256.284302 36.6120431
Total 9 2020.5

CoefficientsStandard Error t Stat P-value Lower 95% Upper 95% Lower 95.0%Upper 95.0%
Intercept -22.993164 17.7625433 -1.2944748 0.23656497 -64.994905 19.0085768 -64.994905 19.0085768
X Variable 1 1.39567292 0.58254166 2.39583365 0.04775762 0.01818077 2.77316506 0.01818077 2.77316506
X Variable 2 0.21761341 0.05776696 3.76709101 0.00700955 0.08101625 0.35421057 0.08101625 0.35421057
e closed form equation.

ear regression

A B
10 379 2417 825
Aβ=� 379 14533 92628 31726
β 〖 =� 〗 ^(−1) � 92628
2417 601365 204569
[█(β_0@β_1@β_2 )]=[■8(�&∑▒�_1 &∑▒�_2 @∑▒�_1 &∑▒ 〖
〖�_1 〗 ^2 &∑▒ 〖
〖�_1 �_2 〗 @∑▒�_2 &∑▒ 〖
〖�_1 �_2 〗

A-1 β
8.6176001 -0.21777 -0.0010927 -22.9932
-0.21777 0.0092689 -0.0005524 1.395673
-0.001093 -0.000552 9.1145E-05 0.217613

�=−𝟐𝟐.𝟗𝟗+𝟏.𝟑𝟗𝟓𝟕�_𝟏+𝟎.𝟐𝟏𝟕𝟔�_𝟐.

1 1 1 1 1 1
39 36 32 41 40 38
311 183 173 236 230 235

(XTX)-1 XT Y β
8.6176001 -0.21777 -0.0010927 825 -22.993164
-0.21777 0.0092689 -0.0005524 31726 1.3956729
-0.001093 -0.000552 9.1145E-05 204569 0.2176134
Upper 95.0%
@∑▒�_2 &∑▒ 〖
〖�_1 �_2 〗 &∑▒ 〖
〖�_2 〗 ^2 )]^(−1) [█(∑▒�@∑▒�_1 �@∑▒�_2 �)]
EE 146: Exercise 1
Problem 3 : Regression Analysis and Demand Forecasting

Instructions
1. Secure the historical PH population data from the Worldbank World Development Indicators website. (https
2. Secure the historical PH electricity peak demand data from the DOE Power Statistics data sheet. (https://w
3. Develop the following regression models. You can opt to use only the most recent data points. You may als
a. Electricity demand vs. time using the following models: Y = aX + b, Y = a*ln(X) + b, and Y = aX + b*ln(X
b. Electricity peak demand vs. population. Test three models and determine which is the "best" model am
4. Secure PH population projections from the PSA website. (http://psa.gov.ph/sites/default/files/attachments
5. Use the data in (4) and the best model in (3b) to project the electricity demand up to 2020.
6. Use your best model in (3a) to project the electricity demand up to 2020.
7. Bonus points for a nice graph showing the observed data and your projections using (5) and (6).
Electricity Demand vs. Population
PH Population Data

Year Demand Population


2000 7138 77991569
2001 7497 79665315
2002 7721 81352060
2003 8275 83031954
2004 8525 84678493
2005 8629 86274237
2006 8760 87809419
2007 8987 89293490
2008 9054 90751864
2009 9472 92220879
2010 10375 93726624
2011 9665 95277940
2012 10005 96866642
2013 11305 98481032
2014 11822 100102249
2015 12213 101716359
2016 13272 103320222

Electricity Demand vs. Time

�=𝒂�+�
X(year) Y(demand) Y/1k Y/1k' Y'
2000 7138 7.138 6.9325882353 6932.5882353
2001 7497 7.497 7.2624485294 7262.4485294
2002 7721 7.721 7.5923088235 7592.3088235
2003 8275 8.275 7.9221691176 7922.1691176
2004 8525 8.525 8.2520294118 8252.0294118
2005 8629 8.629 8.5818897059 8581.8897059
2006 8760 8.76 8.91175 8911.75
2007 8987 8.987 9.2416102941 9241.6102941
2008 9054 9.054 9.5714705882 9571.4705882
2009 9472 9.472 9.9013308824 9901.3308824
2010 10375 10.375 10.231191176 10231.191176
2011 9665 9.665 10.561051471 10561.051471
2012 10005 10.005 10.890911765 10890.911765
2013 11305 11.305 11.220772059 11220.772059
2014 11822 11.822 11.550632353 11550.632353
2015 12213 12.213 11.880492647 11880.492647
2016 13272 13.272 12.210352941 12210.352941

Regression Statistics
Multiple R 0.9599479048
R Square 0.92149998 �=(𝟎.𝟑𝟐𝟗𝟖𝟔�−𝟔𝟓𝟐.𝟕𝟖𝟖)𝟏𝟎𝟎𝟎
Adjusted R 0.9162666453
Standard Er 0.5021132855
Observatio 17

ANOVA
df SS MS F Significance F
Regression 1 44.3935879632 44.3935879632 176.0827538096 1.0809E-09
Residual 15 3.7817662721 0.2521177515
Total 16 48.1753542353

Coefficients Standard Error t Stat P-value Lower 95% Upper 95%


Intercept -652.788 49.9156386427 -13.0778252618 1.3228837492E-09 -759.18067 -546.39533
X Variable 0.3298602941 0.0248583118 13.2696176964 1.0808967872E-09 0.27687606 0.38284453

PH Electricity Demand

�=𝒂�+�
Year Y(demand) X(Population) X/1000k Y'
2000 7138 77991569 77.991569 6876.4021052825
2001 7497 79665315 79.665315 7230.270684494
2002 7721 81352060 81.35206 7586.88755267
2003 8275 83031954 83.031954 7942.0559611417
2004 8525 84678493 84.678493 8290.1723518882
2005 8629 86274237 86.274237 8627.5495059279
2006 8760 87809419 87.809419 8952.1224537772
2007 8987 89293490 89.29349 9265.8893552181
2008 9054 90751864 90.751864 9574.223317085
2009 9472 92220879 92.220879 9884.8070322308
2010 10375 93726624 93.726624 10203.156318087
2011 9665 95277940 95.27794 10531.140366341
2012 10005 96866642 96.866642 10867.028678863
2013 11305 98481032 98.481032 11208.3480281505
2014 11822 100102249 100.102249 11551.1107629881
2015 12213 101716359 101.716359 11892.3709138062
2016 13272 103320222 103.320222 12231.46461205

Regression Statistics
Multiple R 0.9611516879
R Square 0.9238125671 �=(𝟐𝟏𝟏.𝟒𝟐𝟑�−𝟗𝟔𝟏𝟐.𝟖𝟐)𝟏𝟎𝟎𝟎𝟎𝟎𝟎
Adjusted R 0.9187334049
Standard Er 494.661942916
Observatio 17

ANOVA
df SS MS F Significance F
Regression 1 44504997.66875 44504997.668753 181.88286422 8.628E-10
Residual 15 3670356.566541 244690.4377694
Total 16 48175354.23529

Coefficients Standard Error t Stat P-value Lower 95% Upper 95%


Intercept -9612.8177121246 1427.542202975 -6.7338238352 6.7067131363E-06 -12655.552 -6570.0835
X Variable 211.4231067387 15.6767689608 13.4863955236 8.6279913222E-10 178.008865 244.837349

Electricity Demand Projections

Year Population Demand Demand(4b) Demand(4a) Based on 4b, the best model of
2000 77991569 7138 7209.2183084 7531.5624545 �=𝟎.𝟎𝟎𝟏𝟐𝟔�−𝟗𝟓𝟎𝟏𝟗.
2001 79665315 7497 7300.5354925 7636.4936285 where Y is the demand and X is
2002 81352060 7721 7434.9989852 7771.5411384
2003 83031954 8275 7609.5271222 7936.6749055 Based on 4a, the best model of
2004 84678493 8525 7818.351194 8131.8648959 �=𝟔𝟎.𝟑𝟖�−𝟏𝟐𝟎𝟓𝟖𝟓.𝟖
2005 86274237 8629 8055.033915 8357.0811212 where Y is the demand and X is
2006 87809419 8760 8313.4332712 8612.2936372
2007 89293490 8987 8590.8537656 8897.472545
2008 90751864 9054 8889.0484383 9212.5879901 Electr
2009 92220879 9472 9214.2274023 9557.6101624 18000
2010 93726624 10375 9572.5557957 9932.509297 16000
2011 95277940 9665 9967.3724596 10337.255673 14000
12000
2012 96866642 10005 10397.808678 10771.819613
Demand

10000
2013 98481032 11305 10861.386205 11236.171485 8000
6000
2014 100102249 11822 11352.622938 11730.281702 4000
2015 101716359 12213 11866.470379 12254.120718 2000
2016 103320222 13272 12400.760407 12807.659034 0
1995 2000
2017 104,921,400 ??? 12956.998564 13390.867193
2018 106,598,600 ??? 13563.367714 14003.715783
2019 108,274,300 ??? 14192.688419 14646.175435 Dema nd bas
2020 109,947,900 ??? 14843.939772 15318.216824 Origi nal Dem
ment Indicators website. (https://data.worldbank.org/indicator/SP.POP.TOTL?end=2017&locations=PH&start=1999)
atistics data sheet. (https://www.doe.gov.ph/sites/default/files/pdf/energy_statistics/annual_system_peak_demand_per_grid_
cent data points. You may also want to normalize the data points to avoid very very large or very very small regression coefficie
*ln(X) + b, and Y = aX + b*ln(X) + c. Which is the "best" model among the three? Explain using the adjusted r-square statistic.
e which is the "best" model among the three.
tes/default/files/attachments/hsd/pressrelease/Table4_9.pdf)
d up to 2020.

s using (5) and (6).

�=𝒂𝒍𝒏�+�
X(year) ln(X) Y(demand) Y/1k Y/1k'
2000 7.60090246 7138 7.138 6.9298679625
2001 7.60140233 7497 7.497 7.260892352
2002 7.60190196 7721 7.721 7.5917513534
2003 7.60240134 8275 8.275 7.9224451318
2004 7.60290046 8525 8.525 8.2529738522
2005 7.60339934 8629 8.629 8.5833376792
2006 7.60389797 8760 8.76 8.9135367773
2007 7.60439635 8987 8.987 9.2435713107
2008 7.60489448 9054 9.054 9.5734414433
2009 7.60539236 9472 9.472 9.9031473388
2010 7.60589 10375 10.375 10.232689161
2011 7.60638739 9665 9.665 10.562067072
2012 7.60688453 10005 10.005 10.891281236
2013 7.60738143 11305 11.305 11.220331816
2014 7.60787807 11822 11.822 11.549218973
2015 7.60837447 12213 12.213 11.87794287
2016 7.60887063 13272 13.272 12.20650367

Regression Statistics
Multiple R 0.9597414557
R Square 0.9211036617 �=(𝟔𝟔𝟐.𝟐𝟏𝒍𝒏�−𝟓𝟎𝟐𝟔.𝟓)𝟏𝟎𝟎𝟎
Adjusted R 0.9158439058
Standard Err 0.5033791841
Observation 17

ANOVA
df SS MS F
Regression 1 44.3744951912 44.3744952 175.1228919956
Residual 15 3.8008590441 0.2533906
Total 16 48.1753542353

Lower 95.0% Upper 95.0% Coefficients Standard Error t Stat P-value


-759.1806653 -546.39533 Intercept -5026.4962627 380.557359114 -13.208249 1.15276295E-09
0.2768760567 0.38284453 X Variable 1 662.214277506 50.0411267271 13.2334006 1.1227138E-09

�=𝒂𝒍𝒏�+�
Year Y(demand) X(Population) ln(x) Y'
2000 7138 77991569 18.1721113 6775.5667540771
2001 7497 79665315 18.1933449 7177.2326949062
2002 7721 81352060 18.2142967 7573.5697272077
2003 8275 83031954 18.2347361 7960.2121416605
2004 8525 84678493 18.2543722 8331.6600667502
2005 8629 86274237 18.2730416 8684.8203615769
2006 8760 87809419 18.2906793 9018.4658113634
2007 8987 89293490 18.3074391 9335.5037434991
2008 9054 90751864 18.3236396 9641.9600545649
2009 9472 92220879 18.3396971 9945.7135192251
2010 10375 93726624 18.3558928 10252.080988329
2011 9665 95277940 18.3723089 10562.615455063
2012 10005 96866642 18.3888458 10875.436724049
2013 11305 98481032 18.4053745 11188.103819086
2014 11822 100102249 18.4217027 11496.976994628
2015 12213 101716359 18.4376987 11799.566080267
2016 13272 103320222 18.4533437 12095.515063749

Regression Statistics
Multiple R 0.9531735686
R Square 0.9085398519 �=𝟏𝟖𝟗𝟏𝟔.𝟓𝟓𝟔𝒍𝒏�−𝟑𝟑𝟔𝟗𝟕𝟖.𝟐
Adjusted R 0.9024425087
Standard Err541.979398825
Observation 17

ANOVA
df SS MS F
Regression 1 43769229.204034 43769229 149.0058573923
Residual 15 4406125.0312597 293741.669
Total 16 48175354.235294

Lower 95.0% Upper 95.0% Coefficients Standard Error t Stat P-value


-12655.55189 -6570.0835 Intercept -336978.2028 28390.201744537 -11.869525 0.000000005
178.00886466 244.837349 X Variable 1 18916.5564798 1549.6742298575 12.2067955 3.421287603E-09

Based on 4b, the best model of electricity demand vs population is given by:
�=𝟎.𝟎𝟎𝟏𝟐𝟔�−𝟗𝟓𝟎𝟏𝟗.𝟓𝒍𝒏�+𝟏𝟔𝟑𝟓𝟔𝟒𝟒.𝟕𝟕
where Y is the demand and X is the population.

Based on 4a, the best model of electricity demand vs time is given by:
�=𝟔𝟎.𝟑𝟖�−𝟏𝟐𝟎𝟓𝟖𝟓.𝟖𝒍𝒏�+𝟕𝟗𝟓𝟖𝟎𝟑.𝟏
where Y is the demand and X is the time.

Electricity Demand VS Time


18000
16000
14000
12000
Demand

10000
8000
6000
4000
2000
0
1995 2000 2005 2010 2015 2020 2025

Time

Dema nd bas ed on Popul ation Dema nd ba s ed on Ti me


Origi nal Demand
&start=1999)
_peak_demand_per_grid_2016.pdf)
small regression coefficients.
sted r-square statistic.

�=𝒂�+�𝒍𝒏�+�
Y' X(year) ln(X) Y(demand) Y/1k
6929.868 2000 7.60090246 7138 7.138
7260.892 2001 7.601402335 7497 7.497
7591.751 2002 7.60190196 7721 7.721
7922.445 2003 7.602401336 8275 8.275
8252.974 2004 7.602900462 8525 8.525
8583.338 2005 7.60339934 8629 8.629
8913.537 2006 7.603897969 8760 8.76
9243.571 2007 7.604396349 8987 8.987
9573.441 2008 7.604894481 9054 9.054
9903.147 2009 7.605392365 9472 9.472
10232.69 2010 7.605890001 10375 10.375
10562.07 2011 7.60638739 9665 9.665
10891.28 2012 7.606884531 10005 10.005
11220.33 2013 7.607381426 11305 11.305
11549.22 2014 7.607878073 11822 11.822
11877.94 2015 7.608374474 12213 12.213
12206.5 2016 7.608870629 13272 13.272

Regression Statistics
Multiple R 0.9785096019
𝒍𝒏�−𝟓𝟎𝟐𝟔.𝟓)𝟏𝟎𝟎𝟎 R Square 0.957481041 �=(𝟔𝟎.𝟑𝟖�−𝟏𝟐𝟎
Adjusted R Squ 0.9514069039
Standard Error 0.3825073215 This is the best model a
Observations 17 is closest to one (0.9514

ANOVA
Significance F df SS MS
1.1227E-09 Regression 2 46.1269883214 23.0634942
Residual 14 2.0483659139 0.14631185
Total 16 48.1753542353

Lower 95% Upper 95% Lower 95.0%Upper 95.0% Coefficients Standard Error t Stat
-5837.6351 -4215.3575 -5837.6351 -4215.3575 Intercept 795803.0681039 231393.96453816 3.43916951
555.554141 768.874414 555.554141 768.874414 X Variable 1 60.3827749875 17.4471565549 3.46089489
X Variable 2 -120585.824038 35033.74518582 -3.4419907

�=𝒂�+�𝒍𝒏�+�
Year Y(demand) X(Population) ln(x)
2000 7138 77991569 18.1721113
2001 7497 79665315 18.1933449
2002 7721 81352060 18.2142967
2003 8275 83031954 18.2347361
2004 8525 84678493 18.2543722
2005 8629 86274237 18.2730416
2006 8760 87809419 18.2906793
2007 8987 89293490 18.3074391
2008 9054 90751864 18.3236396
2009 9472 92220879 18.3396971
2010 10375 93726624 18.3558928
2011 9665 95277940 18.3723089
2012 10005 96866642 18.3888458
2013 11305 98481032 18.4053745
2014 11822 100102249 18.4217027
2015 12213 101716359 18.4376987
2016 13272 103320222 18.4533437

Regression Statistics
Multiple R 0.9790430291
𝟓𝟔𝒍𝒏�−𝟑𝟑𝟔𝟗𝟕𝟖.𝟐 R Square 0.9585252529 �=𝟎.𝟎𝟎𝟏𝟐𝟔�−𝟗
Adjusted R Squ 0.952600289 This is the best model a
Standard Error 377.7811757459 because its adjusted r-s
Observations 17

ANOVA
Significance F df SS MS
3.4213E-09 Regression 2 46177293.600823 23088647
Residual 14 1998060.6344712 142718.617
Total 16 48175354.235294

Lower 95% Upper 95% Lower 95.0%Upper 95.0% Coefficients Standard Error t Stat
-397490.49 -276465.92 -397490.49 -276465.92 Intercept 1635644.771588 480638.73428233 3.40306483
15613.504 22219.6089 15613.504 22219.6089 X Variable 1 0.0012638072 0.0003076714 4.10765286
X Variable 2 -95019.5387649 27758.542886905 -3.4230737
Y/1k' Y'
7.531562 7531.562 -5217.8
7.636494 7636.494
7.771541 7771.541
7.936675 7936.675
8.131865 8131.865
8.357081 8357.081
8.612294 8612.294
8.897473 8897.473
9.212588 9212.588
9.55761 9557.61
9.932509 9932.509
10.33726 10337.26
10.77182 10771.82
11.23617 11236.17
11.73028 11730.28
12.25412 12254.12
12.80766 12807.66

�=(𝟔𝟎.𝟑𝟖�−𝟏𝟐𝟎𝟓𝟖𝟓.𝟖𝒍𝒏�+𝟕𝟗𝟓𝟖𝟎𝟑.𝟏)𝟏𝟎𝟎𝟎

This is the best model among the three because its r-squared statistic
is closest to one (0.9514).

F Significance F
157.632441 2.5123E-10

P-value Lower 95% Upper 95% Lower 95.0%Upper 95.0%


0.00398965 299512.373 1292093.76 299512.373 1292093.76
0.00382097 22.9623459 97.8032041 22.9623459 97.8032041
0.00396733 -195725.73 -45445.914 -195725.73 -45445.914

Y'
7505.445
7603.134
7744.018
7924.941
8140.033
8382.791
8647.034
8930.104
9233.851
9564.622
9928.682
10329.4
10765.89
11235.61
11733
12253
12793.41

�=𝟎.𝟎𝟎𝟏𝟐𝟔�−𝟗𝟓𝟎𝟏𝟗.𝟓𝒍𝒏�+𝟏𝟔𝟑𝟓𝟔𝟒𝟒.𝟕𝟕
This is the best model among the three for demand vs population
because its adjusted r-squared statistic is closest to one (0.9526)

F Significance F
161.7774 2.111E-10

P-value Lower 95% Upper 95% Lower 95.0%Upper 95.0%


0.00428668 604777.213 2666512.33 604777.213 2666512.33
0.00106608 0.00060392 0.0019237 0.00060392 0.0019237
0.00411943 -154555.69 -35483.386 -154555.69 -35483.386
EE 146: Exercise 1
Problem 4 : Regression Analysis and Curve-fitting

Mean Monthly Household Expenditures ('000 PhP) 703.83 3,085.58


Percent Ownership of Refrigerators in Urban Areas (%) 0.65 1.30

INSTRUCTIONS
1. Fit the data in a Gompertz curve whose function is shown below.

-B x-B3 ( )
( )
f x = B0 + B1e -e 2

2. Force the saturation level of the curve to 100%.


3. Bonus points for a nice plot of the data against your fitted curve.

Curve fitting using the Gompertz function

b0 0X Y
b1 98.2975380162 703.833333333 0.64935065
b2 0.0001184576 3085.58333333 1.2987013
b3 12454.4509795724 3818.25 5.84415584
4281 8.44155844
4666.5 9.74025974
4994.58333333 3.8961039
5344.16666667 11.038961
5660.91666667 10.3896104
5953.58333333 11.6883117
6206.75 12.3376623
6448.83333333 7.14285714
6656.83333333 12.987013
6884.25 16.8831169
7134.83333333 18.1818182
7368.5 17.5324675
7595.58333333 18.8311688
7777.83333333 20.1298701
7970.75 18.8311688
8195.75 20.7792208
8372 24.6753247
8576.83333333 19.4805195
8770 16.8831169
8999.16666667 24.025974
9194.58333333 22.0779221
9433.25 16.8831169
9617.91666667 31.1688312
9825.66666667 25.3246753
10013.4166667 27.2727273
10219.9166667 32.4675325
10401.6666667 29.2207792
10586.5833333 26.6233766
10807.0833333 27.9220779
11011.9166667 31.8181818
11226.6666667 31.8181818
11414.5833333 27.9220779
11611.6666667 31.1688312
11824.6666667 31.1688312
12041.1666667 35.7142857
12258.3333333 27.2727273
12492.25 38.961039
12703.0833333 30.5194805
12903.25 38.961039
13117.5 38.961039
13348.9166667 33.1168831
13581.6666667 35.7142857
13879.0833333 38.3116883
14136 46.1038961
14350.5833333 50
14605.3333333 45.4545455
14825.9166667 46.7532468
15089.3333333 47.4025974
15324.75 45.4545455
15589.5833333 48.7012987
15937.3333333 48.0519481
16209.25 53.8961039
16550.3333333 50
16845.5833333 55.1948052
17144.0833333 61.6883117
17433 56.4935065
17715.6666667 60.3896104
18068.0833333 62.3376623
18379.4166667 56.4935065
18749.4166667 61.038961
19096.0833333 62.987013
19526.5833333 68.8311688
19903.3333333 65.5844156
20321.4166667 64.2857143
20698.25 68.1818182
21114.4166667 70.7792208
21534.4166667 73.3766234
21961.25 67.5324675
22372.3333333 70.7792208
22927.75 70.1298701
23418.5 73.3766234
23988.75 77.9220779
24548.9166667 76.6233766
25130.5833333 83.1168831
25778.6666667 83.1168831
26407.8333333 81.1688312
27056.25 81.8181818
27748.75 85.7142857
28541.4166667 83.1168831
29345.5 87.6623377
30366.5833333 87.012987
31277.1666667 86.3636364
32246.5 85.0649351
33267.6666667 91.5584416
34465.3333333 88.961039
35996.5 90.2597403
37390.5833333 92.8571429
38809.5833333 94.8051948
40785.5 93.5064935
43028.4166667 95.4545455
45362.4166667 98.7012987
48469.25 96.7532468
52682.9166667 96.7532468
58219 97.4025974
66290.4166667 99.3506494
77826.4166667 98.7012987
101036 99.2125984
3,818.25 ### ### 4,994.58 5,344.17 5,660.92 5,953.58
5.84 8.44 9.74 3.90 11.04 10.39 11.69

Y' error^2 sumerror


1.7599979951 1.2335375266 843.5641069
4.7313299154 11.78293922 Expenditures VS Owne
6.0885288326 0.0597181575 120
7.0623594081 1.9021899738
7.9432458404 3.2292589561
8.7426704884 23.489207733 100
9.6443708457 1.9448818071
10.5052077253 0.013362744
11.3369362527 0.1234646968 80

12.0839699394 0.0643598329
12.8216567942 32.24876548 60
13.4732883913 0.2364637688
14.2040973984 7.1771453997
15.0309047322 9.9282555671 40
15.8215803177 2.9271350617
16.6075197952 4.9446150353
17.250348285 8.291646055 20
17.9420738616 0.790489865
18.7629157595 4.0654859326
0
19.4160600227 27.659864686 0 20000 40000 60000 80000
20.1858285927 0.4974609437
20.9218116926 16.311055765
21.8069464495 4.924083385
22.5714239558 0.2435441034
23.5164221615 44.000738916
24.2555950136 47.792834138
25.0948955064 0.0527987649
25.8599355568 1.9959804325
26.7079734574 33.172519992
27.4596117673 3.1017107991
28.2289295678 2.5778002575
29.1517205932 1.5120210987
30.0136300937 3.2564069263
30.921452681 0.8041231456
31.7188370266 14.415379698
32.5576147505 1.9287198368
33.4664334616 5.2789762959
34.3920055179 1.7484249178
35.321625623 64.784764652
36.3235595038 6.9562978874
37.2265373776 44.984611698
38.0832350843 0.7705396461
38.9990330545 0.0014435511
39.9862236817 47.187839795
40.9763620645 27.689447515
42.2365569401 15.404593751
43.31966265 7.7519559255
44.2197845388 33.410890778
45.2824009421 0.0296337332
46.1967211349 0.3097207639
47.2809101972 0.014807776
48.2422342197 7.7712086515
49.3144614133 0.3759685114
50.7065292487 7.0468013303
51.7816878396 4.47075526
53.1127895161 9.6894585717
54.2484988634 0.8954956728
55.3804496418 39.789123598
56.4599425329 0.0011265394
57.5002799569 8.3482303496
58.7748373449 12.693721929
59.8795518393 11.465303084
61.1659385616 0.0161232913
62.344634319 0.4126503531
63.7720535313 25.594647617
64.9878748428 0.3558608564
66.3003341096 4.0586930349
67.450047546 0.5354882634
68.6831100216 4.3936803082
69.8886206397 12.166163093
71.0739211599 12.541893795
72.1778499746 1.9561636261
73.6114391591 12.121322906
74.8235819153 2.0936890126
76.1691515306 3.0727509339
77.426636738 0.6452268117
78.6668632938 19.802676426
79.9726486003 9.8862106955
81.1664651465 5.5980616E-06
82.3238052184 0.2556550229
83.4816669457 4.9845865657
84.7129995838 2.5475877759
85.8654728242 3.2287232465
87.1984526831 0.0343975148
88.2732930111 3.6467885111
89.3092996397 18.014630643
90.290407905 1.6079093464
91.3108637457 5.5216765187
92.4344727983 4.7294616142
93.3038770906 0.1995714753
94.0595905688 0.5559256774
94.9286425103 2.0225077889
95.704210127 0.0623324486
96.3242949604 5.6501467845
96.9276029252 0.0304000747
97.4636241863 0.5046360973
97.863823894 0.2127298764
98.1305995224 1.4885215835
98.2549432381 0.1992331996
98.2948127038 0.8423306304
6,206.75 6,448.83 6,656.83 6,884.25 7,134.83 7,368.50 7,595.58 7,777.83 7,970.75
12.34 7.14 12.99 16.88 18.18 17.53 18.83 20.13 18.83

Expenditures VS Ownership

Y
Y'

60000 80000 100000 120000


8,195.75 8,372.00 8,576.83 8,770.00 8,999.17 9,194.58 9,433.25 9,617.92 9,825.67
20.78 24.68 19.48 16.88 24.03 22.08 16.88 31.17 25.32
10,013.42 10,219.92 10,401.67 10,586.58 10,807.08 11,011.92 11,226.67 11,414.58
27.27 32.47 29.22 26.62 27.92 31.82 31.82 27.92
11,611.67 11,824.67 12,041.17 12,258.33 12,492.25 12,703.08 12,903.25 13,117.50
31.17 31.17 35.71 27.27 38.96 30.52 38.96 38.96
13,348.92 13,581.67 13,879.08 14,136.00 14,350.58 14,605.33 14,825.92 15,089.33
33.12 35.71 38.31 46.10 50.00 45.45 46.75 47.40
15,324.75 15,589.58 15,937.33 16,209.25 16,550.33 16,845.58 17,144.08 17,433.00
45.45 48.70 48.05 53.90 50.00 55.19 61.69 56.49
17,715.67 18,068.08 18,379.42 18,749.42 19,096.08 19,526.58 19,903.33 20,321.42
60.39 62.34 56.49 61.04 62.99 68.83 65.58 64.29
20,698.25 21,114.42 21,534.42 21,961.25 22,372.33 22,927.75 23,418.50 23,988.75
68.18 70.78 73.38 67.53 70.78 70.13 73.38 77.92
24,548.92 25,130.58 25,778.67 26,407.83 27,056.25 27,748.75 28,541.42 29,345.50
76.62 83.12 83.12 81.17 81.82 85.71 83.12 87.66
30,366.58 31,277.17 32,246.50 33,267.67 34,465.33 35,996.50 37,390.58 38,809.58
87.01 86.36 85.06 91.56 88.96 90.26 92.86 94.81
40,785.50 43,028.42 45,362.42 48,469.25 52,682.92 58,219.00 66,290.42 77,826.42
93.51 95.45 98.70 96.75 96.75 97.40 99.35 98.70
101,036.00
99.21

You might also like