In the previous instalment of “The math behind web analytics” we discussed some pretty basic elements: averages, trends, min & max, standard deviation. Then we touched on normal distribution and histograms.

Download the Excel companion file for this article: MetricsAnalysis_110907.xlsx.

Learning from Finance

Back in the days I worked at the Montreal Stock Exchange I had to take some stock trading classes. This is where I learned about moving average, probably like anyone familiar with the stock market. The red line in the GOOG stock price is the simple moving average based on 20 periods – or 20 days in this case.

Another way of looking at it is through the Exponential Moving Average (EMA) – which basically puts some more weight at the most recent data. Investors use this to predict when it is time to buy or sell a stock – we can use it to predict if we should expect our metric to go up or down. This function is available in the Data Analysis pack of Excel under Exponential Smoothing.

The moving average

I’ll spare you the math since Excel can do it automatically (click on the image on the right to see an example):
 

  1. Click the line in the chart
  2. From the top menu, pick Chart Tools / Layout / Trendline and More trendline options
  3. Select Moving Average and Period: 7

Conceptually, Wikipedia defines the moving average as “Given a series of numbers and a fixed subset size, the moving average can be obtained by first taking the average of the first subset. The fixed subset size is then shifted forward, creating a new subset of numbers, which is averaged. This process is repeated over the entire data series.”

And add “A moving average is commonly used with time series data to smooth out short-term fluctuations and highlight longer-term trends or cycles.”

If we look back at the sample data used for the previous articles, we clearly see a weekday-weekend cycle with some peaks and valleys. Drawing the trend (dotted blue line) gives us a sense of growth. With the moving average set to seven days (darker red line) – because we know the cyclical pattern is repeating itself on a seven days cycle – we have a slightly different view of the growth.

If the default line graph is like looking at the trees of a forest, the average is akin to looking at the whole forest. The moving average is inbetween: we look at areas of the forest which are denser (higher or going upward), and others where there might be some clearing (lower or going downward).

Using the moving average gives us a better feel of the growth pattern than the default line graph, average or trend.

That’s it – now you have another way of visualizing your data!

Next: Box plots

I wanted to keep this post as short as possible; the next post will be entirely dedicated to the concept of box plots.

Message Sent

Thank you for registering.

Cardinal Path hosted a live session to connect with you and answer all your questions on Google Analytics.
Get all the expertise and none of the consultancy fees in this not-to-be-missed, rapid-fire virtual event.

Thank you for submitting the form.

Thank you for submitting the form.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you.

Click here to download access the tool.

Message Sent

Thank you for registering.

Message Sent

Thank you.

Message Sent

Thank you.

Message Sent

Thank you

Message Sent

Thank you

Message Sent

Thank you.

Message Sent

Thank you

Message Sent

Thank you.

Message Sent

Success!
Your message was received.

Thank you.

Thank you for registering.

Cardinal Path is continuing with its series of free training. Next we are conducting training on Google Data Studio. Check it out here.

Message Sent

Thank you for registering.

Thank you for your submission.

Your request has been submitted and a rep will reach out to you shortly.

Message Sent

Thank you for your interest.

Thank you for registering.

You should receive a confirmation email from GoToWebinar with your unique webinar login information. If you do not receive this email or have trouble logging in to the event, please email asmaa.mourad@cardinalpath.com.

Thank you for subscribing!

You're now looped into the world's largest GMP resource hub!

Thank you for your submission.

Thank you for your submission.

Thank you for your submission.

Thank you for your submission.

Message Sent

Thank you for registering.

Message Sent

Thank you for your submission.

Thank you for your submission.

Message Sent

Thank you for registering.

Thank you for registering.​

Paid media spend by Government websites increased a whopping 139% YoY in 2020.

2020 Online Behavior Live Dashboard

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

2020 Online Behavior Live Dashboard

Thank you for your submission.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Thank you for registering.

Message Sent

Success! Thank you
for reaching out.