Choose Language Hide Translation Bar
Highlighted
lwx228
Level VII

How can find the median of one of the clusters of densely distributed data?

Sets no duplicate values in the data.But the data is not evenly distributed.
How can use the JMP module to find the median of the densest distribution?

Thanks!

 

da=[17,99,65,75,15,14,80,18,55,70,12,19,13,100,1,20,90,60,95,85,16];

2020-08-31_19-09-13.png

3 REPLIES 3
Highlighted
txnelson
Super User

Re: How can find the median of one of the clusters of densely distributed data?

I would go to the red triangle and select

     Save==>Level Numbers

or

     Save==>Mid Points

and then either use Tabulate or Summary or Distribution using the newly saved column as a grouping variable

Jim
Highlighted
lwx228
Level VII

Re: How can find the median of one of the clusters of densely distributed data?

Thank Jim!

I want to know if these procedures can produce results without a graphical interface and just operate in memory.It is not known whether JMP has a function in JSL.

Thanks!
Highlighted
txnelson
Super User

Re: How can find the median of one of the clusters of densely distributed data?

The interactive displays are just elements in memory, and do not have to be displayed.  Yes, it probably takes more memory for a direct function that would calculate the medians of each bin, but again, it is just memory.

So, I do understand your comment, but then to take it to an extreme,  then you should be programming in the assembly language for the computer you are running on, because.....anything more than that is taking up more memory than needed.

Here is a display of the medians being created by just a simple function call.  Yes, it does call the Distribution Platform, but you never see it.median.PNG

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );

showBinMedians = Function( {dt, var},
	{defaultlocal},
	dis = dt << Distribution( invisible, Continuous Distribution( Column( As Column( var ) ) ) );
	dis << save( level numbers );
	Report( dis ) << close window;

	tab = dt << Tabulate(
		invisible,
		Show Control Panel( 0 ),
		Add Table(
			Column Table( Analysis Columns( Column( var ) ), Statistics( Median ) ),
			Row Table( Grouping Columns( Column( N Cols( dt ) ) ) )
		)
	);
	Report( tab ) << journal;
	Report( tab ) << close window;
	dt << delete columns( N Cols( dt ) );
);

x = showBinMedians( dt, "Height" );
Jim
Article Labels