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
cwestberg
Level I

Manually Performing a Grubb's Test


Howdy Everyone,

I am in the process of creating a JMP appendix for one of our processes and have found it necessary to explain how  to manually set up a column formula to perform a Grubb's Test.  I have done this in Excel, but i want to replicate that in JMP and have had a hard time setting up the formula correctly.  We have 4 columns of independent data (1a,2a,3a,4a) that each need a Grubb's Test performed on them.  Each has a max of 40 values.  I woudl like to create four more columns (1b,2b,3b,4b) that each scan the appropriate column (1-1, 2-2 and so forth).  I was thinking of setting up an IF formula so that i can do a column min and a column max calculation and depending on the Texp value for each, it would spit out Outlier as a result.  In my excel spreadsheet i it set up this way:

have the Max and min calculated

Texp calculated:  (Max/Min - column avg)/ Column Std Dev = Texp

Then the cell below  it compares that Texp to the Tcrit for an N=40 (2.866), and if Texp > Tcrit it says "Yes"

In my head i can see how  to do this in JMP, but i am unsure how to set it up correctly with parenthesis and so forth.  If i have not eplained it very well I apologize.  Sometimes the brain has a hard time describing what appear easy.

Thanks,

2 REPLIES 2
stan_koprowski
Community Manager Community Manager

Re: Manually Performing a Grubb's Test

Hello Charles,

Please use the following link for using an add-in from the file exchange for performing Grubbs' Outlier Test.

Please let us know if this works for your situation or if you need additional assistance.

Stan

ms
Super User (Alumni) ms
Super User (Alumni)

Re: Manually Performing a Grubb's Test

Here's an attempt to use a single formula column to perform the Grubb's test (g > g0) and, if an outlier is detected, pinpoint the row with "Yes".

The script creates an example table with a numeric column "Data" and a formula column with Grubb's test at alpha 0.05. The data is from the N(0,1) distribution plus one extreme value (50). Run the script, the extreme should be marked with "yes", and then change one or more numbers in the data column to observe how it affects the output in the formula column.

New Table( "Grubbs",

      New Column( "Data", numeric, values( 50 || J( 1, 25, Random Normal( 0, 1 ) ) ) ),

      New Column( "Grubbs Outlier Test",

            Character,

            Formula(

                  If(

                        And(

                              Col Maximum( Col Standardize( :Data ) ) ==

                              Col Standardize( :Data ),

                              Col Maximum( Col Standardize( :Data ) ) > ((Col Number( :Data ) -

                              1) / Sqrt( Col Number( :Data ) )) *

                              Sqrt(

                                    Abs(

                                          t Quantile(

                                                0.05 / (2 * Col Number( :Data )),

                                                Col Number( :Data ) - 2

                                          )

                                    ) ^ 2 / ((Col Number( :Data ) - 2) +

                                    Abs(

                                          t Quantile(

                                                0.05 / (2 * Col Number( :Data )),

                                                Col Number( :Data ) - 2

                                          )

                                    ) ^ 2)

                              )

                        ),

                        "Yes"

                  )

            )

      )

);