17010037 - a4 & 5.pdf

Upload: muhammad-rizwan-asim

Post on 07-Jul-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/18/2019 17010037 - A4 & 5.pdf

    1/15

     

    ASSIGNMENT 4 

    SAM

    OCTOBER 20, 2015

    RIZWAN ASIM

    2017-01-0037

  • 8/18/2019 17010037 - A4 & 5.pdf

    2/15

    17010037

    SAM

     ASSIGNMENT 4

    Assignment 4

    Q1:

    A)  Scatter Plot

    Figure 1 Figure 2

    From above plots it is clear that R 2 has best possible value when we use quadratic function of age

    and ln(length).

    B) Is there a linear relationship between age and length?

    As explained by the scatter plots in question that there is no linear relation between age and length.The R square is better in case of quadratic relationship. R square increases to 0.744 when quadratic

    relation is considered using ln transformation.

    Table 1

  • 8/18/2019 17010037 - A4 & 5.pdf

    3/15

    17010037

    SAM

     ASSIGNMENT 4

    C) Propose a best fit model to estimate a length of bluegill given the age is equal to 2 years.

    Best fir model is given by the following equation.

    Ln (length) = -0.064 (age)2 + 0.601(age) + 3.661

    At Age =2 Average Length of bluegill = 100.18 mm Table 2

    D) On average, at what age a bluegill reaches its maximum length?

    On average at age of 4.7, length will be maximum

    Q 2

    A) Run a scatter plot to find out a possible relationship between temperature and yield.

    From scatter plot it is clear that, best possible relation between temp and yield is quadratic. There

    is a sudden increase in value of R 2 when we change it from linear to quadratic. (From 0.092 to

    0.673)

    Figure 3 

  • 8/18/2019 17010037 - A4 & 5.pdf

    4/15

    17010037

    SAM

     ASSIGNMENT 4

    B) Propose a best fit model. 

    Table 3

    The best fit model explained by regression is given below

    yield = 0.001(Temp)2 - 0.154(Temp) + 7.960

    C) Write a detailed interpretation of the model. (hint: coefficient, R2, significance of the model, model

    assumptions).

    Table 4

    62% of variation in yield is explained by independent variable temp in this model. Yield is decreasing at a

    constant decreasing rate at 2.0 it reaches its lowest value at a temp of 77 after which its start increasing.

    The coefficients of independent variables are statistically significant and have expected signs.

  • 8/18/2019 17010037 - A4 & 5.pdf

    5/15

    17010037

    SAM

     ASSIGNMENT 4

    Evaluating Assumptions

    Residuals follow normal probability distribution.

    Fig 1

    It’s very much clear from figure I that residuals follow normal distribution.

    Variation of residual along regression

    Fig 2

    It’s clear from fig 2 that no heteroscedasticity with is model. 

    No Auto Correlation.

    Model’s Durbin Watson is 2.284 which lies in the acceptable range, therefore in this case NullHypothesis i.e. there is no autocorrelation.

    Multicollinearity

    From table 3, it’s clear that VIF value is greater than 10, but this collinearity is because of temp 2 

    directly depends upon value of temp. so there is no multi-collinearity.

  • 8/18/2019 17010037 - A4 & 5.pdf

    6/15

    17010037

    SAM

     ASSIGNMENT 4

    Linear relation

    Scatter plot shows a very weak linear relationship.

    Q: 3

    A) Run a scatter plot to find out a possible relationship between speed and economy? 

    Best relation is explained by quadratic model. R square for quadratic is 0.965.

    Table 5

    Model Summary 

    Model R R Square Adjusted R

    Square

    Std. Error of the

    Estimate

    1 .982a  .965 .957 .5139

    a. Predictors: (Constant), Speed, Speed2

    Fig 3 

    B) Propose a best fit model. 

    Coefficients a 

    Model Unstandardized Coefficients Standardized

    Coefficients

    t Sig.

    B Std. Error Beta

    1

    (Constant) 13.472 .936 14.396 .000

    Speed2 -.008 .001 -5.168 -14.568 .000

    Speed .746 .049 5.446 15.350 .000

    a. Dependent Variable: Economy

    Fuel economy = -0.008(Speed)2 + 0.746(Speed) + 13.47

  • 8/18/2019 17010037 - A4 & 5.pdf

    7/15

    17010037

    SAM

     ASSIGNMENT 4

    C) Find the speed that maximizes a Honda car’s fuel economy.

    Y= Fuel economy

    X = Speed

    Y=-0.008x2 +0.746x + 13.472

    Taking derivative

    2*-0.008x + 0.746 = 0

    X = 46.625

    The exact speed that maximizes the economy is 46.625 mile/hour

  • 8/18/2019 17010037 - A4 & 5.pdf

    8/15

     

    ASSIGNMENT 5 

    SAM

    OCTOBER 20, 2015

    MUHAMMAD RIZWAN ASIM

    2017 – 01 - 0037

  • 8/18/2019 17010037 - A4 & 5.pdf

    9/15

    17010037

    SAM

     Assignment 5

    Page 8 of 1

    Assignment 5

    A)  Has advertisement impacted the sales positively?

    There is a strong positive correlation between sales and advertisements, which is clear from

    Correlation matrix and scatter plot.

    Table 1

    Correlations 

    Sales (1000s) Advertising (1000s)

    Sales (1000s)

    Pearson Correlation 1 .957** 

    Sig. (2-tailed) .000

    N 36 36

     Advertising (1000s)

    Pearson Correlation .957**  1

    Sig. (2-tailed) .000

    N 36 36

    **. Correlation is significant at the 0.01 level (2-tailed).

    Figure 1

  • 8/18/2019 17010037 - A4 & 5.pdf

    10/15

    17010037

    SAM

     Assignment 5

    Page 8 of 2

    Regression Model:

    Table 2

    Model Summary c 

    Model R R Square Adjusted R Square Std. Error of the

    Estimate

    Durbin-Watson

    1 .963a  .926 .920 4.1491

    2 .998b  .995 .992 1.3255 2.165

    a. Predictors: (Constant), Y2014, Y2013, Advertising (1000s)

    b. Predictors: (Constant), Y2014, Y2013, Advertising (1000s), May, Jun, Sep, Jul, Mar, Oct, Apr, Aug, Dec,

    Feb, Nov

    c. Dependent Variable: Sales (1000s)

    Table 3

    ANOVA a 

    Model Sum of Squares df Mean Square F Sig.

    1 Regression 6943.944 3 2314.648 134.453 .000b 

    Residual 550.888 32 17.215

    Total 7494.832 35

    2 Regression 7457.938 14 532.710 303.219 .000c 

    Residual 36.894 21 1.757

    Total 7494.832 35

    a. Dependent Variable: Sales (1000s)

    b. Predictors: (Constant), Y2014, Y2013, Advertising (1000s)

    c. Predictors: (Constant), Y2014, Y2013, Advertising (1000s), May, Jun, Sep, Jul, Mar, Oct, Apr, Aug, Dec,

    Feb, Nov

  • 8/18/2019 17010037 - A4 & 5.pdf

    11/15

    17010037

    SAM

     Assignment 5

    Page 8 of 3

    Table 4

    Coefficients a 

    Model Unstandardized

    Coefficients

    Standardize

    d

    Coefficients

    t Sig. Collinearity

    Statistics

    B Std. Error Beta Toleran

    ce

    VIF

    1 (Constant) 36.934 9.773 3.779 .001

     Advertising

    (1000s)

    12.577 1.548 1.061 8.126 .000 .135 7.418

    Y2013 1.294 2.557 .041 .506 .616 .345 2.901

    Y2014 -3.591 4.512 -.120 -.796 .432 .102 9.821

    2 (Constant) 49.331 5.731 8.608 .000

     Advertising

    (1000s)

    8.727 1.014 .736 8.602 .000 .032 31.226

    Y2013 6.295 1.379 .201 4.565 .000 .121 8.267

    Y2014 6.572 2.777 .219 2.367 .028 .027 36.459

    Feb 10.046 1.095 .192 9.171 .000 .532 1.878

    Mar 11.049 1.124 .212 9.828 .000 .505 1.978

     Apr 15.030 1.108 .288 13.568 .000 .521 1.921

    May 12.931 1.242 .248 10.414 .000 .414 2.413

    Jun 11.510 1.333 .220 8.636 .000 .360 2.780

    Jul 12.213 1.416 .234 8.625 .000 .319 3.138

     Aug 15.149 1.507 .290 10.055 .000 .281 3.553

    Sep 15.270 1.394 .293 10.952 .000 .329 3.043

    Oct 14.040 1.483 .269 9.465 .000 .290 3.444

    Nov 8.280 1.680 .159 4.928 .000 .226 4.418

    Dec 15.275 1.485 .293 10.286 .000 .290 3.452

    a. Dependent Variable: Sales (1000s)

    Q2: The management believes that the month of March has been the most successful month in terms of

    sales generation. Is it correct?

    From Table 4, it is clear that with reference to January sales for month of march are 11.049 thousand

    more when sales of other months are constant. But this is not highest value, so sales for month of march

    are not most successful.

  • 8/18/2019 17010037 - A4 & 5.pdf

    12/15

    17010037

    SAM

     Assignment 5

    Page 8 of 4

    Q3: What are the most successful and the unsuccessful months for the sales?

    From table 4, it is clear that with reference to January sales of Dec are 15.275 thousand are more when

    all other months’ sales are constant and its most successful month. 

    From table 4, it’s clear that with reference to January sales of Nov are 8.28 thousand are more when all

    other months’ sales are constant and its most unsuccessful month. 

    Q4: What is the annual sales growth? What is the quarterly growth?

    Annual Turnover:

    From Table 4, it is clear that with reference to 2012 sales of 2013 6.295 more while all other factors are

    constant. Sales of 2014 are 6.572 more than 2012.

    Quarterly:

    Table 5

    Coefficients a 

    Model Unstandardized Coefficients Standardized

    Coefficients

    t Sig.

    B Std. Error Beta

    1 (Constant) 33.344 13.942 2.392 .023

    Y2012 3.591 4.512 .117 .796 .432

    Y2013 4.885 2.871 .156 1.701 .099

     Advertising (1000s) 12.577 1.548 1.061 8.126 .000

    2 (Constant) 66.439 19.393 3.426 .002

    Y2012 -7.829 6.318 -.256 -1.239 .225

    Y2013 -1.299 3.599 -.041 -.361 .721

     Advertising (1000s) 8.337 2.295 .703 3.632 .001

    Q2 6.273 1.913 .188 3.278 .003

    Q3 7.482 2.469 .225 3.030 .005

    Q4 5.810 2.738 .174 2.122 .043

    a. Dependent Variable: Sales (1000s)

    Sales for quarter 2 are 6.273 more than comparing to quarter1Sales of quarter 3 are 7.482 more comparing to quarter 1.

    Sales of quarter 4 are 5.810 more comparing to quarter 1.

  • 8/18/2019 17010037 - A4 & 5.pdf

    13/15

    17010037

    SAM

     Assignment 5

    Page 8 of 5

    Q5: Has the year 2014 the better sales turnover? 

    Annual turnaround of 2014 are better than turnaround for 2012 and 2013 when all other factors

    remain constant.

    Q6: How confident the management should be about its inferences? Hint: Check the R-square of the

    model generated; check the OLS assumptions.

    From table 2, it is clear that value of R2 is 0.995, which shows that 99.5% variation is explained by this

    mode.

    Assumption 1:

    Figure 1 

    From Fig 1 it is clear that residual follow normal distribution.

  • 8/18/2019 17010037 - A4 & 5.pdf

    14/15

    17010037

    SAM

     Assignment 5

    Page 8 of 6

    Assumption 2:

    From figure it is clear that there is no hetroscadicity in model.

    Assumption 3:

    Figure 2

  • 8/18/2019 17010037 - A4 & 5.pdf

    15/15

    17010037

    SAM

     Assignment 5

    Page 8 of 7

    From figure 2, it is clear that there is a strong multi collinearity year sales and advertisement.

    Assumption 4:

    Table 6

    ANOVAa 

    Model Sum of Squares df Mean Square F Sig.

    1

    Regression 6943.944 3 2314.648 134.453 .000b 

    Residual 550.888 32 17.215

    Total 7494.832 35

    2

    Regression 7457.938 14 532.710 303.219 .000c 

    Residual 36.894 21 1.757

    Total 7494.832 35

    a. Dependent Variable: Sales (1000s)

    b. Predictors: (Constant), Advertising (1000s), Y2013, Y2012

    c. Predictors: (Constant), Advertising (1000s), Y2013, Y2012, May, Jun, Sep, Jul, Mar, Oct, Apr,

     Aug, Dec, Feb, Jan

    F value from anova table is 303.219 which lies in no auto correlation region of Durbin Watson table.