Temperature Trend in the Wadden Sea 2
- Linear Regression Analysis -
Scenario
While surfing in the internet, I found a series of measurements dealing with air and water temperatures including data on salinity taken at the North Sea coast of Spiekeroog. The diagrams on the right show the measurements that have been accumulated over several years. I also found mean values for each month. I downloaded the mean values and attached them to this worksheet. They begin in October 2002 and last until March 2009. The columns indicate the year, the month of the year, air and water temperatures and the salinity of the water, all measured at Spiekeroog. Can we use these data to verify whether it's really getting warmer in the North Sea like they say in the news? Let's take a closer look.
If there is a trend towards warmer temperatures, this would become visible by charting down the monthly mean values from October 2002 to March 2009 in a separate diagram. The trend should show an upwards curve. If the temperature increase is proportional to time, the diagram should show a curve going straight up.
Recently I read in a newspaper that mostly the temperatures in autumn did show a strong trend to increase. So I plotted the October temperature data into a diagram.
Not as easy as I thought... There are rising temperatures up to 2006, but then the temperature decreases again.
How can we find the “correct” straight line that best shows the actual trend? It should be the line having the least distance to all points in the graph - which means that its difference to the actual measurements is smaller than that of all other straight lines plotted on the graph! The process of determining this particular straight line is known as linear regression or least squares fit, and the resulting straight line out of this process is called the best-fit line.
Best-fit lines
Our search for a temperature trend in the North Sea is characterised by two features: temperature and time. This is not the case with other similar situations. The results of a dice game, for instance, show only one feature: the number of dots at every throw. In other cases, one feature is dependent upon another. The length of a coil spring would increase (one factor) as the weight hanging on its end increases (the other factor). The displacement of the coil is proportional to the weight; this is known as Hooke’s Law which you have probably encountered in your Mechanics lessons. The other word for proportionality is linearity. However, linear relationships between varying features are only valid under limited conditions: If you stretch the spring coil too far, it would loose its stretchability and ceases being linear.
The displacement of the coil and the weight hanging on it are correlated. Similarly, there is a certain correlation between the increasing temperatures that occured in the past 100 years: the correlation is brought about by the increasing amount of carbon dioxide in the atmosphere.
In some cases it is merely coincidental and not necessarily causal when two varying features appear to be correlated. For example: a scientific journal reports that the decreasing number of storks in the countryside is caused by the decreasing number of babies being born. Correlated or not?
There is actually no concrete proof that the temperature of the Wadden Sea grows linearly with time. If we examine a span of 100 years time, this may not apply. In shorter spans, however, we may be able to approximate a crooked curve by using a straight line (a tangent). We think this is applicable to temperature when observed over a span of several years only. This way, we can determine a best-fit line that can best depict the situation based on the data on the time axis and the annual mean values. The temperature data are more or scattered along this straight line. A measure that indicates how close the temperature data are to that particular line is the correlation coefficient.
Questions
Based on the mean monthly mean temperatures
1.	please compute the centroid and the slope of the linear regression line of the October 2002 - 2008 water temperature data. Draw a diagram showing the temperature data as points over the time axis, the centroid and the linear best fit line.
2.	please consider the October 2002 - 2006 data only, and sketch the resulting best-fit line into the same diagram. 
3.	compute the correlation coefficients of the 2002 - 2008 and the 2002 - 2006 data sets, and discuss your findings.
4.	compare air and water temperature data for October 2002 - 2008. Draw a diagram of air versus water temperature, and compute the best fit line and the correlation coefficient.
5.	compare water temperature and salinity data for October 2002 - 2008. Draw a diagram of water temperature versus salinity, and compute the best fit line and the correlation coefficient, and discuss your findings.
Materials
•	Chapter 2 Working with Time Series of the tutorial Time Series Analysis
•	Supplement 1: Point Clouds and Linear Regression Lines of the tutorial Time Series Analysis

