cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
%3CLINGO-SUB%20id%3D%22lingo-sub-100825%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E6%89%8B%E5%8B%95%E8%A8%88%E7%AE%97%20Shapiro-Wilk%20%E6%AA%A2%E9%A9%97%E7%B5%B1%E8%A8%88%E9%87%8F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-100825%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E5%A4%A7%E5%AE%B6%E5%A5%BD%EF%BC%8C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E6%9C%89%E8%AA%B0%E7%9F%A5%E9%81%93%E5%A6%82%E4%BD%95%E5%9C%A8JMP%E4%B8%AD%E5%AF%A6%E7%8F%BEShapiro-Wilk%E6%AA%A2%E9%A9%97%E7%B5%B1%E8%A8%88%E9%87%8F%E7%9A%84%E6%89%8B%E5%8B%95%E8%A8%88%E7%AE%97%EF%BC%9F%3C%2FP%3E%3CP%3E%E4%BD%BF%E7%94%A8%20JSL%20%E8%85%B3%E6%9C%AC%E5%92%8C%2F%E6%88%96%E5%88%97%E5%85%AC%E5%BC%8F%EF%BC%9F%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%E6%88%91%E7%9F%A5%E9%81%93JMP%20%E6%9C%AC%E8%BA%AB%E6%9C%83%E5%9C%A8%E2%80%9C%E5%88%86%E6%9E%90%E2%80%9D%26gt%3B%E2%80%9C%E5%88%86%E4%BD%88%E2%80%9D%E4%B8%AD%E9%80%B2%E8%A1%8C%E6%AD%A4%E8%A8%88%E7%AE%97%EF%BC%8C%E7%84%B6%E5%BE%8C%E5%9C%A8%E2%80%9C%E9%80%A3%E7%BA%8C%E6%93%AC%E5%90%88%E2%80%9D%26gt%3B%E2%80%9C%E6%AD%A3%E6%85%8B%E2%80%9D%26gt%3B%E2%80%9C%E6%93%AC%E5%90%88%E5%84%AA%E5%BA%A6%E2%80%9D%E4%B8%AD%E9%80%B2%E8%A1%8C%E6%AD%A4%E8%A8%88%E7%AE%97%EF%BC%8C%E4%BD%86%E6%88%91%E8%A9%A6%E5%9C%96%E9%87%8D%E7%8F%BE%E6%AA%A2%E9%A9%97%E7%B5%B1%E8%A8%88%E9%87%8F%E7%9A%84%E8%A8%88%E7%AE%97%E5%80%BC%EF%BC%8C%E4%BB%A5%E4%BE%BF%E6%9B%B4%E6%B7%B1%E5%85%A5%E5%9C%B0%E7%90%86%E8%A7%A3%E5%AE%83%E7%9A%84%E5%9F%BA%E7%A4%8E%E3%80%82%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E5%9C%A8%E7%B7%9A%E5%8F%83%E8%80%83%E6%96%87%E7%8D%BB%E4%B8%AD%E6%9C%89%E8%A8%B1%E5%A4%9A%E6%9C%89%E7%94%A8%E7%9A%84%E7%B7%9A%E7%B4%A2%EF%BC%8C%E4%BD%86%E6%88%91%E5%9C%A8%E5%B0%87%E9%80%99%E4%BA%9B%E7%A2%8E%E7%89%87%E7%B5%84%E5%90%88%E5%9C%A8%E4%B8%80%E8%B5%B7%E6%99%82%E9%81%87%E5%88%B0%E4%BA%86%E4%B8%80%E4%BA%9B%E5%9B%B0%E9%9B%A3%EF%BC%9A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FShapiro%25E2%2580%2593Wilk_test%23cite_note-8%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fen.wikipedia.org%2Fwiki%2FShapiro%25E2%2580%2593Wilk_test%23cite_note-8%3C%2FA%3E%3C%2FP%3E%3CP%3E%E4%BB%A5%E4%B8%8B%E6%98%AF%E4%B8%8A%E9%9D%A2%E7%B6%AD%E5%9F%BA%E7%99%BE%E7%A7%91%E9%8F%88%E6%8E%A5%E4%B8%AD%E5%BE%88%E5%A5%BD%E7%B8%BD%E7%B5%90%E7%9A%84%E5%9F%BA%E7%A4%8E%EF%BC%9A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22directly%20from%20wiki.JPG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22directly%20from%20wiki.JPG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22directly%20from%20wiki.JPG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F15032iC95B53270BB39F76%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22directly%20from%20wiki.JPG%22%20alt%3D%22directly%20from%20wiki.JPG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E9%80%99%E8%A3%A1%E9%82%84%E6%9C%89%E4%B8%80%E4%BA%9B%E4%BD%BF%E7%94%A8%20MS%20Excel%20%E7%9A%84%E6%9C%89%E7%94%A8%E7%B7%9A%E7%B4%A2%E3%80%82%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fwww.real-statistics.com%2Ftests-normality-and-symmetry%2Fstatistical-tests-normality-symmetry%2Fshapiro-wilk-test%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fwww.real-statistics.com%2Ftests-normality-and-symmetry%2Fstatistical-tests-normality-symmetry%2Fshapiro-wilk-test%2F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-105759%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E6%89%8B%E5%8B%95%E8%A8%88%E7%AE%97%20Shapiro-Wilk%20%E6%AA%A2%E9%A9%97%E7%B5%B1%E8%A8%88%E9%87%8F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-105759%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E8%AC%9D%E8%AC%9D%E4%BD%A0%EF%BC%8C%E9%80%99%E5%A4%AA%E6%A3%92%E4%BA%86%E3%80%82%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-105371%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E6%89%8B%E5%8B%95%E8%A8%88%E7%AE%97%20Shapiro-Wilk%20%E6%AA%A2%E9%A9%97%E7%B5%B1%E8%A8%88%E9%87%8F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-105371%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F10483%22%20target%3D%22_blank%22%3E%40%E5%B8%95%E7%89%B9%E9%87%8C%E5%85%8B%E6%9C%B1%E5%88%A9%E4%BA%9E%E8%AB%BE%3C%2FA%3E%E6%88%91%E4%B8%8D%E7%A2%BA%E5%AE%9A%E7%95%B6%E6%82%A8%E6%9C%89%E5%8F%AF%E4%BB%A5%E7%94%9F%E6%88%90%E7%B5%B1%E8%A8%88%E6%95%B8%E6%93%9A%E4%B8%A6%E4%B8%94%E5%8F%AF%E4%BB%A5%E5%BE%9E%E5%A0%B1%E5%91%8A%E4%B8%AD%E6%8F%90%E5%8F%96%E7%B5%B1%E8%A8%88%E6%95%B8%E6%93%9A%E7%9A%84%20JMP%20%E6%99%82%EF%BC%8C%E6%82%A8%E7%82%BA%E4%BB%80%E9%BA%BC%E8%A6%81%E6%89%8B%E5%8B%95%E5%9F%B7%E8%A1%8C%E6%AD%A4%E6%93%8D%E4%BD%9C%E3%80%82%E6%A8%A3%E6%9C%AC%E5%A4%A7%E5%B0%8F%E7%9B%B8%E5%90%8C%EF%BC%8C%E5%9B%A0%E6%AD%A4%E6%AC%8A%E9%87%8D%E4%BF%82%E6%95%B8%E7%9B%B8%E5%90%8C%E7%9A%84%E6%A8%A1%E6%93%AC%EF%BC%8C%E6%84%8F%E5%91%B3%E8%91%97%E6%AC%8A%E9%87%8D%E8%A8%88%E7%AE%97%E4%B8%80%E6%AC%A1%E4%B8%A6%E4%BD%BF%E7%94%A8%E5%A4%9A%E6%AC%A1%EF%BC%8C%E5%8F%AF%E8%83%BD%E6%98%AF%E6%89%8B%E5%8B%95%2F%E7%9F%A9%E9%99%A3%E5%9F%B7%E8%A1%8C%E6%AD%A4%E6%93%8D%E4%BD%9C%E7%9A%84%E5%A5%BD%E6%96%B9%E6%A1%88%E3%80%82%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%E4%B9%9F%E5%B0%B1%E6%98%AF%E8%AA%AA%EF%BC%8C%E6%88%91%E6%89%BE%E5%88%B0%E4%BA%86%E4%BF%82%E6%95%B8%E7%9A%84%E5%8F%83%E8%80%83%E8%B3%87%E6%96%99%E5%92%8C%E7%8D%B2%E5%8F%96%E5%AE%83%E5%80%91%E7%9A%84%E7%AE%97%E6%B3%95%E3%80%82%E6%89%80%E9%99%84%E8%85%B3%E6%9C%AC%E4%B8%AD%E5%A0%B1%E5%91%8A%E4%BA%86%E5%8F%83%E8%80%83%E6%96%87%E7%8D%BB%E3%80%82%20%E4%BB%A5%E4%B8%8B%E6%98%AF%20N%3D40%20%E7%9A%84%E5%85%A9%E6%AC%A1%E6%B8%AC%E8%A9%A6%E7%9A%84%E7%B5%90%E6%9E%9C%E3%80%82%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20499px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20499px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20499px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F15074i933853B6B38086FF%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-105250%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E6%89%8B%E5%8B%95%E8%A8%88%E7%AE%97%20Shapiro-Wilk%20%E6%AA%A2%E9%A9%97%E7%B5%B1%E8%A8%88%E9%87%8F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-105250%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E5%BF%BD%E7%95%A5%E9%80%99%E5%80%8B...%E6%88%91%E6%B2%92%E6%9C%89%E4%BB%94%E7%B4%B0%E9%96%B1%E8%AE%80%E6%82%A8%E7%9A%84%E8%AB%8B%E6%B1%82...%E6%8A%B1%E6%AD%89%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRIKE%3EJMP%20%E8%A8%88%E7%AE%97%20Shapiro-Wilk%20%E6%AA%A2%E9%A9%97%E3%80%82%3C%2FSTRIKE%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRIKE%3E%E6%89%93%E9%96%8B%E6%95%B8%E6%93%9A%E8%A1%A8%E3%80%82%3C%2FSTRIKE%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRIKE%3E%E8%BD%89%E5%88%B0%E2%80%9C%E5%B9%AB%E5%8A%A9%E2%80%9D%26gt%3B%E2%80%9C%E7%B5%B1%E8%A8%88%E7%B4%A2%E5%BC%95%E2%80%9D%26gt%3B%20%E5%9C%A8%E5%B7%A6%E5%81%B4%E6%89%BE%E5%88%B0%20Shapiro-Wilk%20%E6%AD%A3%E6%85%8B%E6%80%A7%E6%AA%A2%E9%A9%97%EF%BC%8C%E7%84%B6%E5%BE%8C%E6%8C%89%E5%95%9F%E5%8B%95%3C%2FSTRIKE%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRIKE%3E%E9%81%B8%E6%93%87%E8%A6%81%E6%B8%AC%E8%A9%A6%E8%A1%A8%E7%9A%84%E5%93%AA%E4%BA%9B%E5%88%97%3C%2FSTRIKE%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSTRIKE%3E%E8%A9%B2%E6%B8%AC%E8%A9%A6%E5%8F%AF%E5%9C%A8%20JMP%20PRO%2012%20%E5%8F%8A%E6%9B%B4%E9%AB%98%E7%89%88%E6%9C%AC%E4%B8%AD%E4%BD%BF%E7%94%A8%E3%80%82%3C%2FSTRIKE%3E%3C%2FP%3E%0A%3CP%3E%3CSTRIKE%3E%26nbsp%3B%3C%2FSTRIKE%3E%3C%2FP%3E%0A%3CP%3E%3CSTRIKE%3E%E9%80%99%E6%98%AF%E6%AD%A3%E5%B8%B8%E6%93%AC%E5%90%88%E7%9A%84%E6%93%AC%E5%90%88%E5%84%AA%E5%BA%A6%E6%B8%AC%E8%A9%A6%E3%80%82%20JSL%20%E6%98%AF%3C%2FSTRIKE%3E%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EDistribution(%0A%20Continuous%20Distribution(%0A%20%20Column(%20%3Aheight%20)%2C%0A%20%20Fit%20Distribution(%20Normal(%20Goodness%20of%20Fit(%201%20)%20)%20)%0A%20)%0A)%3B%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20397px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20397px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20397px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F15068iC85969CB10A752CC%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-102189%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E6%89%8B%E5%8B%95%E8%A8%88%E7%AE%97%20Shapiro-Wilk%20%E6%AA%A2%E9%A9%97%E7%B5%B1%E8%A8%88%E9%87%8F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-102189%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E9%80%99%E6%98%AF%E4%B8%80%E5%80%8B%E9%80%B2%E8%A1%8C%E9%80%90%E6%AD%A5%E8%A8%88%E7%AE%97%E7%9A%84%E9%8F%88%E6%8E%A5%EF%BC%8C%E6%82%A8%E5%8F%AF%E8%83%BD%E5%8F%AF%E4%BB%A5%E4%BD%BF%E7%94%A8%E3%80%82%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fblog.excelmasterseries.com%2F2015%2F05%2Fhow-to-create-completely-automated_4.html%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fblog.excelmasterseries.com%2F2015%2F05%2Fhow-to-create-completely-automated_4.html%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar

Manual Calculation of the Shapiro-Wilk Test Statistic

Hello Everyone, 

 

Does anyone know how to implement manual calculation of the Shapiro-Wilk test statistic in JMP? 

     Using JSL script and/ or column formulas?  

I know that JMP natively does this calculation natively in Analyze>Distribution and then Continuous Fit>Normal>Goodness of Fit, but I'm trying to reproduce the calculated value of the test statistic in order to understand it's basis with greater depth.

 

There are a number of useful clues in references online, but I'm having some difficulty putting the pieces together: 

https://en.wikipedia.org/wiki/Shapiro%E2%80%93Wilk_test#cite_note-8

Here's the basis for it summarized nicely from Wikepedia link above: 

directly from wiki.JPG

Also some helpful clues here using MS Excel.  

http://www.real-statistics.com/tests-normality-and-symmetry/statistical-tests-normality-symmetry/sha...

1 ACCEPTED SOLUTION

Accepted Solutions
gzmorgan0
Super User (Alumni)

Re: Manual Calculation of the Shapiro-Wilk Test Statistic

@PatrickGiuliano I am not sure why you would want to do this manually, when you have JMP that can produce the statistics and you can extract it from a report.  A simulation where the sample size is the same so the weight coefficients are the same, meaning the weights are calculated once and used many times, might be a good scenario for doing this by hand/matrix.

 

