cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
RogerBui
Level I

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

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

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

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

View solution in original post

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

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.

View solution in original post

2 REPLIES 2
txnelson
Super User

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

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

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

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.