Friday, 24 January 2014

More fun with Sunspot data and Excel

Excel has a neat trend-line function that can be used when plotting data. I did some exercises using the trend-line function in Excel and to compare the output with the results obtained from the LOESS function. The data set that I used is in this example is that of the sunspot cycle 23, downloaded from the Royal Observatory of Belgium.

Lets look at the raw sunspot data for sunspot cycle 23 plotted in Excel:-

The raw data points


Using the polynomial trend-line we get the following:-  

Trend-line fitted using polynomial to the 6th power  












Now I superimpose the curve obtained by plotting the LOESS 1000 days function on the graph:-
The LOESS 1000 curve, Sunspot 23 raw data and trend-line
 fitted to the sunspot raw data.















What is my conclusions?


1. Using the inbuilt Excel trend-line facility with the polynomial set to the 6th power yields a curve that is remarkably similar to the curve obtained from the LOESS function set to 1000 data points (days).
2. If the Sunspot 23 data is subjected to the LOESS function set to 1000 days  a curve that is very close to the inbuilt curve fitting functionality of Excel is obtained.
3. I cannot get similar results using the moving average data.
4. As an Engineer I would put more trust in the output from the LOESS 1000 function to describe the shape and outline of  Sunspot 23 than the results obtained from the moving average method of calculation.

Why? It just fits neater, and that is always a good indication that I am on the right track.

No comments:

Post a Comment