Hello, Gurus: I tried to test if the sample mean of a dataset is zero. The data has 1500 numbers with a lot of zeros and some small positive numbers. The data range on [0,1] but the distribution is unknown. It is zero inflated anyway. I tried to use the Wilcoxon Signed Ranks test. But I read from this website that it does assume the population pdf is symmetric. http://www.cas.lancs.ac.uk/glossary_v1.1/nonparam.html#wsrt "The Wilcoxon Signed Ranks test does not require the assumption that the population is normally distributed. In many applications, this test is used in place of the one sample t-test<http://www.cas.lancs.ac.uk/glossary_v1.1/hyptest.html#1sampt>when the normality assumption is questionable. It is a more powerful alternative to the sign test, but does assume that the population probability distribution is symmetric." I wonder if wilcox.test( ) in R also assumes the symmetric pdf? I checked the sign test too. But "the sign *test* is not *testing equality*of population " If wilcox.test() cannot work for my data, I wonder if you could suggest a kind of test? I already tried t-test (assume normality) but I want to find something else. Many thanks! S [[alternative HTML version deleted]]
---------- Forwarded message ---------- From: HelponR <suncertain@gmail.com> Date: Dec 19, 2006 9:28 AM Subject: nonparametric significance test for one sample To: r-help <r-help@stat.math.ethz.ch> Hello, Gurus: I tried to test if the sample mean of a dataset is zero. The data has 1500 numbers with a lot of zeros and some small positive numbers. The data range on [0,1] but the distribution is unknown. It is zero inflated anyway. I tried to use the Wilcoxon Signed Ranks test. But I read from this website that it does assume the population pdf is symmetric. http://www.cas.lancs.ac.uk/glossary_v1.1/nonparam.html#wsrt "The Wilcoxon Signed Ranks test does not require the assumption that the population is normally distributed. In many applications, this test is used in place of the one sample t-test<http://www.cas.lancs.ac.uk/glossary_v1.1/hyptest.html#1sampt>when the normality assumption is questionable. It is a more powerful alternative to the sign test, but does assume that the population probability distribution is symmetric." I wonder if wilcox.test( ) in R also assumes the symmetric pdf? I checked the sign test too. But "the sign *test* is not *testing equality*of population " If wilcox.test() cannot work for my data, I wonder if you could suggest a kind of test? I already tried t-test (assume normality) but I want to find something else. Many thanks! S [[alternative HTML version deleted]]
If you data is truly limited to be non-negative and you are testing a null hypothesis that the true distribution mean is 0, then the test is fairly straight forward. There exists only one distribution with mean 0 and all values required to be >= 0 and that is a point mass of 1 at 0. So if all of your data values are 0 then that means a p-value of 1 and if any data values are greater than 0 (even if it is only 1 value and it is only slightly greater than 0) then the p-value is 0. If you want to then estimate what the true mean is for an unknown distribution, then you may want to look at using a bootstrap estimate. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at intermountainmail.org (801) 408-8111 -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of HelponR Sent: Tuesday, December 19, 2006 8:29 AM To: r-help Subject: [R] nonparametric significance test for one sample Hello, Gurus: I tried to test if the sample mean of a dataset is zero. The data has 1500 numbers with a lot of zeros and some small positive numbers. The data range on [0,1] but the distribution is unknown. It is zero inflated anyway. I tried to use the Wilcoxon Signed Ranks test. But I read from this website that it does assume the population pdf is symmetric. http://www.cas.lancs.ac.uk/glossary_v1.1/nonparam.html#wsrt "The Wilcoxon Signed Ranks test does not require the assumption that the population is normally distributed. In many applications, this test is used in place of the one sample t-test<http://www.cas.lancs.ac.uk/glossary_v1.1/hyptest.html#1sampt>when the normality assumption is questionable. It is a more powerful alternative to the sign test, but does assume that the population probability distribution is symmetric." I wonder if wilcox.test( ) in R also assumes the symmetric pdf? I checked the sign test too. But "the sign *test* is not *testing equality*of population " If wilcox.test() cannot work for my data, I wonder if you could suggest a kind of test? I already tried t-test (assume normality) but I want to find something else. Many thanks! S [[alternative HTML version deleted]] ______________________________________________ R-help at stat.math.ethz.ch 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.
Hi, Greg: Just let you know that the beta regression package in R can only work for data on the open interval (0, 1) Do you know any good test of mean for beta distribution? How to verify if the data is beta distributed? For example, I may want to test the null : mean <= 0.0000000001 I think your idea of testing zero for nonnegative numbers makes sense. But it seems to make a null hypothesis on a distribution, not simply mean. I could be bettered off if I can find a good nonparametric test which does not assume symmetry or a test for beta distribution if the beta distribution can be verified. Many thanks, S On 12/20/06, HelponR <suncertain@gmail.com> wrote:> > Many thanks. Thanks again for the idea of testing the mean zero for > nonnegative numbers. It is super. > > On 12/20/06, Greg Snow <Greg.Snow@intermountainmail.org> wrote: > > > > > > You may also want to look at the betareg package. > > > > -----Original Message----- > > From: HelponR [mailto:suncertain@gmail.com <suncertain@gmail.com>] > > Sent: Tue 12/19/2006 4:23 PM > > To: Greg Snow > > Subject: Re: [R] nonparametric significance test for one sample > > > > Thanks a lot, Greg. > > > > Yes, the data is on [0, 1] for sure. They are actually probabilities. > > > > Many thanks. > > > > HS > > > > On 12/19/06, Greg Snow <Greg.Snow@intermountainmail.org> wrote: > > > > > > If you data is truly limited to be non-negative and you are testing a > > > null hypothesis that the true distribution mean is 0, then the test is > > > fairly straight forward. There exists only one distribution with mean > > 0 > > > and all values required to be >= 0 and that is a point mass of 1 at 0. > > > So if all of your data values are 0 then that means a p-value of 1 and > > > if any data values are greater than 0 (even if it is only 1 value and > > it > > > is only slightly greater than 0) then the p-value is 0. > > > > > > If you want to then estimate what the true mean is for an unknown > > > distribution, then you may want to look at using a bootstrap estimate. > > > > > > > > Hope this helps, > > > > > > > > > -- > > > Gregory (Greg) L. Snow Ph.D. > > > Statistical Data Center > > > Intermountain Healthcare > > > greg.snow@intermountainmail.org > > > (801) 408-8111 > > > > > > > > > -----Original Message----- > > > From: r-help-bounces@stat.math.ethz.ch > > > [mailto:r-help-bounces@stat.math.ethz.ch<r-help-bounces@stat.math.ethz.ch>] > > On Behalf Of HelponR > > > Sent: Tuesday, December 19, 2006 8:29 AM > > > To: r-help > > > Subject: [R] nonparametric significance test for one sample > > > > > > Hello, Gurus: > > > > > > I tried to test if the sample mean of a dataset is zero. > > > > > > The data has 1500 numbers with a lot of zeros and some small positive > > > numbers. The data range on [0,1] but the distribution is unknown. > > > It is zero inflated anyway. > > > > > > I tried to use the Wilcoxon Signed Ranks test. But I read from this > > > website that it does assume the population pdf is symmetric. > > > > > > http://www.cas.lancs.ac.uk/glossary_v1.1/nonparam.html#wsrt > > > "The Wilcoxon Signed Ranks test does not require the assumption that > > the > > > population is normally distributed. In many applications, this test is > > > > > used in place of the one sample > > > t-test<http://www.cas.lancs.ac.uk/glossary_v1.1/hyptest.html#1sampt > > >when > > > the normality assumption is questionable. It is a more powerful > > > alternative to the sign test, but does assume that the population > > > probability distribution is symmetric." > > > > > > I wonder if wilcox.test( ) in R also assumes the symmetric pdf? > > > > > > I checked the sign test too. But "the sign *test* is not *testing > > > equality*of population " > > > > > > If wilcox.test () cannot work for my data, I wonder if you could > > suggest > > > a kind of test? I already tried t-test (assume normality) but I want > > to > > > find something else. > > > > > > Many thanks! > > > > > > S > > > > > > [[alternative HTML version deleted]] > > > > > > ______________________________________________ > > > R-help@stat.math.ethz.ch mailing list > > > https://stat.ethz.ch/mailman/listinfo/r-help > > > PLEASE do read the posting guide > > > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > > > and provide commented, minimal, self-contained, reproducible code. > > > > > > > > > > >[[alternative HTML version deleted]]
HelponR <suncertain <at> gmail.com> writes:> > Hi, Greg: > > Just let you know that the beta regression package in R can only work for > data on the open interval (0, 1) > > Do you know any good test of mean for beta distribution? How to verify > if the data is beta distributed? > > For example, I may want to test the null : > > mean <= 0.0000000001 > > I think your idea of testing zero for nonnegative numbers makes sense. But > it seems to make a null hypothesis on a distribution, not simply mean. > > I could be bettered off if I can find a good nonparametric test which does > not assume symmetry or a test for beta distribution if the beta > distribution can be verified. > > Many thanks, > > SPossibly contrary to what the documentation for the beta regression package, the beta distribution has finite density for 0 and 1 _if_ the shape parameters are large enough/variance parameter is small enough (but probably this is not your situation, if you have lots of zeros). fitdistr() in the MASS package will give a maximum-likelihood fit of the beta distribution to a univariate distribution, but if you want to calculate profile confidence limits etc. you might want to look into the mle() function in the stats4 package ... Ben Bolker