1

I have a data set constisting of gender and years (2010 representing before the improvement and 2012 representing after the improvement) and another table comparing age against the years:

      Before  After
       2010   2012
       420    365
       628    503

(1st row = women, 2nd row = men)

      Before  After
       2010   2102
       202    142
       280    223
       485    503

( 1st row = 18-40, 2nd row = 41-65, 3rd row = >65)

I want to see if there is any difference between 2010 compared to 2012, for women and then for men, and also for each of the ages. How can I go about to do that? What test should I use? Unpaired two sided t test? Or a test to compare the proportions?

Anno
  • 15
  • 4
  • What are these values? Are they counted events or are they measured values? – Bernhard Nov 21 '17 at 11:58
  • They are counted events, so for example 1st row = 18-40 there are 202 persons Before and 142 persons After. – Anno Nov 21 '17 at 13:00
  • So do you want to know whether that differs from an even split? That would be (202+142)/2 in each year? – mdewey Nov 21 '17 at 13:27

1 Answers1

0

This can be done with further assumptions. In the most simple case, we consider the number of events Poisson distributed. In that case, you can do a Poisson test to see, whether 420 "women before" differ from "365 women after". In R this can be done in

poisson.test(c(420,365))

yielding the following result:

Comparison of Poisson rates

data:  c(420, 365) time base: 1
count1 = 420, expected count1 = 392.5, p-value = 0.05387
alternative hypothesis: true rate ratio is not equal to 1
95 percent confidence interval:
 0.9977135 1.3275947
sample estimates:
rate ratio 
  1.150685 

Thus $p > 0.05$ and thereby not significantly different. You don't have enough data to back the assumption of Poisson distribution, but maybe you can argue, whether this is a reasonable or not reasonable assumption from your knowledge of what these numbers mean. https://en.wikipedia.org/wiki/Poisson_distribution#Assumptions:_When_is_the_Poisson_distribution_an_appropriate_model.3F

Bernhard
  • 8,427
  • 17
  • 38