Session Ready
Exercise

Exponential rolling average & over/under smoothing

In the previous exercise, we saw that our revenue is somewhat flat over time. In this exercise we will dive deeper into the data to see if we can determine why this is the case. We will look at the revenue for a single in-app purchase product we are selling to see if this potentially reveals any trends. As this will have less data then looking at our overall revenue it will be much noisier. To account for this we will smooth the data using an exponential rolling average.

A new daily_revenue dataset has been provided for us, containing the revenue for this product.

Instructions
100 XP
  • Using the .ewm() method, calculate the exponential rolling average with a span of 10 and store it in a column small_scale.
  • Repeat the previous step, now with a span of 100 and store it in a column medium_scale.
  • Finally, calculate the exponential rolling average with a span of 500 and store it in a column large_scale.
  • Plot the three averages, along with the raw data. Examine how clear the trend of the data is.