3

I want to compare the following percentages:

a<-c(0.59,0.60,0.55,0.55,0.60,0.58,0.67,0.68)
b<-c(0.16,0.21,0.26,0.53,0.84,0.89,0.84,0.94)
  • the values for a are probabilities calculated with bayes rule
  • the values for b are number of instances out of the total

I did t.test(a,b)

Is this appropriate? if not how can I compare these two?

UPDATE: instead of looking at differences in means is it possible to look at correspondence valu by value? for example compare .59 to .16, then .6 to .21 etc

John
  • 21,167
  • 9
  • 48
  • 84
upabove
  • 2,657
  • 10
  • 30
  • 37
  • 2
    how were the proportions calculated?... give more details of the experiment – John Aug 23 '11 at 00:50
  • @John I've updated the question – upabove Aug 23 '11 at 06:47
  • Perhaps I wasn't clear, how about this... instead of describing the proportions you calculated, describe the data and experiment from which the proportions are calculated. – John Aug 23 '11 at 10:04
  • @John in a somewhat related but more extended question I describe it in more detail: http://stats.stackexchange.com/questions/14684/suggestions-for-summarizing-data-both-visually-and-statistically you can merge the two topics if you find it necessary. THank you – upabove Aug 23 '11 at 10:10

2 Answers2

3

Yeah, t.test(a,b) will come out OK. But, that's only because the means of a and b, are close to 0.5 and because they're both close to each other. A more general solution might not be to work with the proportions at all but the counts that go into those proportions and either do logistic regression or chi-square tests.

John
  • 21,167
  • 9
  • 48
  • 84
  • 1
    I would add that, with proportions, it's common to use an arcsine-square root transformation to stabilize the variance. – Karl Aug 23 '11 at 00:25
  • 1
    I don't think simple logistic regression of chi-square will apply here as the fact that there are calculable proportions within each group implies that the data have a hierarchical structure, in which case my previous answer applies: http://stats.stackexchange.com/questions/14449/how-to-test-for-significant-differences-in-means-across-four-within-subject-cond/14462#14462 – Mike Lawrence Aug 23 '11 at 00:31
  • implies... but there's really not enough info... nevertheless, if you're correct about the hierarchical structure then yes, your answer there is best. – John Aug 23 '11 at 00:49
  • @Mike Lawrence the question is about a completely different dataset and completeley different structure. As you can see we have TWO proportions here. – upabove Aug 23 '11 at 06:37
0

I would say prop.test() is appropriate for this data. see more information by ?prop.test

love-stats
  • 1,119
  • 3
  • 11
  • 16
  • 1
    `prop.test()` is appropriate only if the proportions are derived from counts. Sometimes data arises as a set of proportions with unknown denominators. – Karl Aug 23 '11 at 00:52