# Analysing the statistical significance between two subsets of data

Apologies if this question is quite simple, but I struggle with stats and wondered if you could help.

I have a data set which has days of the year (1-365/366) from 2004-2013 and a variable with the number of earthquakes per day per year for this same period. I have subset my data into two: one into summer earthquakes and one into winter earthquakes as my research question is looking at whether glacial ice loss in summer increases the number of earthquakes compared to that in the winter months.

I am wanting to see if there is a significant difference between summer and winter? However understanding what test to do is proving tricky.

Any help would be greatly appreciated!

This approach would throw away most of the time detail in the data and is thus unnecessarily coarse. There is no physical reason to expect that there will be a step from winter to summer or that any winter or summer is homogeneous. Rather, I would expect if anything smooth dependence on time of year (except insofar as melting might not be continuous through the year, depending on location). (I am an author on various papers in glaciology, but contributing always on the more statistical side.)

The only justification I can imagine for treating time of year as just summer or winter might be that it seems to bring the problem within the range of techniques taught in an introductory statistics course. If you are a student on such a course, then the rest of this answer is more than you want, but might be of interest to anyone interested by the question.

An appropriate model, at least as a starting point, might be a Poisson regression of daily counts on time of year represented as sine and cosine terms. Make sure that days with no earthquakes are explicit in the data as zeros.

Thus assuming a day of year variable running from 1 to 366 I would construct

fraction of year $=$ (day of year $-$ 0.5) / (365 or 366) $=: f$

and then terms $\sin 2\pi f, \cos 2\pi f, \sin 4\pi f, \cos 4 \pi f, \dots$ for a Poisson regression. Whether there is dependence on time of year is then directly tested by whether the coefficients on sine and cosine terms are jointly zero. The model should be of direct scientific interest as indicating not just whether there is a seasonal effect, but also what form it takes.

The model could further be extended by having calendar year or some appropriate temperature or other climatic variable(s) as extra predictors.

One discussion of such trigonometric (Fourier, periodic) regression with tutorial flavour is accessible here.

Returning to your approach: a further limitation would seem to be that at most you have summer and winter counts for 10 years, which by any standards is a very small sample. (Naturally we take it that the data are all those available, a fact you cannot mitigate.) I suppose that you could put those into a $t$ test or Wilcoxon-Mann-Whitney test. I have to be queasy about that because it would ignore any time dependence between years. Also, the structure is odd: you have a kind of pairing, but only arbitrarily (do you pair a summer with the previous winter or the following winter?). So, the summers and winters are perhaps best treated as unpaired, but as said that ignores any time dependence. The more I think about the sketched approach, the more problematic it seems.