Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I have some hourly/daily temperature data at:

http://data.barrycarter.info/

and want to approximate it using a "simple" mathematical function. Notes:

If you look at the mean daily temperature graph for KABQ, it looks like a sine wave with a period of one year.

Similarly, the hourly temperature for a given day in KABQ also looks like a sine wave with a period of one day.

However, closer inspection (Fourier analysis) shows that they're not. There are fairly strong components of frequency 2/year and 3/year for the daily temperature, and the hourly temperature also has strong non-single-period terms.

Is there a function that describes the daily mean temperature and (a separate function) the hourly mean temperature somewhat accurately?

The function would have constants (parameters) that would change for non-KABQ locations.

I realize I can keep taking more Fourier terms to increase accuracy, but I was hoping for something more elegant. For example, maybe the graph is a parametrized version of sin^2(x) or some other "well-known" function.

EDIT: Below's a hopefully better example of what I mean.

You take the Fourier transform of some data and the first 15 terms are:

2.82831 
3.36979 + 0.322402 I 
3.79182 + 2.34689 I 
0.73987 + 4.71806 I 
-3.16205 + 0.709054 I 
2.76656 - 1.86274 I 
-0.762084 + 3.94561 I 
1.98004 - 2.6786 I 
-2.51665 + 2.21764 I 
3.6131 + 2.29278 I 
2.79673 - 2.55569 I 
-0.455474 - 2.7534 I 
-1.51359 - 1.18634 I 
-1.31561 - 0.177807 I 
-0.928778 + 0.218559 I 

You immediately recognize this as the Fourier series for cos(x^2), and model your data appropriately.

In this case, using just the first few Fourier terms for approximation is a bad idea, since the data follows a much "better" pattern.

That's what I want. Fourier series is one of many methods to analyze data. I want my approximation to be method neutral in some sense.

So I guess I'm sort of asking: given a Fourier series, how do I find a nearby "well known" function.

share|improve this question
Did you remember to subtract out linear trends before FFT'ing your data? – J. M. Dec 17 '10 at 5:28
If we're looking at average daily temperature (or average hourly), there couldn't be any linear trends, right? – barrycarter Dec 17 '10 at 6:15
2  
Personally I think Fourier analysis is quite an elegant approach and see nothing inelegant about using the first few Fourier terms, but I guess elegance is in the eye of the beholder.. – onestop Dec 17 '10 at 9:13
I'm not sure of the question. Are you essentially asking for domain-specific knowledge that "Oh yeah, temperatures are modeled as ___"? Or are you asking for help in defining "simple" or "elegant"? In the former case, this may not be the right place. In the latter, it's really your call about whether 3 Fourier terms is "elegant". (Or if the very simple sine wave with period 1 is "accurate enough", which is also your call, depending on your intended use.) – Wayne Dec 17 '10 at 17:02
1  
"Physically sensible" and "simple" may not necessarily go hand in hand. Especially not when describing relatively complicated phenomena like weather. If there was a simple formula for predicting the weather, I'm pretty sure you could get quite rich by discovering it. – Jakob Borg Dec 18 '10 at 22:14
show 2 more comments

closed as not a real question by mbq Apr 24 '11 at 18:13

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

Browse other questions tagged or ask your own question.