University of Oldenburg, Institute of Physics, Marine Physics, D-26111 Oldenburg, Germany
Monthly averaged Spiekeroog Wadden Sea time series data, 10/2002 - 03/2009
created 26-06-2009 rr/tb

NaN: missing data (not a number)
 
yyyy	mm	T-air	T-water	salinity	
					
2002	10	8.42	9.11	NaN	
2002	11	5.83	6.68	30.6	
2002	12	0.96	2.55	31.7	
2003	01	1.51	1.71	30.7	
2003	02	0.96	1.49	NaN	
2003	03	4.67	4.84	31.2	
2003	04	7.93	8.09	32.3	
2003	05	11.32	12.40	29.9	
2003	06	18.72	18.45	NaN	
2003	07	18.67	19.69	31.6	
2003	08	16.81	18.25	32.1	
2003	09	15.87	16.73	31.8	
2003	10	8.20	9.80	32.0	
2003	11	6.87	7.04	31.7	
2003	12	4.54	4.70	31.6	
2004	01	2.64	2.79	30.5	
2004	02	4.57	4.43	29.4	
2004	03	5.48	4.92	30.7	
2004	04	9.41	9.44	31.9	
2004	05	11.55	13.05	32.4	
2004	06	14.56	16.32	31.9	
2004	07	16.11	17.38	31.2	
2004	08	20.80	21.23	33.2	
2004	09	15.18	15.87	31.0	
2004	10	12.28	11.35	31.1	
2004	11	6.45	7.87	31.0	
2004	12	3.43	4.50	30.8	
2005	01	2.24	4.51	30.6	
2005	02	2.13	2.42	30.6	
2005	03	4.38	3.41	29.12	
2005	04	9.20	8.65	30.1	
2005	05	11.89	12.60	30.3	
2005	06	16.81	17.61	31.5	
2005	07	17.66	18.98	31.9	
2005	08	16.50	17.21	30.1	
2005	09	16.43	17.21	30.5	
2005	10	13.47	13.23	30.9	
2005	11	8.56	9.44	30.4	
2005	12	4.98	4.74	29.4	
2006	01	1.02	1.66	31.4	
2006	02	2.45	2.31	32.2	
2006	03	2.45	2.43	32.3	
2006	04	7.62	7.91	30.3	
2006	05	12.84	12.68	31.2	
2006	06	15.44	16.12	30.4	
2006	07	20.68	21.12	32.0	
2006	08	17.65	19.29	30.5	
2006	09	18.27	17.91	29.8	
2006	10	13.99	14.52	30.8	
2006	11	9.66	9.56	31.1	
2006	12	7.85	7.46	29.5	
2007	01	7.12	6.62	29.1	
2007	02	5.14	4.90	30.6	
2007	03	8.32	7.31	29.6	
2007	04	11.39	11.18	31.6	
2007	05	13.05	14.45	31.5	
2007	06	17.30	18.19	31.8	
2007	07	17.10	18.23	31.3	
2007	08	17.73	18.55	31.1	
2007	09	14.75	15.27	30.8	
2007	10	11.28	12.07	30.5	
2007	11	7.64	7.75	30.5	
2007	12	4.89	5.23	29.8	
2008	01	5.66	4.49	29.2	
2008	02	5.49	4.89	29.0	
2008	03	5.75	5.77	30.2	
2008	04	8.40	8.67	30.7	
2008	05	14.04	14.27	32.9	
2008	06	16.24	17.55	32.6	
2008	07	18.15	18.67	31.3	
2008	08	17.73	18.61	31.8	
2008	09	15.04	15.86	31.5	
2008	10	10.95	11.76	30.4	
2008	11	7.80	7.98	30.9	
2008	12	3.44	4.02	30.9	
2009	01	1.56	1.70	31.3	
2009	02	2.69	1.94	31.5	
2009	03	5.52	5.13	30.1