QT Assignment 2

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 26

ASSIGNMENT SUBMITTED

BY:
RAMANJOT KAUR
20201107
MITTED
REGRESSION

Past 12 years of India's electricity consumption wrt its production is given(in lakhs). The government w
PROBLEM the consumption which shall help them decide about any policy change in regards to pricing of electri
Using alpha=0.05, Conduct regression analysis and convey your results.

ELECTRICITY PRODUCTION AND USAGE


SOLUTION Total Production(X) Final Usage(Y) X^2 XY Yest
15.83 12.01 250.5889 190.1183 12.00967
15.19 11.53 230.7361 175.1407 11.49449
14.49 10.99 209.9601 159.2451 10.931
13.57 10.18 184.1449 138.1426 10.19042
12.86 9.63 165.3796 123.8418 9.61889
11.84 8.62 140.1856 102.0608 8.797814
11.14 8.23 124.0996 91.6822 8.234331
10.59 7.74 112.1481 81.9666 7.791594
9.74 7.2 94.8676 70.128 7.107364
9.08 6.58 82.4464 59.7464 6.576079
8.45 6.14 71.4025 51.883 6.068944
8.14 5.79 66.2596 47.1306 5.819401
140.92 104.64 1732.219 1291.086
11.7433333333333 8.72
b1 0.80498
b0 -0.73 Intercept

SUMMARY OUTPUT

Regression Statistics
Multiple R 0.999464
R Square 0.998928
Adjusted R 0.998821
Standard E 0.073337
Observatio 12

ANOVA
df
Regression 1
Residual 10
Total 11

Coefficients
Intercept -0.733108
Total Produ0.804977

RESIDUAL OUTPUT

ObservatioPredicted F
1 12.00967
2 11.49449
3 10.931
4 10.19042
5 9.61889
6 8.797814
7 8.234331
8 7.791594
9 7.107364
10 6.576079
11 6.068944
12 5.819401

INTERPRETATION As p-value is less than alpha value , Reject Ho.Moreover R^2 is 0.99 which is strong goodness

Thus Total usage/production of electricity is affected by production of the electricity. Thus Gov
APPLICATION electricity keeping in mind the historical behaviour of consumption wrt to production

SOURCE https://www.iea.org/data-and-statistics/data-tables?country=INDIA&energy=Electricity&year=2018
REGRESSION

on is given(in lakhs). The government wants to predict the demand of electricity based on
y change in regards to pricing of electricity .
results.

(Y-Yest)^2 (Yest-ybar)^2 (Y-Ybar)^2


1.0841422E-07 10.8219335569 10.8241
0.0012612612 7.69777123308 7.8961 MSR 50.12082
0.0034807414 4.8885306922 5.1529 MSE 0.005378
0.0001086554 2.16214611561 2.1316 F test 9319.07
0.000123422 0.80800404864 0.8281 F critical 4.964603
0.03161796 0.00605508046 0.01
1.8756082E-05 0.23587454344 0.2401
0.002661914 0.86193818389 0.9604
0.0085814854 2.60059585987 2.3104
1.5372787E-05 4.59639645942 4.5796
0.0050489588 7.02809805355 6.6564
0.0008644335 8.41347310392 8.5849
0.053783069 50.120816931 50.1746
SSE SSR SST
Coefficient of determination 0.9989280818 (r^2)
Coefficient of Correlation 0.9994638972

Ho y intercept is not significant


Ha y intercept is significant

Ho coefficient of X is not significant


Ha coefficient of X is significant

SS MS F Significance F
50.120816931 50.120816931 9319.0697035 3.484E-16
0.053783069 0.0053783069
50.1746

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


Upper 95.0%
0.1001861556 -7.3174548674 2.5486922E-05 -0.956336 -0.509879 -0.956336 -0.509879
0.0083386729 96.5353287845 3.484199E-16 0.786397 0.823556 0.786397 0.823556

Residuals
0.0003292632
0.0355142399
0.0589978082
-0.0104237878
0.0111095458
-0.1778143975
-0.0043308292
-0.0515937398
0.0926363074
0.0039208146
0.0710560261
-0.0294012508

