m8s3 applied regression
play

M8S3 - Applied Regression Professor Jarad Niemi STAT 226 - Iowa - PowerPoint PPT Presentation

M8S3 - Applied Regression Professor Jarad Niemi STAT 226 - Iowa State University December 6, 2018 Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 1 / 22 Regression analysis procedure 1. Determine scientific


  1. M8S3 - Applied Regression Professor Jarad Niemi STAT 226 - Iowa State University December 6, 2018 Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 1 / 22

  2. Regression analysis procedure 1. Determine scientific question, i.e. why are you collecting data 2. Collect data (at least two variables per individual) 3. Identify explanatory and response variables 4. Plot the data 5. Run regression 6. Assess regression assumptions 7. Interpret regression output Two examples: Inflation vs Unemployment Frozen Foods: Sales vs Visibility Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 2 / 22

  3. Inflation vs Unemployment Scientific question Inflation vs Unemployment Definition Inflation is a systained increase in the price level of goods and services in an economy over a period of time and is calculated by taking the average cost of goods in one period subtracting the average cost of goods in the previous period and then dividing by the average cost of goods in the previous period. Unemployment percentage is calculated by dividing the number of unemployed individuals by all individuals currently in the labor force. Scientific question: What is the relationship between inflation and unemployment? Economic theory suggests lower unemployment leads to higher inflation. Is there evidence in the U.S. to support this theory? Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 3 / 22

  4. Inflation vs Unemployment Data Data Obtained from https://www.bls.gov/ : Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 4 / 22

  5. Inflation vs Unemployment Plot Plot Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 5 / 22

  6. Inflation vs Unemployment Regression Regression Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 6 / 22

  7. Inflation vs Unemployment Residuals Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 7 / 22

  8. Inflation vs Unemployment Residuals Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 8 / 22

  9. Inflation vs Unemployment Residuals Regression Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 9 / 22

  10. Inflation vs Unemployment Confidence interval Confidence intervals Critical value for 80% confidence interval t 848 , 0 . 1 < t 100 , 0 . 1 = 1 . 29 Intercept 0 . 0023679 ± 1 . 29 × 0 . 000457 = (0 . 0018 , 0 . 0030) Interpretation: We are 80% confident that the true mean inflation at 0% unemployment is between 0.0018 and 0.0030. Slope 0 . 000072832 ± 1 . 29 × 0 . 00007621 = ( − 0 . 000025 , 0 . 000171) Interpretation: We are 80% confident that the true mean increase in inflation for each percent increase in unemployment is between -0.000025 and 0.000171. Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 10 / 22

  11. Inflation vs Unemployment Hypothesis test Default hypothesis tests Default intercept hypothesis test: H 0 : β 0 = 0 vs H a : β 0 � = 0 p -value < 0 . 0001 Decision: Reject H 0 at level α = 0 . 05 . Conclusion: There is statistically significant evidence that, at an unemployment rate of 0%, that mean inflation is not 0. Default slope hypothesis test: H 0 : β 1 = 0 vs H a : β 1 � = 0 p -value = 0 . 3395 Decision: Fail to reject H 0 at level α = 0 . 05 . Conclusion: There is insufficient evidence to conclude that, for each % increase in unemployment, the mean change in inflation is not 0. Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 11 / 22

  12. Inflation vs Unemployment Hypothesis test Hypothesis tests Scientific question: Economic theory suggests lower unemployment leads to higher inflation. Is there evidence in the U.S. to support this theory? Hypothesis test: H 0 : β 1 = 0 vs H a : β 1 < 0 The point estimate for the slope (7.3e-5) is not consistent with this alternative hypothesis. Thus to calculate the p -value, we divide the given p -value by 2 and then subtract the result from 1. p -value is 1 − (0 . 3395 / 2) ≈ 0 . 83 Decision: Fail to reject H 0 at level α = 0 . 05 . Conclusion: There is insufficient evidence to conclude that, for each % increase in unemployment, the mean change in inflation is less than 0. Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 12 / 22

  13. Sales vs Visibility Scientific question Sales vs Visibility Definition Item Outlet Sales is the sales revenue for the particular product at a particular outlet for a given period of time. Item Visibility is the % of total display area of all products in a store allocated to the particular product. Scientific question: What is the relationship between visibility and sales for frozen foods? Marketing theory suggests that increased visibility should increase sales. Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 13 / 22

  14. Sales vs Visibility Data Data Obtained from https://datahack.analyticsvidhya.com/contest/ practice-problem-big-mart-sales-iii/ : Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 14 / 22

  15. Sales vs Visibility Plot Plot Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 15 / 22

  16. Sales vs Visibility Regression Regression Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 16 / 22

  17. Sales vs Visibility Residuals Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 17 / 22

  18. Sales vs Visibility Residuals Clear violation of normality. This pattern indicates right-skewed residuals. To analyze these data, you should take the logarithm of the response, but we will proceed with the analysis as is. Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 18 / 22

  19. Sales vs Visibility Residuals Regression Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 19 / 22

  20. Sales vs Visibility Confidence interval Confidence intervals Critical value for 95% confidence interval t 758 , 0 . 1 < t 100 , 0 . 1 = 1 . 984 Intercept 2439 . 0525 ± 1 . 984 × 119 . 5942 ≈ (2200 , 2680) Interpretation: We are 95% confident that the true mean sales when visibility is 0, i.e. no product is visible, is between $2200 and $2608. Slope − 3923 . 018 ± 1 . 984 × 1624 . 367 = ( − 7150 , − 700) Interpretation: We are 95% confident that the true mean increase in sales for each % increase in visibility is between -$7150 and -$700. Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 20 / 22

  21. Sales vs Visibility Hypothesis test Default hypothesis tests Default intercept hypothesis test: H 0 : β 0 = 0 vs H a : β 0 � = 0 p -value < 0 . 0001 Decision: Reject H 0 at level α = 0 . 05 . Conclusion: There is statistically significant evidence that, at a visibility of 0, mean sales is not 0. Default slope hypothesis test: H 0 : β 1 = 0 vs H a : β 1 � = 0 p -value = 0 . 0160 Decision: Reject H 0 at level α = 0 . 05 . Conclusion: There is statistically significant evidence that, for each % increase in visibility, the mean change in sales is not 0. Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 21 / 22

  22. Sales vs Visibility Hypothesis test Hypothesis tests Scientific question: Marketing theory suggests that increased visibility should increase sales. Hypothesis test: H 0 : β 1 = 0 vs H a : β 1 > 0 The point estimate for the slope (-3923) is not consistent with this alternative hypothesis. p -value is 1 − (0 . 016 / 2) ≈ 0 . 99 Decision: Fail to reject H 0 at level α = 0 . 05 . Conclusion: There is insufficient evidence to conclude that, for each % increase in visibility, the mean change in sales is greater than 0. Professor Jarad Niemi (STAT226@ISU) M8S3 - Applied Regression December 6, 2018 22 / 22

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend