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.
Any commnents will be helpful.
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 |