14.3 Chi-Square test on circular data
I wish to determine if two binned data sets are significantly different. The underlying data is the same (and unavailable), only the technique used to bin the data is different among the two methods. And the values are circular.
For example: In a 24 hour day, the number of flights arriving in each hour at a particular airport are recorded by human time keepers. Al and Betty count flights arriving between midnight and 0:59 in the first bin, between 1:00 and 1:59 in the second bin, and so on. For whatever reason (faulty watches, sleeping on the job, etc.) they do not report the same numbers in each bin. In fact, a visual inspection of two histograms of arrival times indicates that Al exhibits a bias toward counting arrivals at hours evenly divisible by 6. With only the 24 bin values from each time keeper (48 values total), how can we determine if their counts are significantly different?
Is the use of two sample chi-square test justified? Does the cyclic nature affect what seems to be a categorical analysis? One may assume that no bin has fewer than 50 counted events.
Application of the test suggested by Fisher (Statistical Analysis of Circular Data, Sec 5.3.6) does not seem appropriate as I am dealing with the counts of events in each bin rather than individual data values.
Bill Press
11-28-2011, 06:21 PM
Great question, because it exposes all kinds of interesting issues!
I don't see that the circularity comes into this. If I understand you correctly, you have 24 (hourly) bins, and in each bin two observers' counts, and you want to see if the two observers are sampling the same distribution. I think that even if you shuffled the bins (hours), you'd have the same situation. So if you think that the circularity matters, please say more.
Now you don't quite say is whether the two observers are at the same airport counting exactly the same airplanes on the same days. If they are, then there is no randomness. That is, even the difference in a single bin by one count is a "significant" difference between the two observers, because there shouldn't be any difference at all. Put differently, you haven't specified what is the statistical model under which you want to ask if the observers differ.
Perhaps your observers are counting on different sets of days, and your statistical model is something like: in every minute of the day there is some small probability (different for each minute) of an airplane landing. In that case, the hourly counts accumulate Poisson random events, and the discussion in NR (3rd ed) 14.3.2 is what you want.
Or perhaps your model is something like: the observers are counting the same flights on the same day(s) but they have different overall efficiencies. What you want to know is whether their relative efficiencies vary during the 24 hour day. In that case you could use their respective total counts (summing the 24 bins) to measure the ratio of their efficiencies. Then, you could write down a statistic for each bin that measures that bin's discrepancy, appropriately scaled so as to be approximately a t-value squared. Then the sum over the bins would be a chi-square test. For a hint as to how to do this, look at eq. 14.2.3. Your scaled counts would be the xA-bar and xB-bar, and your denominator should be the square root of the sum of the variances of each.
Cheers,
Bill P.
I am unsure how/why circularity necessarily figures in myself. A reviewer noted that when dealing with distributions like this the selection of an origin is arbitrary and therefore some other issues must be considered (see Jammalamadaka and SenGupta, or Fisher's books on circular statistics). However, neither book addresses binned data.
Allow me to clarify the problem: The airport bosses want to know how many planes land during each hour to make workforce assignments. They task Al to count planes in addition to his other duties and something doesn't seem quite right about his report: The values every 6 hours stick out more than they should, though he gets the total for the day correct.
Puzzled, they hire Betty to come in and do nothing but count planes. Her numbers seem more reasonable (and for the sake of discussion are exactly accurate). Now Charlie walks in, looks at Al's numbers and says he can apply a formula to Al's values that yield numbers very similar to Betty's. The bosses are intrigued because if the formula works, they can keep Al (inaccurately) counting planes at no extra expense, let Betty go, give a small bonus to Charlie, and have "good enough" data on which to make workforce decisions.
Granted that Charlie cannot make the claim that his values are the same as Betty's if there is even one small difference, but would a statistical test (such as the two sample chi-square) allow him to say with some authority that his values are "just as good"? Rejecting the null hypothesis that Betty and Charlie have similar distributions would be a fatal blow to Charlie, but what would consistently very low chi-square values say?
The attached nr.txt shows the counts for Al, Betty, and Charlie at 2 hourly interval (for ease of viewing) and the chi-squre I have computed in comparing them against each other.