cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-100825%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ECalcolo%20manuale%20della%20statistica%20del%20test%20di%20Shapiro-Wilk%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-100825%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ECiao%20a%20tutti%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EQualcuno%20sa%20come%20implementare%20il%20calcolo%20manuale%20della%20statistica%20del%20test%20Shapiro-Wilk%20in%20JMP%3F%3C%2FP%3E%3CP%3EUtilizzo%20di%20script%20JSL%20e%2Fo%20formule%20di%20colonna%3F%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20che%20JMP%20esegue%20nativamente%20questo%20calcolo%20in%20modo%20nativo%20in%20Analizza%26gt%3B%20Distribuzione%20e%20quindi%20Adattamento%20continuo%26gt%3B%20Normale%26gt%3B%20Bont%C3%A0%20di%20adattamento%2C%20ma%20sto%20cercando%20di%20riprodurre%20il%20valore%20calcolato%20della%20statistica%20del%20test%20per%20comprenderne%20la%20base%20con%20maggiore%20profondit%C3%A0.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECi%20sono%20una%20serie%20di%20indizi%20utili%20nei%20riferimenti%20online%2C%20ma%20ho%20qualche%20difficolt%C3%A0%20a%20mettere%20insieme%20i%20pezzi%3A%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%3EEcco%20la%20base%20per%20esso%20riassunta%20bene%20dal%20link%20di%20Wikipedia%20sopra%3A%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%3EAnche%20alcuni%20indizi%20utili%20qui%20usando%20MS%20Excel.%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%3EOggetto%3A%20calcolo%20manuale%20della%20statistica%20del%20test%20di%20Shapiro-Wilk%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-105759%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EGrazie%20questo%20%C3%A8%20eccellente.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-105371%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EOggetto%3A%20calcolo%20manuale%20della%20statistica%20del%20test%20di%20Shapiro-Wilk%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%40PatrickGiuliano%3C%2FA%3E%20Non%20sono%20sicuro%20del%20motivo%20per%20cui%20vorresti%20farlo%20manualmente%2C%20quando%20hai%20JMP%20in%20grado%20di%20produrre%20le%20statistiche%20e%20puoi%20estrarle%20da%20un%20report.Una%20simulazione%20in%20cui%20la%20dimensione%20del%20campione%20%C3%A8%20la%20stessa%2C%20quindi%20i%20coefficienti%20di%20peso%20sono%20gli%20stessi%2C%20il%20che%20significa%20che%20i%20pesi%20vengono%20calcolati%20una%20volta%20e%20utilizzati%20molte%20volte%2C%20potrebbe%20essere%20un%20buon%20scenario%20per%20farlo%20a%20mano%2Fmatrice.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDetto%20questo%2C%20ho%20trovato%20riferimenti%20per%20i%20coefficienti%20e%20un%20algoritmo%20per%20ottenerli.I%20riferimenti%20sono%20riportati%20nello%20scritto%20allegato.%20Ecco%20i%20risultati%20di%20due%20test%20con%20N%3D40.%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%3EOggetto%3A%20calcolo%20manuale%20della%20statistica%20del%20test%20di%20Shapiro-Wilk%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-105250%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EIgnora%20questo...%20non%20ho%20letto%20molto%20attentamente%20la%20tua%20richiesta...%20mi%20dispiace%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRIKE%3EJMP%20calcola%20il%20test%20di%20Shapiro-Wilk.%3C%2FSTRIKE%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRIKE%3EApri%20una%20tabella%20di%20dati.%3C%2FSTRIKE%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRIKE%3EVai%20su%20Aiuto%20%26gt%3B%20Indice%20delle%20statistiche%20%26gt%3B%20trova%20il%20test%20Shapiro-Wilk%20per%20la%20normalit%C3%A0%20sulla%20sinistra%2C%20quindi%20premi%20Avvia%3C%2FSTRIKE%3E%3C%2FLI%3E%0A%3CLI%3E%3CSTRIKE%3ESeleziona%20le%20colonne%20della%20tua%20tabella%20da%20testare%3C%2FSTRIKE%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSTRIKE%3EIl%20test%20%C3%A8%20disponibile%20in%20JMP%20PRO%2012%20e%20versioni%20successive.%3C%2FSTRIKE%3E%3C%2FP%3E%0A%3CP%3E%3CSTRIKE%3E%26nbsp%3B%3C%2FSTRIKE%3E%3C%2FP%3E%0A%3CP%3E%3CSTRIKE%3E%C3%88%20il%20test%20Goodnes%20of%20Fit%20per%20una%20vestibilit%C3%A0%20normale.%20Il%20JSL%20%C3%A8%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%3EOggetto%3A%20calcolo%20manuale%20della%20statistica%20del%20test%20di%20Shapiro-Wilk%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-102189%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EEcco%20un%20collegamento%20che%20esegue%20un%20calcolo%20passo%20passo%20che%20potresti%20essere%20in%20grado%20di%20utilizzare.%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