cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
%3CLINGO-SUB%20id%3D%22lingo-sub-100825%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EShapiro-Wilk%20%EA%B2%80%EC%A0%95%20%ED%86%B5%EA%B3%84%EB%9F%89%EC%9D%98%20%EC%88%98%EB%8F%99%20%EA%B3%84%EC%82%B0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-100825%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%EC%95%88%EB%85%95%20%EB%AA%A8%EB%91%90%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJMP%EC%97%90%EC%84%9C%20Shapiro-Wilk%20%ED%85%8C%EC%8A%A4%ED%8A%B8%20%ED%86%B5%EA%B3%84%EC%9D%98%20%EC%88%98%EB%8F%99%20%EA%B3%84%EC%82%B0%EC%9D%84%20%EA%B5%AC%ED%98%84%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%84%20%EC%95%84%EB%8A%94%20%EC%82%AC%EB%9E%8C%EC%9D%B4%20%EC%9E%88%EC%8A%B5%EB%8B%88%EA%B9%8C%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BJSL%20%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8%20%EB%B0%8F%20%2F%20%EB%98%90%EB%8A%94%20%EC%97%B4%20%EC%88%98%EC%8B%9D%20%EC%82%AC%EC%9A%A9%3F%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%EB%82%98%EB%8A%94%20JMP%EA%B0%80%20%EB%84%A4%EC%9D%B4%ED%8B%B0%EB%B8%8C%20%EC%A0%81%EC%9C%BC%EB%A1%9C%20Analyze%26gt%3B%20Distribution%EA%B3%BC%20Continuous%20Fit%26gt%3B%20Normal%26gt%3B%20Fit%EC%9D%98%20%EC%A0%81%ED%95%A9%EC%84%B1%20%EA%B3%84%EC%82%B0%EC%97%90%EC%84%9C%EC%9D%B4%20%EA%B3%84%EC%82%B0%EC%9D%84%20%EC%88%98%ED%96%89%ED%95%9C%EB%8B%A4%EB%8A%94%20%EA%B2%83%EC%9D%84%20%EC%95%8C%EA%B3%A0%20%EC%9E%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%ED%95%98%EC%A7%80%EB%A7%8C%20%EB%8D%94%20%EA%B9%8A%EC%9D%B4%EC%9E%88%EB%8A%94%20%EA%B8%B0%EC%B4%88%EB%A5%BC%20%EC%9D%B4%ED%95%B4%ED%95%98%EA%B8%B0%20%EC%9C%84%ED%95%B4%20%ED%85%8C%EC%8A%A4%ED%8A%B8%20%ED%86%B5%EA%B3%84%EC%9D%98%20%EA%B3%84%EC%82%B0%20%EB%90%9C%20%EA%B0%92%EC%9D%84%20%EC%9E%AC%ED%98%84%ED%95%98%EB%A0%A4%EA%B3%A0%ED%95%A9%EB%8B%88%EB%8B%A4.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%EC%98%A8%EB%9D%BC%EC%9D%B8%EC%97%90%EC%84%9C%20%EC%B0%B8%EC%A1%B0%20%ED%95%A0%20%EC%88%98%EC%9E%88%EB%8A%94%20%EC%9C%A0%EC%9A%A9%ED%95%9C%20%EB%8B%A8%EC%84%9C%EA%B0%80%20%EB%A7%8E%EC%9D%B4%20%EC%9E%88%EC%A7%80%EB%A7%8C%20%EC%A1%B0%EA%B0%81%EC%9D%84%20%EB%AA%A8%EC%9C%BC%EB%8A%94%20%EB%8D%B0%20%EC%96%B4%EB%A0%A4%EC%9B%80%EC%9D%B4%20%EC%9E%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%26nbsp%3B%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%EC%9C%84%EC%9D%98%20Wikepedia%20%EB%A7%81%ED%81%AC%EC%97%90%EC%84%9C%20%EB%A9%8B%EC%A7%80%EA%B2%8C%20%EC%9A%94%EC%95%BD%20%ED%95%9C%20%EB%82%B4%EC%9A%A9%EC%9D%80%20%EB%8B%A4%EC%9D%8C%EA%B3%BC%20%EA%B0%99%EC%8A%B5%EB%8B%88%EB%8B%A4.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%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%2FP%3E%3CP%3E%EB%98%90%ED%95%9C%20%EC%97%AC%EA%B8%B0%20MS%20Excel%EC%9D%84%20%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC%20%EB%AA%87%20%EA%B0%80%EC%A7%80%20%EC%9C%A0%EC%9A%A9%ED%95%9C%20%EB%8B%A8%EC%84%9C.%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%EB%8B%A4%EC%8B%9C%20%3A%20Shapiro-Wilk%20%EA%B2%80%EC%A0%95%20%ED%86%B5%EA%B3%84%EB%9F%89%EC%9D%98%20%EC%88%98%EB%8F%99%20%EA%B3%84%EC%82%B0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-105759%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%EA%B3%A0%EB%A7%99%EC%8A%B5%EB%8B%88%EB%8B%A4.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-105371%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%EB%8B%A4%EC%8B%9C%20%3A%20Shapiro-Wilk%20%EA%B2%80%EC%A0%95%20%ED%86%B5%EA%B3%84%EB%9F%89%EC%9D%98%20%EC%88%98%EB%8F%99%20%EA%B3%84%EC%82%B0%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%20%40PatrickGiuliano%20%3C%2FA%3E%20%ED%86%B5%EA%B3%84%EB%A5%BC%20%EC%83%9D%EC%84%B1%20%ED%95%A0%20%EC%88%98%EC%9E%88%EB%8A%94%20JMP%EA%B0%80%20%EC%9E%88%EA%B3%A0%20%EB%B3%B4%EA%B3%A0%EC%84%9C%EC%97%90%EC%84%9C%20%EC%B6%94%EC%B6%9C%20%ED%95%A0%20%EC%88%98%EC%9E%88%EB%8A%94%20%EA%B2%BD%EC%9A%B0%20%EC%88%98%EB%8F%99%EC%9C%BC%EB%A1%9C%EC%9D%B4%20%EC%9E%91%EC%97%85%EC%9D%84%20%EC%88%98%ED%96%89%ED%95%98%EB%A0%A4%EB%8A%94%20%EC%9D%B4%EC%9C%A0%EA%B0%80%20%ED%99%95%EC%8B%A4%ED%95%98%EC%A7%80%20%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4.%26nbsp%3B%20%EC%83%98%ED%94%8C%20%ED%81%AC%EA%B8%B0%EA%B0%80%20%EA%B0%99%EC%95%84%EC%84%9C%20%EA%B0%80%EC%A4%91%20%EA%B3%84%EC%88%98%EA%B0%80%20%EA%B0%99%EC%95%84%EC%84%9C%20%EA%B0%80%EC%A4%91%EC%B9%98%EA%B0%80%20%ED%95%9C%20%EB%B2%88%20%EA%B3%84%EC%82%B0%EB%90%98%EA%B3%A0%20%EC%97%AC%EB%9F%AC%20%EB%B2%88%20%EC%82%AC%EC%9A%A9%EB%90%98%EB%8A%94%20%EC%8B%9C%EB%AE%AC%EB%A0%88%EC%9D%B4%EC%85%98%EC%9D%80%20%EC%88%98%EC%9E%91%EC%97%85%20%2F%20%ED%96%89%EB%A0%AC%EB%A1%9C%EC%9D%B4%EB%A5%BC%20%EC%88%98%ED%96%89%ED%95%98%EB%8A%94%20%EC%A2%8B%EC%9D%80%20%EC%8B%9C%EB%82%98%EB%A6%AC%EC%98%A4%20%EC%9D%BC%20%EC%88%98%20%EC%9E%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%EC%A6%89%2C%20%EA%B3%84%EC%88%98%EC%97%90%20%EB%8C%80%ED%95%9C%20%EC%B0%B8%EC%A1%B0%EC%99%80%20%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98%EC%9D%84%20%EC%96%BB%EB%8A%94%20%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98%EC%9D%84%20%EB%B0%9C%EA%B2%AC%ED%96%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%26nbsp%3B%20%EC%B0%B8%EC%A1%B0%EB%8A%94%20%EC%B2%A8%EB%B6%80%20%EB%90%9C%20%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8%EC%97%90%EB%B3%B4%EA%B3%A0%EB%90%A9%EB%8B%88%EB%8B%A4.%20%EB%8B%A4%EC%9D%8C%EC%9D%80%20N%20%3D%2040%20%EC%9D%B8%20%EB%91%90%20%EA%B0%80%EC%A7%80%20%ED%85%8C%EC%8A%A4%ED%8A%B8%20%EA%B2%B0%EA%B3%BC%EC%9E%85%EB%8B%88%EB%8B%A4.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%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%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-105250%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%EB%8B%A4%EC%8B%9C%20%3A%20Shapiro-Wilk%20%EA%B2%80%EC%A0%95%20%ED%86%B5%EA%B3%84%EB%9F%89%EC%9D%98%20%EC%88%98%EB%8F%99%20%EA%B3%84%EC%82%B0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-105250%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%EC%9D%B4%EA%B2%83%EC%9D%84%20%EB%AC%B4%EC%8B%9C%ED%95%98%EC%8B%AD%EC%8B%9C%EC%98%A4%20...%20%EB%82%98%EB%8A%94%20%EB%8B%B9%EC%8B%A0%EC%9D%98%20%EC%9A%94%EC%B2%AD%EC%9D%84%20%EB%A7%A4%EC%9A%B0%20%EC%9E%90%EC%84%B8%ED%9E%88%20%EC%9D%BD%EC%A7%80%20%EC%95%8A%EC%95%98%EC%8A%B5%EB%8B%88%EB%8B%A4%20...%20%EB%AF%B8%EC%95%88%ED%95%A9%EB%8B%88%EB%8B%A4.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRIKE%3EJMP%EB%8A%94%20Shapiro-Wilk%EC%9D%98%20%EA%B2%80%EC%A0%95%EB%A0%A5%EC%9D%84%20%EA%B3%84%EC%82%B0%ED%95%A9%EB%8B%88%EB%8B%A4.%3C%2FSTRIKE%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRIKE%3E%EB%8D%B0%EC%9D%B4%ED%84%B0%20%ED%85%8C%EC%9D%B4%EB%B8%94%EC%9D%84%20%EC%97%BD%EB%8B%88%20%EB%8B%A4.%3C%2FSTRIKE%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRIKE%3E%EB%8F%84%EC%9B%80%EB%A7%90%26gt%3B%20%ED%86%B5%EA%B3%84%20%EC%83%89%EC%9D%B8%EC%9C%BC%EB%A1%9C%26gt%3B%20%EC%99%BC%EC%AA%BD%EC%97%90%EC%9E%88%EB%8A%94%20%EC%A0%95%EC%83%81%EC%97%90%20%EB%8C%80%ED%95%B4%20Shapiro-Wilk%20%ED%85%8C%EC%8A%A4%ED%8A%B8%EB%A5%BC%20%EC%B0%BE%EC%9D%80%20%EB%8B%A4%EC%9D%8C%20%EC%8B%A4%ED%96%89%EC%9D%84%20%EB%88%84%EB%A6%85%EB%8B%88%EB%8B%A4.%3C%2FSTRIKE%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRIKE%3E%ED%85%8C%EC%8A%A4%ED%8A%B8%20%ED%95%A0%20%EC%97%B4%EC%9D%84%20%EC%84%A0%ED%83%9D%ED%95%98%EC%8B%AD%EC%8B%9C%EC%98%A4.%3C%2FSTRIKE%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSTRIKE%3E%EC%9D%B4%20%ED%85%8C%EC%8A%A4%ED%8A%B8%EB%8A%94%20JMP%20PRO%2012%20%EC%9D%B4%EC%83%81%EC%97%90%EC%84%9C%20%EC%82%AC%EC%9A%A9%ED%95%A0%20%EC%88%98%20%EC%9E%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%3C%2FSTRIKE%3E%3C%2FP%3E%0A%3CP%3E%3CSTRIKE%3E%26nbsp%3B%3C%2FSTRIKE%3E%3C%2FP%3E%0A%3CP%3E%3CSTRIKE%3ENormal%20Fit%EC%9D%84%EC%9C%84%ED%95%9C%20Goodnes%20Fit%20%ED%85%8C%EC%8A%A4%ED%8A%B8%EC%9E%85%EB%8B%88%EB%8B%A4.%20JSL%EC%9D%80%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%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%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-102189%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%EB%8B%A4%EC%8B%9C%20%3A%20Shapiro-Wilk%20%EA%B2%80%EC%A0%95%20%ED%86%B5%EA%B3%84%EB%9F%89%EC%9D%98%20%EC%88%98%EB%8F%99%20%EA%B3%84%EC%82%B0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-102189%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%EB%8B%A4%EC%9D%8C%EC%9D%80%20%EC%82%AC%EC%9A%A9%ED%95%A0%20%EC%88%98%EC%9E%88%EB%8A%94%20%EB%8B%A8%EA%B3%84%EB%B3%84%20%EA%B3%84%EC%82%B0%EC%9D%84%20%EC%88%98%ED%96%89%ED%95%98%EB%8A%94%20%EB%A7%81%ED%81%AC%EC%9E%85%EB%8B%88%EB%8B%A4.%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.