I've been trying to get my head around how to do hypothesis testing for a circular scale in hypothesis testing, but I am having a lot of trouble. I know well how to test for linear scales, but when it loops back around itself I'm just lost.

As an example:

I believe one of my car tires has an extra mass placed at a certain point on the circumference. In order to test for it, I mark the tire into N equal segments, and push it along the floor until it comes to rest, and mark which of the N segments it landed on (ignore the fairness of this test for this question). I repeat this M times. I am left with a distribution that seems to favor a certain segment. How do I calculate the p-value this data?


To test this hypothesis you would need to construct a test statistic that gives an ordinal measure of whether the data is more conducive to the null hypothesis or alternative hypothesis. To do this, label your segments circularly as $1,...,N$ (starting at an arbitrary point) and let $x_1,...,x_M$ denote the outcomes of those segments in your test. Assuming proper experimental conditions, with no systematic changes between trials, it is reasonable to assume that the outcomes are part of an exchangeable series (so they are IID). Thus, without loss of generality we have:

$$X_1,...,X_M \sim \text{Categorical}(\mathbf{p}),$$

where $\mathbf{p} = (p_1,...,p_N)$ is some unknown probability vector over the $N$ segments. Now, under the null hypothesis that there is no extra mass in your tyre, you might posit that every outcomes of the test is equally likely. In this case, your hypotheses would be formulated as:

$$H_0: \mathbf{p} = (\tfrac{1}{N},...,\tfrac{1}{N}) \quad \quad \quad \quad \quad H_A: \mathbf{p} \neq (\tfrac{1}{N},...,\tfrac{1}{N}).$$

Thus, we can see that what you have here is a test of uniformity of a categorical random variable. There are various test statistics you could formulate to test this hypothesis, depending on whether or not you want to take account of the "circularity" of your categories. If you want to ignore this, you could just do a standard test of uniformity (there are lots of them).

If you want to use the circularity, then you are effectively trying to take advantage of the fact that, under the alternative hypothesis, the vector $\mathbf{p}$ should have a "humped" shape, with a modal category, and categories "around it" (in a circular sense) also having higher than average probability. There are a number of ways you could potentially formulate your test statistic in the latter case. One way would be to let $1 \leqslant d < N$ be a number of continguous categories (less than the whole wheel) and formulate your test statistic as the maximum count of outcomes over $d$ circularly contiguous segments. If you take $d=1$ then you have one form of standard uniformity test, but if you take $1<d \ll N$ then you have a non-standard test that takes advantage of the circular nature of the wheel. (Your choice of $d$ should really depend on how localised you think the effect of the mass would be.)

After you have chose a test statistic, you would need to determine the null distribution of the statistic, and use this to calculate your p-value. Depending on the complexity of your test statistic, this could probably be done analytically, or if you're having trouble you could fall back on simulation to get an estimated p-value.

  • 1
    $\begingroup$ What an amazing answer, Ben. This is truly remarkable and so clear! A quick question: if taking advantage of the "humped" nature of the data, would the correct approach be to conduct a test for each $d={0,...,N}$ and then apply the Bonferroni correction to find any significant results? $\endgroup$ – DarkLightA Jul 31 '19 at 22:07
  • $\begingroup$ I would recommend against that, since then you are adding a multiple comparison problem that does not need to be there. I would suggest fixing $d$ in advance (depending on how fine the segments are, maybe $d=3$?) and try testing it this way. Having said this, I have not investigated the properties of this test, so it would be worth deriving some of those properties (power, etc.) to see if this would be a powerful test. $\endgroup$ – Ben Jul 31 '19 at 22:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.