Hi everybody, somehow i dont get the shapiro wilk test for normality. i just can?t find what the H0 is . i tried : shapiro.test(rnorm(5000)) Shapiro-Wilk normality test data: rnorm(5000) W = 0.9997, p-value = 0.6205 If normality is the H0, the test says it?s probably not normal, doesn ?t it ? 5000 is the biggest n allowed by the test... are there any other test ? ( i know qqnorm already ;) thanks in advance matthias
At 11:30 AM 7/12/2008, Bunny, lautloscrew.com wrote:>Hi everybody, > >somehow i dont get the shapiro wilk test for normality. i just can?t >find what the H0 is . > >i tried : > > shapiro.test(rnorm(5000)) > > Shapiro-Wilk normality test > >data: rnorm(5000) >W = 0.9997, p-value = 0.6205 > > >If normality is the H0, the test says it?s probably not normal, doesn ?t it ? > >5000 is the biggest n allowed by the test... > >are there any other test ? ( i know qqnorm already ;) > >thanks in advance > >matthiasYes, H0 is "normality". The P-value, as for other statistical tests, measures the probability that this sample could have arisen from the population under H0. 0.62 is a probability very compatible with H0. The typical rejection criterion would be a P-value < 0.05, which is not the case here. The limitation to n = 5000 is not serious, as even a few hundred data should take you to the asymptotic region. Use sample() to select the data at random from within your data set to avoid bias in using the test. E.g., shapiro.test(sample(mydata, 1000, replace=TRUE)) ===============================================================Robert A. LaBudde, PhD, PAS, Dpl. ACAFS e-mail: ral at lcfltd.com 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" ================================================================
Hmm thanks, But on the other hand it just says i cant reject normality, which doesnt really mean it is normal. Wouldn?t be nice to test for non- normality ? if i?d reject that a high level i could be pretty sure it ?s normal... ?? thanks in advance matthias Am 12.07.2008 um 18:10 schrieb Mark Leeds:> Hi: If normality is the HO, then the test below says don't reject > ( large p > value ). Check out any multivariate text for what the null of the > shapiro > test is. I don't know for sure but, from below, it sure looks like > HO is > normality. Or google for it. > > > > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org > ] On > Behalf Of Bunny, lautloscrew.com > Sent: Saturday, July 12, 2008 11:30 AM > To: r-help at r-project.org > Subject: [R] shapiro wilk normality test > > Hi everybody, > > somehow i dont get the shapiro wilk test for normality. i just can?t > find what the H0 is . > > i tried : > > shapiro.test(rnorm(5000)) > > Shapiro-Wilk normality test > > data: rnorm(5000) > W = 0.9997, p-value = 0.6205 > > > If normality is the H0, the test says it?s probably not normal, doesn > ?t it ? > > 5000 is the biggest n allowed by the test... > > are there any other test ? ( i know qqnorm already ;) > > thanks in advance > > matthias > ______________________________________________ > R-help at r-project.org 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. >
At 12:48 PM 7/12/2008, Bunny, lautloscrew.com wrote:>first of all thanks yall. it?s always good to get it from people that >know for sure. > >my bad, i meant to say it?s compatible with normality. i just wanted >to know if it wouldnt be better to test for non-normality in order to >know for "sure". >and if so, how can i do it?Doing a significance test may seem complicated, but it's an almost trivial concept. You assume some "null hypothesis" that specifies a unique distribution that you can use to calculate probabilities from. Then use this distribution to calculate the probability of finding what you found in your data, or more extreme. This is the P-value of the test. It is the probability of finding what you found, given that the null hypothesis is true. You give up ("reject") the null hypothesis if this P-value is too unbelievably small. The conventional measure for ordinary, repeatable experiments is 0.05. Sometimes a smaller value like 0.01 is more reasonable. Doing what has been suggested, i.e., using a null hypothesis of "nonnormality", is unworkable. There are uncountably infinite ways to specify a "nonnormal" distribution. Is it discrete or continuous? Is it skewed or symmetric? Does it go from zero to infinity, from 0 to 1, from -infinity to infinity, or anything else? Does it have one mode or many? Is it continuous or differentiable? Etc. In order to do a statistical test, you must be able to calculate the P-value. That usually means your null hypothesis must specify a single, unique probability distribution. So "nonnormal" in testing means "reject normal as the distribution". "Nonnormal" is not defined other than it's not the normal distribution. If you wish to test how the distribution is nonnormal, within some family of nonnormal distributions, you will have to specify such a null hypothesis and test for deviation from it. E.g., testing for coefficient of skewness = 0. ===============================================================Robert A. LaBudde, PhD, PAS, Dpl. ACAFS e-mail: ral at lcfltd.com 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" ================================================================
You may consider the nortest package. http://cran.r-project.org/web/packages/nortest/index.html Regards, CH On Sat, Jul 12, 2008 at 11:30 PM, Bunny, lautloscrew.com <bunny at lautloscrew.com> wrote:> Hi everybody, > > somehow i dont get the shapiro wilk test for normality. i just can?t find > what the H0 is . > > i tried : > > shapiro.test(rnorm(5000)) > > Shapiro-Wilk normality test > > data: rnorm(5000) > W = 0.9997, p-value = 0.6205 > > > If normality is the H0, the test says it?s probably not normal, doesn?t it ? > > 5000 is the biggest n allowed by the test... > > are there any other test ? ( i know qqnorm already ;) > > thanks in advance > > matthias > ______________________________________________ > R-help at r-project.org 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. >-- CH Chan Research Assistant - KWH http://www.macgrass.com
Hi! Well, if you look at the output: shapiro.test(rnorm(5000))> > Shapiro-Wilk normality test > > data: rnorm(5000) > W = 0.9997, p-value = 0.6205You can see that the p-value is 0.6205 so you can't refuse the normality hypotesis. H0: normal data vs H1: not normal So shapiro.wilk test is saying that your data are normal and it's correct! Bye Marta ----- Messaggio originale ----- Da: C.H. <chainsawtiney@gmail.com> A: "Bunny, lautloscrew.com" <bunny@lautloscrew.com> Cc: r-help@r-project.org Inviato: Domenica 13 luglio 2008, 7:27:43 Oggetto: Re: [R] shapiro wilk normality test You may consider the nortest package. http://cran.r-project.org/web/packages/nortest/index.html Regards, CH On Sat, Jul 12, 2008 at 11:30 PM, Bunny, lautloscrew.com <bunny@lautloscrew.com> wrote:> Hi everybody, > > somehow i dont get the shapiro wilk test for normality. i just can´t find > what the H0 is . > > i tried : > > shapiro.test(rnorm(5000)) > > Shapiro-Wilk normality test > > data: rnorm(5000) > W = 0.9997, p-value = 0.6205 > > > If normality is the H0, the test says it´s probably not normal, doesn´t it ? > > 5000 is the biggest n allowed by the test... > > are there any other test ? ( i know qqnorm already ;) > > thanks in advance > > matthias > ______________________________________________ > R-help@r-project.org 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. >-- CH Chan Research Assistant - KWH http://www.macgrass.com ______________________________________________ R-help@r-project.org 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. Vuoi incontrare Rihanna? [[elided Yahoo spam]] [[alternative HTML version deleted]]