r R^2 is 0.99 which is strong goodness of fit

production of the electricity. Thus Government can control prices of


onsumption wrt to production

y=INDIA&energy=Electricity&year=2018
MULTIPLE REGRESSI
A study was conducted to see if electricity is dependent upon House area and average monthly
PROBLEM alpha=0.05. This is done to see if any relationship can be developed between consumption of el
so determine the demand and price patterns accordingly.

INDEPENDENT VARIABLE
SOLUTION Y X1 X2
Electricity Consumption House area Average monthly income
560.48 742.57 ₹ 9,675.93
633.28 952.99 ₹ 35,064.79
511.87 761.44 ₹ 22,292.44
332.99 861.32 ₹ 12,139.08
658.28 731.61 ₹ 17,230.10
793.24 837.24 ₹ 24,661.81
570.38 679.04 ₹ 28,184.43
585.4 1044.65 ₹ 16,912.69
653.2 731.9 ₹ 26,058.28
606.01 734.43 ₹ 22,545.50

SUMMARY OUTPUT

Regression Statistics
Multiple R 0.473946137819465
R Square 0.224624941553987
Adjusted R Square 0.00308921056941174
Standard Error 117.916137452614
Observations 10

ANOVA
df SS
Regression 2 28196.2063077937
Residual 7 97329.5083022063
Total 9 125525.71461

Coefficients Standard Error


Intercept 484.40019234951 294.600076643148
House area -0.0621262501105221 0.339375900564116
Average monthly income 0.00727741130428395 0.00513473985350605

RESIDUAL OUTPUT
Observation Predicted Electricity bill Residuals
1 508.6828251664 51.7971748336001
2 680.375396385027 -47.0953963850266
3 599.326035321426 -87.4560353214258
4 519.230688619922 -186.240688619922
5 564.338531020094 93.9414689799061
6 611.85974558508 181.380254414921
7 647.323672961261 -76.9436729612609
8 542.580606563403 42.8193934365967
9 628.566811335815 24.6331886641847
10 602.845687041573 3.16431295842688

INTERPRETATION As p-value >alpha,Do not Reject Ho.

APPLICATION This will help the electricity companies to determine using the regression equation that the inc
elasticity of income will determine the demand of electricity and accordingly its price can be de

SOURCE https://www.kaggle.com/gireeshs/household-monthly-electricity-bill
REGRESSION
rea and average monthly income or not. To check this regression using
etween consumption of electricity wrt to House area and average monthly income

EXTRACT
Coefficients
Intercept 484.4001923
House area -0.06212625
Average monthl 0.007277411

Regression equation 484.40-0.06X1+0.007X2

MS F Significance F
14098.1 1.0139445251 0.41047942585
13904.22

t Stat P-value Lower 95% Upper 95% Lower 95.0% Upper 95.0%
1.644264 0.144120634 -212.2182934 1181.0186781 -212.2182934 1181.0186781
-0.18306 0.859940005 -0.864622735 0.7403702348 -0.864622735 0.7403702348
1.417289 0.199335111 -0.0048643191 0.0194191417 -0.0048643191 0.0194191417
sion equation that the income level of the consumers effect the demand of electricity. Thus the
ordingly its price can be decided upon.
FORECAS
Simple averag

Certain investors want to forecast the share price of Colgate using closing prices of stock from 1
PROBLEM sell the shares right now or not. So using a simple average method determine if this method is a

