cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
TwentyNine
Level I

Is the Shapiro-Wilk statistic computed with the Royston test even for n<=50?

My company has limited JMP licenses, so I need to make a tool for non-JMP users that produces the same W statistic as JMP for small datasets (<=50 points).

 

The tool I produced by following the Shapiro-Wilk algorithm generates exactly the same output as this online tool (which only works for <=50 data points), which is also the same output as this tool up to 50 data points. The second tool switches to a different algorithm (the Royston algorithm, I think) for datasets larger than 50 points.

 

JMP produces the same output as the second tool for datasets with 51+ points, but does not match the output of either tool for <= 50 points. Does this mean that JMP does not actually use the original Shapiro-Wilk test for any number of data points?

 

Here are a couple of random datasets to compare results:

 

50 points (web tools produce same output as each other but different from JMP)

0.248101241
0.450073968
0.224529778
0.802125187
0.608997717
0.126359546
0.189416694
0.797726633
0.289777998
0.900884889
0.850659126
0.229857424
0.080467456
0.649702732
0.608165252
0.937654307
0.940220447
0.990420382
0.598793624
0.835389209
0.412415193
0.091544827
0.548241223
0.690017412
0.259088029
0.141445888
0.446677138
0.412718957
0.857160428
0.203152717
0.682450466
0.315887776
0.330362305
0.95360633
0.469931725
0.272978413
0.027425522
0.817982229
0.997688689
0.122165442
0.465505757
0.969130668
0.992952417
0.592758008
0.507822738
0.587875494
0.883556267
0.249496424
0.118255434
0.603700514

60 points (second tool produces same output as JMP)

0.248101241
0.450073968
0.224529778
0.802125187
0.608997717
0.126359546
0.189416694
0.797726633
0.289777998
0.900884889
0.850659126
0.229857424
0.080467456
0.649702732
0.608165252
0.937654307
0.940220447
0.990420382
0.598793624
0.835389209
0.412415193
0.091544827
0.548241223
0.690017412
0.259088029
0.141445888
0.446677138
0.412718957
0.857160428
0.203152717
0.682450466
0.315887776
0.330362305
0.95360633
0.469931725
0.272978413
0.027425522
0.817982229
0.997688689
0.122165442
0.465505757
0.969130668
0.992952417
0.592758008
0.507822738
0.587875494
0.883556267
0.249496424
0.118255434
0.603700514
0.151526435
0.841586894
0.543917734
0.28113771
0.522754606
0.259412322
0.683260852
0.062356388
0.400691678
0.705478414
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Is the Shapiro-Wilk statistic computed with the Royston test even for n<=50?

I ran the Shapiro-Wilk test using SAS. SAS produces the same W statistic that JMP produces when analyzing your first example (Please note that I don't test any other test data).

Based on the following page, SAS uses the method of Royston (1992) when the number of samples is greater than three. I think JMP uses the same approrch.

https://documentation.sas.com/doc/en/pgmsascdc/v_036/procstat/procstat_univariate_details53.htm 

View solution in original post

2 REPLIES 2

Re: Is the Shapiro-Wilk statistic computed with the Royston test even for n<=50?

I ran the Shapiro-Wilk test using SAS. SAS produces the same W statistic that JMP produces when analyzing your first example (Please note that I don't test any other test data).

Based on the following page, SAS uses the method of Royston (1992) when the number of samples is greater than three. I think JMP uses the same approrch.

https://documentation.sas.com/doc/en/pgmsascdc/v_036/procstat/procstat_univariate_details53.htm 

TwentyNine
Level I

Re: Is the Shapiro-Wilk statistic computed with the Royston test even for n<=50?

Perfect, thank you!