Logo of the Physikalisch-Technische Bundesanstalt

Download Shapiro-Wilk test

NameInitiates file downloadShapiro-Wilk test example (xlsx)
TypeMicrosoft Excel (created under Office 365 ProPlus Version 16.0.11328.20420)



In metrology, quite often the normal distribution is presumed, among others when the result of a measurement and its uncertainty are evaluated, or when the equivalence of measurements in key or supplementary comparisons is to be decided. The validation of this assumption is vital, because the correctness of the inference and subsequent conclusions is dependent on the Normality assumption. Hypothesis testing is the formal statistical framework to do so.

Thus also in metrology questions arise such as, how to set up hypothesis tests to detect violations of distributional assumptions, how to perform them, and which conclusion(s) to draw. In addition, the number of measurements needs to be calculated which are required to decide whether a process departs from a Normal distribution and it needs to be quantified how sure one is about this decision then.



The Shapiro-Wilk test is a powerful Normality test. For a Opens external link in new windowqualification procedure in legal metrology it is recommended to perform this test on a sample of 330 measurements. To support the implementation of the qualification procedure (Opens external link in new windowsee also K. Klauenberg and C. Elster 2019), PTB working group 8.42 has developed this Excel application, which includes a so-called Bonferroni correction for multiple samples and aims at a familywise type I error of at most 10% (i.e. would each of the multiple samples originate from a Normal distribution, then repeated testing would reject at most 10% of new multiple samples).

By inserting new measurements of a sample into the sheet „MeasurementDeviations“ and extending the sheets „Overview“, „ MeasurementDeviations“ and „SortedMeasurementDeviations“ to more than two samples, if necessary, the Shapiro-Wilk test can be applied to new data. For different sample sizes and different type I errors the coefficients and the critical values of the test need to be adjusted, respectively (seeOpens external link in new window Royston 1992).