# 2 sample Poisson Test

Hi everybody.
I've been trying to replicate some tests that I use in Minitab in R/RStudio.
This time I got the 2 sample Poisson Test.
Situation: "An analyst for the postal service wants to compare the number of customer visits at two post offices. The analyst counts the number of customers that enter each office for 40 business days."
(See below the data used in this analysis)

Performing the analysis I've got the same p-value for both analysis:
R: p-value = 0.03107
Minitab: P-Value 0.031
(Well, I hope I've performed the test in R in the correct way).

My point is the Confidence Interval (CI).
I undestand what the CI means and the interpretation for that but I don't know why the CI results are different.
Thank you.

See below the complete analysis' results for the Poisson test.

R's Results

poisson.test(c(sum(BranchA), sum(BranchB)), c(40, 40),
alternative = "two.sided", conf.level = 0.95)

Comparison of Poisson rates

data: c(sum(BranchA), sum(BranchB)) time base: c(40, 40)
count1 = 9983, expected count1 = 10137, p-value = 0.03107
alternative hypothesis: true rate ratio is not equal to 1
95 percent confidence interval:
0.9436314 0.9972484
sample estimates:
rate ratio
0.9700709

You can find this Minitab's example here

Minitab's Results

Method
lambda1: Poisson rate of BranchA
lambda2: Poisson rate of BranchB
Difference: lambda1 - lambda2

Descriptive Statistics
Total
Sample N Occurrences Sample Rate
BranchA 40 9983 249.575
BranchB 40 10291 257.275

Estimation for Difference
Estimated 95% CI for
Difference Difference
-7.7 (-14.6768, -0.723175)

Test
Null hypothesis H0: lambda1 - lambda2 = 0
Alternative hypothesis H1: lambda1 - lambda2 ≠ 0

Method Z-Value P-Value
Exact 0.031
Normal approximation -2.16 0.031

Data

BranchA BranchB
268 247
266 257
252 273
259 269
271 207
279 258
237 260
226 262
278 243
249 264
246 236
217 253
223 235
250 236
244 265
259 247
247 271
268 274
275 276
241 264
265 265
249 244
274 267
245 247
210 267
231 274
207 270
251 267
257 287
249 277
233 223
273 257
236 282
257 269
232 250
243 248
248 283
255 224
255 257
258 236

The data is not following a Poisson distribution but for this type of data and for this analysis I have to use the 2 sample Poisson Rate to compare the "two branches" as the Minitab example shows.
The data "number of people" is an atributte or discrete data. It's not possible to say that 1.75 person visit the post office branch. Do yo know what I mean?
The hypothesis test is to compare the ratios of the quantity of people that visit the wo branches. In this case I need to compare if the ratios are equal or not.
My question is about the IC and the calculation that the R's test uses to reach the values:
95 percent confidence interval:
0.9436314 0.9972484
sample estimates:
rate ratio
0.9700709

Because the Minitab gives me:
Difference Difference
-7.7 (-14.6768, -0.723175)
and
(249.575 - 257.275) = -7.7
249.575 = 9983/40
257.275 = 10291/40

Regards.

1 Like

Thanks for setting right my misunderstanding. I’ve withdrawn my answer to avoid confusing others.

1 Like

No problem.
Every comment is welcome.
Regards

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.