I have data regarding the number of deaths in a city over 35 years. I've collated the data, and now wish to prove the difference in total number of deaths between seasons is significant. Spring has 631 deaths, summer 540 deaths, autumn 502 deaths and winter has 605 deaths. Clearly there is a big difference between spring and autumn, but how do I prove that? Is it ANOVA? Or maybe t-test? I'm totally lost... Cheers
You can use a Chi-Squared test to test for significant variation between seasons, under the assumption that we expect equal counts in each season. e.g. in R:
d = c(631,540,502,605) chisq.test(matrix(c(d, rep(mean(d),4)), ncol=2))
Pearson's Chi-squared test data: matrix(c(d, rep(mean(d), 4)), ncol = 2) X-squared = 9.2602, df = 3, p-value = 0.02602
i.e. there is significant variation between seasons.
An analysis of variance will show that there is a significant difference somewhere. As an assist, it might be useful to plot the average number of deaths by season for the 35 years. Comparative boxplots with whiskers and notches would place the median deaths (with 95% confidence intervals) side-by-side for visual comparison. This is easily done in R. Such a plot also shows the distribution by season (answers the question about normality), and provides much more information than just significance.
You may want to do like:
Generate a dummy variable for each season: lets call these as
s1, s2, s3, and s4.
Regress dependent variable
yon dummy variables
s2, s3, s4 plus other variables if any[Note we omit one (you can choose any) dummy variable to avoid
dummy variable trap].
Test the significance (using
t-test)on the coefficients of
s2, s3 , and s4. If at least one of these is significant, it indicates the seasonal effect.
Since your data is time series you may want to use Newey-West
standard errorwhich is robust to autocorrelation and heteroscedasticity.
Two indicator variables contrasting spring and autumn and summer and winter respectively might be used to capture the cyclical character of seasons. I've not checked the equations, but I think you'd find that equivalent to fitting sine and cosine terms for time of year. Then it's a regression with whatever other predictors make sense. That is, don't lump the seasons; allow the data to show variability between years as well as whatever makes sense.
Periodic, trigonometric, Fourier regression are some of the names used for this. Typically statistical people forget all the trigonometry they learned when young, which comes in handy for thinking about seasonality.
CORRECTION. One variable should run winter 1, spring 0, summer -1, autumn 0 and the other winter 0, spring 1, summer 0, autumn -1. These sine and cosine terms are thus not 0, 1 indicators.