# comparing proportions

7 messages
Open this post in threaded view
|
Report Content as Inappropriate

## comparing proportions

 Hi, I have a dataset that has 2 groups of samples. For each sample, then response measured is the number of success (no.success) obatined with the number of trials (no.trials). So a porportion of success (prpop.success) can be computed as no.success/no.trials. Now the objective is to test if there is a statistical significant difference in the proportion of success between the 2 groups of samples (say n1=20, n2=30). I can think of 2 ways to do the test: 1. regular t test based on the variable prop.success 2. Mann-Whitney test based on the variable prop.success 2. do a binomial regression as:     fit<-glm(cbind(no.success,no.trials-no.success) ~ group, data=data,          family=binomial)     anova(fit, test='Chisq') My questions is: 1. Is t test appropriate for comparing 2 groups of proportions? 2. how about Mann-Whitney non-parametric test? 3. Among the 3, which technique is more appropriate? 4. any other technique you can suggest? Thank you, John               [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: comparing proportions

 Hi Bert, Thanks for your reply. If I understand correctly, prop.test() is not suitable to my situation. The input to prop.test() is 2 numbers for each group (# of success and # of trials, for example, groups 1 has 5 success out of 10 trials; group 2 has 3 success out of 7 trials; etc. prop.test() tests whether the probability of success is the same across groups. In my case, each group has several subjects and each subject has 2 numbers (# success and # trials). So for group 1: subject 1: 5 success, 10 trials subject 2: 3 success, 8 trials : : for group 2: subject a: 7 success, 9 trials subject b: 6 success, 7 trials : : I want to test whether the probability of success in group 1 is the same as in group 2. It's like comparing 2 groups of samples using t test, what I am uncertain about is that whether regular t test (or non-pamametric test) is still appropriate here when the response variable is actually proportions. I guess prop.test() can not be used with my dataset, or I may be wrong? Thanks John       ________________________________ From: Bert Gunter <[hidden email]> Sent: Wed, February 9, 2011 3:58:05 PM Subject: Re: [R] comparing proportions 1. Is this a homework problem? 2. ?prop.test 3. If you haven't done so already, get and consult a basic statistical methods book to help you with questions such as this. -- Bert > Hi, I have a dataset that has 2 groups of samples. For each sample, then > response measured is the number of success (no.success) obatined with the >number > of trials (no.trials). So a porportion of success (prpop.success) can be > computed as no.success/no.trials. Now the objective is to test if there is a > statistical significant difference in the proportion of success between the 2 > groups of samples (say n1=20, n2=30). > > I can think of 2 ways to do the test: > > 1. regular t test based on the variable prop.success > 2. Mann-Whitney test based on the variable prop.success > 2. do a binomial regression as: >     fit<-glm(cbind(no.success,no.trials-no.success) ~ group, data=data, >          family=binomial) >     anova(fit, test='Chisq') > > My questions is: > 1. Is t test appropriate for comparing 2 groups of proportions? > 2. how about Mann-Whitney non-parametric test? > 3. Among the 3, which technique is more appropriate? > 4. any other technique you can suggest? > > Thank you, > > John > > > >        [[alternative HTML version deleted]] > > > ______________________________________________ > [hidden email] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code. > > -- Bert Gunter Genentech Nonclinical Biostatistics               [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: comparing proportions

 prop.test() is applicable to a binomial experiment in each of two classes. Your experiment is binomial only at the subject level. You then have multiple subjects in each of your groups. You have a random factor "Subjects" that must be accounted for. The best way to analyze is a generalized linear mixed model with a binomial distribution family and a logit or probit link. You will probably have to investigate overdispersion. If you have a small number of subjects, and don't care about the among-subject effect, you can model them as fixed effects and use glm() instead. Your original question, I believe, related to doing an ANOVA assuming normality. In order for this to work with this kind of proportion problem, you generally won't get good results unless the number of replicates per subject is 12 or more, and the proportions involved are within 0.15 to 0.85. Otherwise you will have biased confidence intervals and significance tests. At 07:51 PM 2/9/2011, array chip wrote: >Content-type: text/plain >Content-disposition: inline >Content-length: 2969 > >Hi Bert, > >Thanks for your reply. If I understand correctly, prop.test() is not >suitable to >my situation. The input to prop.test() is 2 numbers for each group >(# of success >and # of trials, for example, groups 1 has 5 success out of 10 >trials; group 2 >has 3 success out of 7 trials; etc. prop.test() tests whether the >probability of >success is the same across groups. > >In my case, each group has several subjects and each subject has 2 numbers (# >success and # trials). So > >for group 1: >subject 1: 5 success, 10 trials >subject 2: 3 success, 8 trials >: >: > >for group 2: >subject a: 7 success, 9 trials >subject b: 6 success, 7 trials >: >: > >I want to test whether the probability of success in group 1 is the >same as in >group 2. It's like comparing 2 groups of samples using t test, what I am >uncertain about is that whether regular t test (or non-pamametric >test) is still >appropriate here when the response variable is actually proportions. > >I guess prop.test() can not be used with my dataset, or I may be wrong? > >Thanks > >John > > > > > > > >________________________________ >From: Bert Gunter <[hidden email]> > >Sent: Wed, February 9, 2011 3:58:05 PM >Subject: Re: [R] comparing proportions > >1. Is this a homework problem? > >2. ?prop.test > >3. If you haven't done so already, get and consult a basic statistical >methods book to help you with questions such as this. > >-- Bert > > > > Hi, I have a dataset that has 2 groups of samples. For each sample, then > > response measured is the number of success (no.success) obatined with the > >number > > of trials (no.trials). So a porportion of success (prpop.success) can be > > computed as no.success/no.trials. Now the objective is to test if > there is a > > statistical significant difference in the proportion of success > between the 2 > > groups of samples (say n1=20, n2=30). > > > > I can think of 2 ways to do the test: > > > > 1. regular t test based on the variable prop.success > > 2. Mann-Whitney test based on the variable prop.success > > 2. do a binomial regression as: > >     fit<-glm(cbind(no.success,no.trials-no.success) ~ group, data=data, > >          family=binomial) > >     anova(fit, test='Chisq') > > > > My questions is: > > 1. Is t test appropriate for comparing 2 groups of proportions? > > 2. how about Mann-Whitney non-parametric test? > > 3. Among the 3, which technique is more appropriate? > > 4. any other technique you can suggest? > > > > Thank you, > > > > John > > > > > > > >        [[alternative HTML version deleted]] > > > > > > ______________________________________________ > > [hidden email] mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help> > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > > > > > > > >-- >Bert Gunter >Genentech Nonclinical Biostatistics > > > > >         [[alternative HTML version deleted]] > > >______________________________________________ >[hidden email] mailing list >https://stat.ethz.ch/mailman/listinfo/r-help>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html>and provide commented, minimal, self-contained, reproducible code. ================================================================ Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: [hidden email] Least Cost Formulations, Ltd.            URL: http://lcfltd.com/824 Timberlake Drive                     Tel: 757-467-0954 Virginia Beach, VA 23464-3239            Fax: 757-467-2947 "Vere scire est per causas scire" ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: comparing proportions

Open this post in threaded view
|
Report Content as Inappropriate

## Re: comparing proportions

Open this post in threaded view
|
Report Content as Inappropriate

## Re: comparing proportions

Open this post in threaded view
|
Report Content as Inappropriate