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?
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.
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.