A record like the one at Mauna Loa Observatory in Hawaii has a trend and a yearly cycle. Here are three years of monthly values in ppm, from January of year 1. The values are rounded and were made for this lab. You will find the yearly means, the trend and the month of the peak.
The idea. The mean of twelve months has no yearly cycle. The slope of the yearly means is the trend. Taking each yearly mean from its own months leaves the cycle, and the mean of each calendar month then gives its size.
Your tasks.
yearly_means, return the list of the three yearly means.trend_per_year, return the least-squares slope of the yearly means against the years , in ppm per year.peak_month, return the number of the calendar month, to , with the highest mean after each year's own mean has been taken away.Run your code once to unlock the worked solution.
Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…