EnvStats by Steven P. Millard
Author:Steven P. Millard
Language: eng
Format: epub
Publisher: Springer New York, New York, NY
gofGroupTest
Shapiro-Wilk, Shapiro-Francia, and PPCC goodness-of-fit tests for normality for two or more groups
gofCensoredTest
Shapiro-Wilk, Shapiro-Francia, and PPCC goodness-of-fit tests for normality for censored data
7.2.1 One Sample Goodness-of-Fit Tests for Normality
In Chaps. 1 and 3 we saw that the Reference area TcCB data appear to come from a lognormal distribution based on a histogram (Fig. 1.2), an empirical cdf plot (Fig. 1.5), a normal Q-Q plot (Fig. 1.7), a Tukey mean-difference Q-Q plot (Fig. 1.8), and a plot of the probability plot correlation coefficient (PPCC) versus λ for a variety of Box-Cox transformations (Fig. 3.7). In Sect. 1.11.7 we showed the results of using the Shapiro-Wilk test to test the adequacy of the lognormal distribution. Here we will formally test whether the Reference area TcCB data appear to come from a normal distribution versus a lognormal distribution, and in the call to gofTest for testing lognormality we will specify using the alternative parameterization of the lognormal distribution (i.e., estimating the mean and CV of the original distribution).
> attach(EPA.94b.tccb.df)
> TcCB.Ref < - TcCB[Area == "Reference"]
> sw.list.norm < - gofTest(TcCB.Ref)
> sw.list.norm
Results of Goodness-of-Fit Test
-------------------------------
Test Method: Shapiro-Wilk GOF
Hypothesized Distribution: Normal
Estimated Parameter(s): mean = 0.5985106
sd = 0.2836408
Estimation Method: mvue
Data: TcCB.Ref
Sample Size: 47
Test Statistic: W = 0.9176408
Test Statistic Parameter: n = 47
P-value: 0.002768207
Alternative Hypothesis: True cdf does not equal the
Normal Distribution.
> sw.list.lnormAlt < - gofTest(TcCB.Ref, dist = "lnormAlt")
> sw.list.lnormAlt
Results of Goodness-of-Fit Test
-------------------------------
Test Method: Shapiro-Wilk GOF
Hypothesized Distribution: Lognormal
Estimated Parameter(s): mean = 0.5989072
cv = 0.4899539
Estimation Method: mvue
Data: TcCB.Ref
Sample Size: 47
Test Statistic: W = 0.978638
Test Statistic Parameter: n = 47
P-value: 0.5371935
Alternative Hypothesis: True cdf does not equal the
Lognormal Distribution.
The p-value for the test of normality (p = 0.003) clearly indicates that we should not assume the Reference area TcCB data come from a normal distribution, but the assumption of a lognormal distribution appears to be adequate (p = 0.54). Figures 7.1 and 7.2 show companion plots for the results of the Shapiro-Wilk tests for normality and lognormality, respectively. These plots include the observed distribution overlaid with the fitted distribution, the observed and fitted CDF, the normal Q-Q plot, and the results of the hypothesis test. They were created with these commands:
Fig. 7.1Companion plots for the Shapiro-Wilk test for normality for the Reference area TcCB data
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(7398)
Supercharging Productivity with Trello by Brittany Joiner(6658)
Mastering Tableau 2023 - Fourth Edition by Marleen Meier(6426)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6423)
Inkscape by Example by István Szép(6273)
Visualize Complex Processes with Microsoft Visio by David J Parker & Šenaj Lelić(5970)
Build Stunning Real-time VFX with Unreal Engine 5 by Hrishikesh Andurlekar(4972)
Design Made Easy with Inkscape by Christopher Rogers(4638)
Customizing Microsoft Teams by Gopi Kondameda(4176)
Linux Device Driver Development Cookbook by Rodolfo Giometti(3939)
Extending Microsoft Power Apps with Power Apps Component Framework by Danish Naglekar(3762)
Business Intelligence Career Master Plan by Eduardo Chavez & Danny Moncada(3747)
Salesforce Platform Enterprise Architecture - Fourth Edition by Andrew Fawcett(3639)
Pandas Cookbook by Theodore Petrou(3614)
The Tableau Workshop by Sumit Gupta Sylvester Pinto Shweta Sankhe-Savale JC Gillet and Kenneth Michael Cherven(3414)
TCP IP by Todd Lammle(2991)
Drawing Shortcuts: Developing Quick Drawing Skills Using Today's Technology by Leggitt Jim(2924)
Applied Predictive Modeling by Max Kuhn & Kjell Johnson(2884)
Exploring Microsoft Excel's Hidden Treasures by David Ringstrom(2880)
