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
ranjan_mitre_or
Level III

How to get the table of values after constructing a histogram?

After I generate a histogram of the entries in a column, I would like to get out a table of the values of the individual bars that I can list on each bar. How can I do that?

7 REPLIES 7
Thierry_S
Super User

Re: How to get the table of values after constructing a histogram?

Hi,

Since nobody came up with an elegant solution, here is my rather ugly solution

 

  1. Create your distribution graph: Distribution > xyz
  2. In the analysis menu, choose Save > Level Midpoints (new column created at the end of your table)
  3. Select Tabulate > Midpoint xyz --> Drop zone for rows
  4. In the analysis menu, choose "Make into table" --> New table with column #1 = Midpoint values and column #2 count of items
  5. To check that you have the right result, go to Graph Builder > X = Midpoint values and Y = count > Bar graph

Let me know if you need the probability data (it's a bit more complicated)

 

Best regards,

 

TS

Thierry R. Sornasse
GroovyGeek
Level I

Re: How to get the table of values after constructing a histogram?

And that is why we love to hate JMP.  Things that should be an obvious need take 30 non-intuitive clicks.  As powerful as JMP is, whoever is working on the UI needs to be sent back to school on the dime of the company.  I have been using JMP for over 25 years and it has only gotten worse.

Jeff_Perkinson
Community Manager Community Manager

Re: How to get the table of values after constructing a histogram?

I'm sorry you feel that way. In this case, the answers given above aren't actually the right way to get count of rows in each bar in a table.

 

This is actually pretty easy to do.

 

Just go to the red triangle menu at the top of the histogram and choose Save Level Numbers. You'll get a new column in your data table that lists the bar number for each row.

2022-11-14_17-02-41.978.png

Now you can use Tables->Summary and group by Level [column name] and you'll get the table of counts per bar.

2022-11-14_17-16-15.243.png

-Jeff
dale_lehman
Level VII

Re: How to get the table of values after constructing a histogram?

Highlight the bar you are interested in.  Rightclick and choose Subset - but make sure you have the column in the dataset you are interested in (the one you show the distribution of).  You will have a new dataset of the values in that bar.

ranjan_mitre_or
Level III

Re: How to get the table of values after constructing a histogram?

That's not what I need. I would like to calculate the Probability Mass Function corresponding to the histogram. So, I need to get out the number of values that are in each bin, that I will divide by the total number of bins to get the PMF.

ranjan_mitre_or
Level III

Re: How to get the table of values after constructing a histogram?

So, what I need is an easy way to get out the table of counts. It's possible to do it manually, by listing the counts on each bar, but looking for an easier way, especially if I have a large number of bars in the histogram.

Thanks

Re: How to get the table of values after constructing a histogram?

Separately from the histogram you could use the If() function in a column formula to assign a bin, then use Tables > Summary or Analyze > Tabulate to obtain the counts for each bin. Have you seen the ColsUtilities > Make Binning Formula command?

 

Capture.PNG

 

All of this action could be scripted.