0

I'm looking at an astronomical object. In one observation, it does something (not relevant what :) 2199 times out of a possible 2936.

In another (later) observation, it occurred 2094 times out of a possible 2936.

Is it possible to say anything about whether the object has changed at all, or if the change from 2199 to 2094 is just a statistical thing?

Perhaps I have to find the mean of the two = 2146, then approximate by assuming Poisson stats to say that standard deviation = sqrt(2146) = 46. And then I can say that both of the samples above are within 1 sigma of the mean.

This doesn't seem quite fair thought because you are finding a mean FROM the samples, so of course the mean is going to be quite close to both of them.

I was thinking about using binomial stats to find the variance, but I don't know 'p'.

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
user1551817
  • 1,007
  • 1
  • 8
  • 11
  • 1
    What about a 2 sample test for proportions? I.e., comparing the null hypothesis $H_0:p_1 = p_2$ vs. $H_A:p_1\neq p_2$. This of course would depend upon if you can say that the two samples you looked at are independent, which in your case doesn't sound like the case. – RustyStatistician Feb 12 '16 at 23:42
  • 1
    Actually you can use McNemars test for dependent proportions. Here is something similar: http://stats.stackexchange.com/questions/34430/comparing-proportions-from-the-same-sample-of-patients – RustyStatistician Feb 12 '16 at 23:48
  • 3
    @RustyStatistician the user hasn't necessarily claimed the experiments were paired. – AdamO Feb 13 '16 at 00:02
  • 1
    @AdamO my apologies. I didn't realize McNemars test was for paired samples. – RustyStatistician Feb 13 '16 at 00:12
  • Thank you. What does it mean for them to be independent? They are from the same source, but that is all. – user1551817 Feb 13 '16 at 00:44
  • 2
    You say Poisson stats, but shouldn't this be a binomial stats case? – jwimberley Jan 03 '17 at 01:44
  • 1
    I think this question addresses what you need: http://stats.stackexchange.com/questions/123609/exact-two-sample-proportions-binomial-test-in-r-and-some-strange-p-values. You can use the R functions `prop.test` or `fisher.test` (the latter is more exact but likely unnecessary given your sample size). – jwimberley Jan 03 '17 at 01:48
  • Could the time order be important here? You could show us some plots in time order, or do you know time is not important? – kjetil b halvorsen Apr 13 '19 at 12:50

1 Answers1

0

If each yes/no observation here really is independent of the others, this is a binomial situation, and you ask if the binomial probability parameter $p$ has changed. We can represent your data then as a contingency table, and do a chi-squared test. Using R:

 yourdata
               Yes   No
Observation 1 2199  737
Observation 2 2094  842

  chisq.test(yourdata)

    Pearson's Chi-squared test with Yates' continuity correction

data:  yourdata
X-squared = 9.3694, df = 1, p-value = 0.002206

But how large is the difference in $p$'s between the two occasions? A confidence interval would be useful:

prop.test(yourdata)

    2-sample test for equality of proportions with continuity correction

data:  yourdata
X-squared = 9.3694, df = 1, p-value = 0.002206
alternative hypothesis: two.sided
95 percent confidence interval:
 0.01275936 0.05876652
sample estimates:
   prop 1    prop 2 
0.7489782 0.7132153 
```     
kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467