- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Create your distribution graph: Distribution > xyz
- In the analysis menu, choose Save > Level Midpoints (new column created at the end of your table)
- Select Tabulate > Midpoint xyz --> Drop zone for rows
- In the analysis menu, choose "Make into table" --> New table with column #1 = Midpoint values and column #2 count of items
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
Now you can use Tables->Summary and group by Level [column name] and you'll get the table of counts per bar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to get the table of values after constructing a histogram?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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 Cols > Utilities > Make Binning Formula command?
All of this action could be scripted.