Shapiro-Wilk and Shapiro-Francia normality tests.
Updated 18 Jun 2014
Shapiro-Wilk parametric hypothesis test of composite normality, for sample size 3<= n <= 5000. Based on Royston R94 algorithm.
This test also performs the Shapiro-Francia normality test for platykurtic samples.
Ahmed BenSaïda (2023). Shapiro-Wilk and Shapiro-Francia normality tests. (https://www.mathworks.com/matlabcentral/fileexchange/13964-shapiro-wilk-and-shapiro-francia-normality-tests), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Inspired: SimOutUtils, BoxPlotPro, Weighted Nonlinear Curve Fit Script with Plotter, Reference Interval Verification and Definition
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
- Improved precision for sample size = 3;
Change the value in line 136 to 0.26758 instead of 0.026758 (Shapiro-Francia) to correct the significance level. Thanks to Kent Parsons for his remarks.