Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

To be more clear, when you run poisson.test(1, conf.level = 0.95) with the default values of T and r (which are both 1) you are performing the following two-sided hypothesis test:

Null hypothesis: The true rate of events is 1 (r) with a time base of 1 (T).

Alternative hypothesis: The true rate is not equal to 1.

The reason that you end up with a p-value of 1 is because you've said that you've observed 1 event in a time base of 1 with a hypothesized rate of 1. So given this data, of course the probability of observing a rate equal to or more extreme than 1 is 1! As such, you're not actually testing anything about the data that you claim you are testing.

I'm not trying to be harsh here, but please be careful when using statistics!



Ok I re-ran setting T properly for both cases. The results were similar:

> poisson.test(c(1, 11800), c(3, 1000000), alternative = c("two.sided"),conf.level = .93)

Comparison of Poisson rates

  data:  c(1, 11800) time base: c(3, 1e+06)
  count1 = 1, expected count1 = 0.035403, p-value = 0.03478
  alternative hypothesis: true rate ratio is not equal to 1
  93 percent confidence interval:
     1.006334 146.142032
  sample estimates:
  rate ratio 
    28.24859
The lower bound of the CI approaches a rate ratio = 1 for a 93% confidence interval.

Interestingly, if you multiply the CI I claimed before by the rate ratio instead of the expected rate, you get almost exactly the same CI as here.

  > ci <- c(0.03562718, 5.17251332)
  > 28.24859 * ci
  [1]   1.006418 146.116208
 
* Note 11800 is about two years of pedestrian deaths and time units are in millions of miles. https://crashstats.nhtsa.dot.gov/Api/Public/ViewPublication/...


Facinating, thank you. Particularly the part about multiplying the CI. I wonder if the analysis could be resuced to some extent? I feel there must be a way to use the information we have do draw some conclusions, at least relative to some explicit assumptions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: