2
$\begingroup$

Question 1

Two equally sized patches of the night sky are examined:

  • Patch A contains $100$ stars
  • Patch B contains $110$ stars

Is there a significant difference between these two patches of night sky? i.e., is one patch likely to contain a star cluster?

Question 2

Traffic to a site is examined in two time frames of equal duration

  • in time frame 1 (e.g., summer/June/morning), there were 100 visitors

  • in time frame 2 (e.g., winter/December/evening), there were 110 visitors

Is there a significant difference in site volume between these two time frames? i.e., is demand to the site governed by temporal factors?

Background

I would like to know if there is a statistical test designed to examine whether there is a significant difference between two groups. The values I am evaluating are aggregated counts (so is not a continuous measure or ordinal).

Since the values are aggregated counts, my first instinct was using the Chi-square test of independence. However, I can only find examples where a dichotomy is involved, resulting in a YES/NO, 1-0, TRUE/FALSE contingency table. But in my case, I cannot see an obvious way of representing my data in this dichotomous fashion.

I don't know how to explain this, but is there something like an A/B test, but with only a single row or a single column?

$\endgroup$
  • $\begingroup$ See significance of difference between two counts. $\endgroup$ – Scortchi Mar 14 '17 at 12:56
  • $\begingroup$ @Scortchi - thank you very much for the link, but it seems a bit abstract and general. It would help me tremendously if I could have an explicitly worked solution to my question - i.e., how would I calculate the p-value for rejecting the hypothesis that there is no difference between patch A and patch B? In fact - I'll put that in a new question. $\endgroup$ – Ben Mar 15 '17 at 11:25
  • 1
    $\begingroup$ The p-value for a one-tailed test is given directly by the binomial distribution function: what's the probability of 100 or fewer "successes" in 210 Bernoulli trials with a common "success" probability of one-half? For two-tailed tests when the distribution of the test statistic under the null is discrete, calculating the p-value can be fiddly, but here the symmetry of that distribution comes to your aid: just double the p-value for the one-tailed test. $\endgroup$ – Scortchi Mar 15 '17 at 14:00
  • $\begingroup$ @Scortchi - thanks for sticking with me here. Are you saying that, in the case where the two patches of sky are equal in size, and given my hypothesis that the stars are randomly distributed, then the probability that a given star should lie in either patch is $p=0.5$? Following on from this, if Patch A were twice a big as B, then the probability of 'success' would be $p=2/3$? $\endgroup$ – Ben Mar 15 '17 at 14:53
  • $\begingroup$ Yes it's as if you started with 210 stars & tossed a coin to decide which patch to put each in. (Or if Patch A were twice as big as Patch B, threw a die & put the star in Patch A if 1 to 4 came up, else Patch B.) But to get to that "as if", "randomly" needs to be given a particular interpretation such that the count of stars in each patch follows a Poisson distribution. $\endgroup$ – Scortchi Mar 15 '17 at 15:51

Your Answer

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

Browse other questions tagged or ask your own question.