cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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.

Recommended Articles