That said, I found references for the coefficients and an algorithm to get them.  The references are reported in the attached script. Here are the results of two tests with N=40. 

image.png

View solution in original post

4 REPLIES 4
txnelson
Super User

Re: Manual Calculation of the Shapiro-Wilk Test Statistic

Here is a link that does a step by step calculation that you might be able to use.

http://blog.excelmasterseries.com/2015/05/how-to-create-completely-automated_4.html

Jim
gzmorgan0
Super User (Alumni)

Re: Manual Calculation of the Shapiro-Wilk Test Statistic

Ignore this...I did not read your request very closely...sorry

 

JMP calculates the Shapiro-Wilk's test.

  • Open a data table.
  • Go to Help > Statistics Index> find Shapiro-Wilk test for normality on the left, then press launch
  • Select which columns of your table to be tested

The test is available in JMP PRO 12 and higher.

 

It is the Goodnes of Fit test for a Normal Fit. The JSL is

Distribution(
	Continuous Distribution(
		Column( :height ),
		Fit Distribution( Normal( Goodness of Fit( 1 ) ) )
	)
);

 

 

image.png

gzmorgan0
Super User (Alumni)

Re: Manual Calculation of the Shapiro-Wilk Test Statistic

@PatrickGiuliano I am not sure why you would want to do this manually, when you have JMP that can produce the statistics and you can extract it from a report.  A simulation where the sample size is the same so the weight coefficients are the same, meaning the weights are calculated once and used many times, might be a good scenario for doing this by hand/matrix.

 

That said, I found references for the coefficients and an algorithm to get them.  The references are reported in the attached script. Here are the results of two tests with N=40. 

image.png

Re: Manual Calculation of the Shapiro-Wilk Test Statistic

Thank you this is excellent.

Recommended Articles