1
$\begingroup$

I have the following problem: in year A, we observe that a company sold N_A of its product, in year B, we observe that the company sold N_B of its products. How do I do hypothesis testing that the company sold statistically different number of products in year A and B?

My thought is that

     N_A ~ Poisson(lambda_A)
     N_B ~ Poisson(lambda_B)

So my hypothesis test is

     H_0: lambda_A = lambda_B
     H_1: lambda_A != lambda_B

Then I can run a z-test where the test statistic

     Z = |N_A - N_B|/sqrt(N_A + N_B)

follows a normal distribution with mean 0 and variance 1.

Is this the correct method? If so, why can the Z-test be applied in this case?

$\endgroup$
4
  • $\begingroup$ That is not a statistic because it isn't a function of the data. $\endgroup$
    – HStamper
    Commented Apr 6, 2018 at 6:31
  • $\begingroup$ @EricMittman thanks for pointing out my mistake! just corrected my Z statistics $\endgroup$
    – Amazonian
    Commented Apr 6, 2018 at 6:39
  • 3
    $\begingroup$ You cannot statistically test for a diffference because you have just 1 data point in each of your comparison groups. $\endgroup$
    – mkt
    Commented Apr 6, 2018 at 7:26
  • 1
    $\begingroup$ @mkt, even a single point can be an estimate of a distribution mean (albeit, not a very good one). Moreover, if you assume the distributions are Poisson, you have an estimate of the variance. Thus, it is possible to conduct such a test, it is just that this test makes very strong assumptions that cannot be assessed. $\endgroup$ Commented Apr 6, 2018 at 16:33

2 Answers 2

3
$\begingroup$

By using the Poisson distribution, we get that the "noise" in the measurements is proportional to the square root of the expected value. This is a pretty major assumption.

The expected value of the difference of two i.i.d. random variables are zero and the variance of the difference is twice the variance of one of them.

Further, if we assume that the distribution of the difference is approximately normal -- which seems reasonable for large Poisson counts -- we end up with this z-statistic.

$\endgroup$
5
  • $\begingroup$ Because counts are typically overdispersed relative to the Poisson, it is best to take the resulting p-value as the lower bound, rather than an accurate p-value. Still, this procedure is used on occasion. $\endgroup$ Commented Apr 6, 2018 at 16:34
  • $\begingroup$ @gung, can you explain why counts are typically overdispersed relative to the Poisson? $\endgroup$
    – Amazonian
    Commented Apr 6, 2018 at 19:51
  • 1
    $\begingroup$ They don't have to be, @Amazonian, they just almost always are. That's an empirical fact (really, observation). Basically, counts will be overdispersed relative to the Poisson if there is >1 component to the data generating process. Eg, the negative binomial is often used to model overdispersed counts, but NB is a mixture of Poisson distributions w/ lambdas distributed as Gamma. $\endgroup$ Commented Apr 6, 2018 at 20:20
  • $\begingroup$ @gung can you please explain how to empirically measure the dispersion of counts and empirically compare them to that of a Poisson RV? In other words, what kind of data would I need and how to visualize this? $\endgroup$
    – Amazonian
    Commented Apr 6, 2018 at 22:43
  • 1
    $\begingroup$ @Amazonian, well, you would need more than 1 datum per group. That should be a new question, though. That isn't the sort of thing that should be buried in comments. Search the site first; that's the sort of thing that may already have been covered. $\endgroup$ Commented Apr 7, 2018 at 2:03
0
$\begingroup$

Statistical testing is meaningless here as you have no measure of variability. All you have is just two data points, one for company A and for company B.

$\endgroup$
1
  • $\begingroup$ Even a single point can be an estimate of a distribution mean (albeit, not a very good one). Moreover, if you assume the distributions are Poisson, you have an estimate of the variance. Thus, it is possible to conduct such a test, it is just that this test makes very strong assumptions that cannot be assessed. $\endgroup$ Commented Apr 6, 2018 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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