# How to test if counts differ across temporal categories?

I have a homework question in which data is taken from three months of hospital admission data. It is then split into six 4-hour groups (0000–400, 0400–0800, etc.). The data are given with just the hour group and one column containing a number of admits. We are to draw a conclusion about how nurses should be scheduled based on this data. Is there any statistical or graphical method that would result in a significant conclusion, or is this a trick question, and the answer is that there isn't enough data to make a suggestion with any certainty?

Update: the values for the 4 hour window are for the entire 3 month period. So if the value that corresponded to 00:00-04:00 was 80 that would be 80 patients admitted between 00:00 and 04:00 over the last 3 months. If I did a single sample t-test using the values of column 2 and any values that were outside the CI, could I say that more nurses should be allocated to that hour group?

• What is the topic of this course, and is it introductory-level? Apr 29 '14 at 23:59
• Intermediate stats for sciences. 300 level course. Apr 30 '14 at 0:05
• Also, do you have only one observation per time period aggregated or averaged over the three years? Or do you have six observations per day for three years? Apr 30 '14 at 0:07
• It's just a 2x6 table. Column 1 is just the hour group and column 2 has one value. No indication if it is a daily average, a monthly average or a total for the 3 month period for that given 4 hour block. Apr 30 '14 at 0:12
• From a long career of setting questions I can say that it's largely a student myth that teachers set trick questions designed to catch students out. Why would they do that? If grades are lousy, the teachers suffer too. It should always be true that questions are designed to test understanding at the level being taught and expected, but that's different. It is often true that questions are easy once you see the kind of question being asked and difficult to impossible otherwise, but that's different. Apr 30 '14 at 8:05

Ideally, the data would not be aggregated and you would use time-series methods to model the seasonality over the course of the day. However, as I gather this is an introductory class, and I generally agree with @NickCox's comment, I suspect this is a much simpler exercise.

My guess is that they wonder if nurses should be scheduled evenly / uniformly, or if they need higher numbers for some time periods. You have one row of counts that fall into 6 bins, and you want to know if the numbers are approximately equal in each bin. You can test that with a chi-squared test for goodness of fit. Since a month has passed, here is an example worked in R:

set.seed(9337)                               # (makes the example reproducible)
admits        = rpois(6, lambda=80)          # here I generate counts (the null is true)
"0800–1200", "1200–1600",
"1600–2000", "2000–0000")
admits                                       # here is what the data look like:
# 0000–0400 0400–0800 0800–1200 1200–1600 1600–2000 2000–0000
#        74        85        96        75        79        76
chisq.test(admits)                           # this is the test
#
#  Chi-squared test for given probabilities
#
# X-squared = 4.3897, df = 5, p-value = 0.4948


There aren't much relevant statistics you can do with the highly aggregated data you have (especially since you don't have any measure of the variance within each time period), so given how you've described the course and problem I assume that the purpose of the question is not to perform a statistical analysis, but to use the summary statistics you've been given to make a decision. Unless you have more information, your best bet is probably to just schedule more nurses during the times when there are high numbers of patients admitted. If each data point is an average of over a thousand days, the Central Limit Theorem likely means that you can be fairly confident in the accuracy of those averages, unless the day-to-day variance is enormous or there's some trend on the scale of years.

• It would seem that they were given a set of counts that were binned, & there is some question about whether the counts are the same across bins. I'm reading between the lines somewhat here, but I can make an educated guess what analysis they may have hoped students would do. Apr 30 '14 at 3:28