Subscribe Bookmark RSS Feed

How do I check the kind of distribution of a sample data?

RogerBui

Community Member

Joined:

Dec 28, 2016

Hi everybody,

Could you please have me a clue to check a kind of distribution of a sample data set by JSL (Ex: check to see if a sample data has normal distribution or not?

Thanks.

2 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson

Super User

Joined:

Jun 22, 2012

Solution

Here is the example from:

     Help==>Scripting Index==>Distribution==>Continuous Distribution==>All

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = Distribution( Column( :CO ) );
obj << Fit Distribution( All( 1 ) );
Jim
markbailey

Staff

Joined:

Jun 23, 2011

Solution

I assume by your question that the user is not directly involved (interactive assessment) but instead a hypothesis test is desired. I would employ the Distribution platform. Launch it with the data column to be tested in the Y role. Fit the normal distribution and obtain the results of the goodness of fit test. Illustrated with the weight variable in the sample data table Big Class:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dist = dt << Distribution(
	Y( :weight ),
	Fit Distribution( Normal( Goodness of Fit( 1 ) ) )
);

dist rep = dist << Report;

p value = dist rep["Goodness-of-Fit Test"][NumberColBox("Prob<W")] << Get( 1 );

Hope answer helps.

Learn it once, use it forever!
2 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Solution

Here is the example from:

     Help==>Scripting Index==>Distribution==>Continuous Distribution==>All

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = Distribution( Column( :CO ) );
obj << Fit Distribution( All( 1 ) );
Jim
markbailey

Staff

Joined:

Jun 23, 2011

Solution

I assume by your question that the user is not directly involved (interactive assessment) but instead a hypothesis test is desired. I would employ the Distribution platform. Launch it with the data column to be tested in the Y role. Fit the normal distribution and obtain the results of the goodness of fit test. Illustrated with the weight variable in the sample data table Big Class:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dist = dt << Distribution(
	Y( :weight ),
	Fit Distribution( Normal( Goodness of Fit( 1 ) ) )
);

dist rep = dist << Report;

p value = dist rep["Goodness-of-Fit Test"][NumberColBox("Prob<W")] << Get( 1 );

Hope answer helps.

Learn it once, use it forever!