Session Ready
Exercise

Analyze Revenue Trends - Regression

Sometimes it is difficult to spot differences by simply eyeballing the data. A slightly more sophisticated tool to determine changes in the data is regression analysis. In this exercise, you will use regression analysis to determine whether the revenue trend has shifted between the historical period and the projection period. A statistically significant shift variable is not necessarily an indicator of bad projections, but it tells us that we may want to dig deeper to find a rationale for the shift in the trend. For this exercise, the data frame rev_all which is stored in memory, contains the historical revenues (first 8 years) and projected revenues (last 5 years) under the rev_proj variable name.

Note: A typical threshold for statistical significance is if the p-value of the trend variable is less than or equal to 0.10.

Instructions
100 XP
  • Create a trend variable for historical and projected revenues.
  • Create a trend shift variable that identifies the projection period.
  • Regress revenue projections (rev_proj) on the trend and shift variables, using the rev_all data.
  • Print the summary of reg.