SOLUTION Date Closing price Forecast Error Abs Error Abs Error %
1-Dec-20 1503.8
2-Dec-20 1519.55
3-Dec-20 1538.35
4-Dec-20 1541.2 1520.567 20.633333 20.63333333 1.3387836318
7-Dec-20 1543.2 1533.033 10.166667 10.16666667 0.6588042163
8-Dec-20 1564.5 1540.917 23.583333 23.58333333 1.5074038564
9-Dec-20 1567.6 1549.633 17.966667 17.96666667 1.1461257123
10-Dec-20 1586.1 1558.433 27.666667 27.66666667 1.7443204506
11-Dec-20 1575.4 1572.733 2.6666667 2.666666667 0.1692691803
14-Dec-20 1625.25 1576.367 48.883333 48.88333333 3.0077423986
15-Dec-20 1606.35 1595.583 10.766667 10.76666667 0.6702565858
16-Dec-20 1611.9 1602.333 9.5666667 9.566666667 0.5935024919
17-Dec-20 1602.3 1614.5 -12.2 12.2 0.7614054796
18-Dec-20 1599.45 1606.85 -7.4 7.4 0.462659039
19-Dec-20 1604.55 17.40909091 1.096388458
MAD MAPE

As the MAPE is 1.09 which is a lower value it shows that the accuracy of the predicted data is hi
INTERPRETATION

APPLICATION Thus we can say that the investor not sell the stock right now and should wait for the price to ri

SOURCE https://www.moneycontrol.com/stocks/hist_stock_result.php?ex=B&sc_id=CPI&mycomp=Colgate%
FORECASTING
Simple average method

closing prices of stock from 1 December to 18 December and to know if it would be profitable to
d determine if this method is a proftable investment or not.

Square error

425.73444444
103.36111111
556.17361111
322.80111111
765.44444444
7.1111111111
2389.5802778
115.92111111
91.521111111
148.84
54.76
452.8407576 21.28006
MSE RMSE

acy of the predicted data is high. The chances of accuracy of this data is really high

should wait for the price to rise as predicted using the forecast technique.

&sc_id=CPI&mycomp=Colgate%20Palmolive%20%20India
FORECASTING
Weighted average method

PROBLEM The management wants to forecast the sales of Iphone based on the previous years (sales in m
inventory required in advance. Using weighted avearge method determine if the sales is likely
required actions

SOLUTION Year Sales Forecast Error Abs Error Abs Error %


2007 1.39
2008 11.63
2009 20.73
2010 39.99 14.132 25.858 25.858 64.661165291
2011 72.29 28.54 43.75 43.75 60.520127265
2012 125.05 52.288 72.762 72.762 58.18632547
2013 150.26 92.21 58.05 58.05 38.633036071
2014 169.22 127.103 42.117 42.117 24.888902021
2015 231.22 154.698 76.522 76.522 33.094887985
2016 211.88 196.428 15.452 15.452 7.2928072494
2017 216.76 209.15 7.61 7.61 3.5107953497
2018 217.72 218.188 -0.468 0.468 0.2149549881
2019 216.264 38.06544 32.33366685
MAD MAPE

INTERPRETATION The MAPE is 32.33 which means there is lot of deviation from the forecasted figures as it shou

APPLICATION The manager should look into the sales as there is a lot of deviation. An investigation into wha

SOURCE https://www.statista.com/statistics/276306/global-apple-iphone-sales-since-fiscal-year-2007/
FORECASTING
Weighted average method

e based on the previous years (sales in millions), which can help them decide the price or
e method determine if the sales is likely to fall or rise so that the management take the

Square error

668.636164
1914.0625
5294.308644
3369.8025
1773.841689
5855.616484
238.764304
57.9121
0.219024
2130.3514898889 46.15573085
MSE RMSE

on from the forecasted figures as it should not be more than +-10%.

ot of deviation. An investigation into what is going wrong and how it should be eliminated should ideally be the next step.

-iphone-sales-since-fiscal-year-2007/
he next step.
FORECA
Smoothing
PROBLEM The sales manager of Walmart wants to forecast the sales of the 2021, so that they can decide th
smoothing average method determine if the sales is likely to fall or rise so that the management

SOLUTION Year Sales Forecast Error Abs Error Abs Error % Square error
2008 373.82
2009 401.09 373.82 27.27 27.27 6.7989727991 743.6529
2010 404.74 392.909 11.831 11.831 2.9231111331 139.972561
2011 318.5 401.1907 -82.6907 82.6907 25.962543171 6837.7518665
2012 443.42 343.3072 100.1128 100.11279 22.5774187 10022.570722
2013 465.6 413.3862 52.21384 52.213837 11.21431207 2726.2847743
2014 473.08 449.9358 23.14415 23.1441511 4.8922277627 535.65173014
2015 482.23 466.1368 16.09325 16.09324533 3.3372551127 258.99254525
2016 478.61 477.402 1.207974 1.207973599 0.2523920518 1.4592002159
2017 481.32 478.2476 3.072392 3.0723920797 0.638326286 9.4395930914
2018 495.76 480.3983 15.36172 15.361717624 3.0986198209 235.98236836
2019 410.33 491.1515 -80.82148 80.821484713 19.696703803 6532.1123912
2020 519.93 434.5764 85.35355 85.353554586 16.416355007 7285.2292805
2021 494.3239 41.59773717 9.817353143 2944.091661
MAD MAPE MSE

The MAPE is 9.81 which means that there isn't much deviation from the forecasted sales value
INTERPRETATION

APPLICATION The sales forecasted are more thus we can expect more sales and hence we need to keep so
to meet the demand

SOURCE https://www.statista.com/statistics/183399/walmarts-net-sales-worldwide-since-2006/
FORECASTING
Smoothing average method
that they can decide the price or inventory required in advance. Using
o that the management take the required actions

54.25948
RMSE

e forecasted sales value of walmart.

ce we need to keep some inventory intact

since-2006/
F

PROBLEM The stock price of Trident has been strongly observed by an investor and its price in future been for
Find out if the investor should invest in this particular stock right now or not

Date(X) Date(X) Closing price(Y)


1-Dec-20 1 7.97
SOLUTION 2-Dec-20 2 8.2
3-Dec-20 3 9.04
4-Dec-20 4 9.18
7-Dec-20 5 9.97
8-Dec-20 6 10.16
9-Dec-20 7 10.14
10-Dec-20 8 9.78
11-Dec-20 9 9.87
14-Dec-20 10 9.95
15-Dec-20 11 9.81
16-Dec-20 12 9.77
17-Dec-20 13 9.66
18-Dec-20 14 9.4

SUMMARY OUTPUT

Regression Statistics
Multiple R 0.597898797359194
R Square 0.35748297188357
Adjusted R Square 0.303939886207201
Standard Error 0.56833846258951
Observations 14

ANOVA
df SS
Regression 1 2.156582417582
Residual 12 3.8761032967033
Total 13 6.032685714286

Coefficients Standard Error


Intercept 8.76263736263736 0.320837667928
Date(X) 0.0973626373626374 0.037680473158
Predicted share price 10.2230769230769

RESIDUAL OUTPUT

Observation Predicted Closing price(Y) Residuals


1 8.86 -0.89
2 8.95736263736264 -0.757362637363
3 9.05472527472528 -0.014725274725
4 9.15208791208791 0.027912087912
5 9.24945054945055 0.720549450549
6 9.34681318681319 0.813186813187
7 9.44417582417583 0.695824175824
8 9.54153846153846 0.238461538462
9 9.6389010989011 0.231098901099
10 9.73626373626374 0.213736263736
11 9.83362637362638 -0.023626373626
12 9.93098901098901 -0.160989010989
13 10.0283516483517 -0.368351648352
14 10.1257142857143 -0.725714285714

INTERPRETATION As the MAPE is 4.55, the prediction is quite accurate and hence it means there won't be deviati

APPLICATION Thus the investor should buy the stock of trident as it is available at a cheap price right now

SOURCE https://www.moneycontrol.com/stocks/hist_stock_result.php?ex=B&sc_id=AI01&mycomp=Triden
FORECASTING
Trend analysis

vestor and its price in future been forecasted using trend analysis. Alpha =0.05.
ht now or not

Predicted Closing price(X) Error Abs Error Abs Error % Square error
8.86313272877214 -0.893133 0.893132729 11.206182293 0.7976860712
8.93599340478204 -0.735993 0.735993405 8.9755293266 0.5416862919
9.00885408079193 0.031146 0.031145919 0.3445345045 0.0009700683
9.08171475680183 0.098285 0.098285243 1.0706453507 0.009659989
9.30029678483106 0.669703 0.669703215 6.7171837028 0.4485023964
9.37315746084096 0.786843 0.786842539 7.7445131807 0.6191211814
9.44601813685085 0.693982 0.693981863 6.8440025952 0.4816108264
9.51887881286075 0.261121 0.261121187 2.6699507887 0.0681842744
9.59173948887064 0.278261 0.278260511 2.8192554319 0.0774289121
9.81032151690033 0.139678 0.139678483 1.4038038502 0.0195100786
9.88318219291023 -0.073182 0.073182193 0.7459958503 0.0053556334
9.95604286892012 -0.186043 0.186042869 1.9042258845 0.0346119491
10.02890354493 -0.368904 0.368903545 3.8188772767 0.1360898255
10.1017642209399 -0.701764 0.701764221 7.4655768185 0.4924730218
10.2230769230769 0.422716994 4.5521626325 0.2666350371 0.5163671534
MAD MAPE MSE RMSE

MS F Significance F
2.15658241758242 6.676548 0.023925198
0.323008608058608

t Stat P-value Lower 95% Upper 95% Lower 95.0% Upper 95.0%
27.3117474616521 3.578E-12 8.063592136 9.4616825898 8.0635921355 9.4616825898
2.58390166585047 0.023925 0.015263939 0.1794613357 0.015263939 0.1794613357
hence it means there won't be deviation from predicted price more than +-10%

available at a cheap price right now

p?ex=B&sc_id=AI01&mycomp=Trident
EXTRACT
Coefficients
Intercept 8.76263736263736
Date(X) 0.097362637362637
Predicted share price 10.223076923
As an investor a company wants to decide if they should buy or hold the
PROBLEM price set by the brokers namely Motilal Oswal and ICICIdirect.com. Whi
approach.

Buy Neutral/Hold Max


Tata motors $ 230.00 $ 146.00 $ 230.00
SOLUTION ITC $ 73.40 $ 900.00 $ 900.00
Weights 0.2 0.8

INTERPRETATION The highlighted values would be the choice of the investor according to
against the stocks of Tata Motors and ITC.

The investor's inclination is ought to be towards ITC stocks as in all the


APPLICATION

SOURCE https://www.moneycontrol.com/
hey should buy or hold the shares of Tata motors and ITC in a given scenario as per the target
and ICICIdirect.com. Which decision should the co. take using Max-min approach and EMV

Min EMV
$ 146.00 $ 162.80
$ 73.40 $ 734.68

the investor according to the optimististic or pessimisted approach followed by the investor

rds ITC stocks as in all the conditions the desirable option comes out to be ITC.
A Volkswagen manufacturing company's front brake parts are critical for operations of the car
PROBLEM failure of the unit during the lifetime of installation is given. If the spare isn't available replace
optimal no. of spares ordered

Failure 0 1 2 3 4
Probability 0.25 0.15 0.2 0.15 0.5

Failure
SOLUTION COST 0 1 2 3 4
0 0 12.175 24.35 36.525 48.7
1 3 3 15.175 27.35 39.525
2 6 6 6 18.175 30.35
3 9 9 9 9 21.175
4 12 12 12 12 12
all the figures are in '000

INTERPRETATION Our desirable cost is Rs 15000 which is the least cost arrived using EMV

APPLICATION Thus we have minimum cost 4 spare parts in stock. That is the desirable no. we need to h

SOURCE https://www.mycarhelpline.com/index.php?option=com_easyblog&view=entry&id=480&Itemid=
http://www.vicky.in/spare-parts/volkswagen-vento-spare-parts/
or operations of the car. The spare of the front brake costs Rs 3000 per unit. The probability distribution for the
e isn't available replacement cost will be Rs 12175. Unused spares have no salvage value . Determine the

EMV
37
28
22
17
15 MIN COST

g EMV

irable no. we need to have In stock. Thus also ensuring minimum cost for overall benefit of the firm.

=entry&id=480&Itemid=91

You might also like