Frequencies and percents from intervals produced by a histogram

This macro shows the intervals, frequencies, and percentages from a histogram where the user specifies the intervals.

Download the Macro

Be sure that Minitab knows where to find your downloaded macro. Choose File > Options > General. Under Macro location browse to the location where you save macro files.

Important

If you use an older web browser, when you click the Download button, the file may open in Quicktime, which shares the .mac file extension with Minitab macros. To save the macro, right-click the Download button and choose Save target as.

Required Inputs

  • A column of measurement data used to create a histogram
  • The midpoints of the first and final intervals of the histogram, or (if your histogram used cut points instead of midpoints) the start point of the first interval and the end point of the final interval.
  • The increment between midpoints or cut points on the histogram

Optional Inputs

CUTPOINT
Use if your histogram specified cut points instead of midpoints.

Running the Macro

Suppose the first interval of a histogram of your data in C1 has a midpoint of 20.5, the final interval of your histogram has a midpoint of 40.5, and the increment between the midpoints is 2.To run the macro, choose View > Command Line/History and type:

%HBINS 20.5 40.5 2 C1

Click Run.

Note

As with MINITAB's histogram algorithm, observations that fall on interval boundaries are put into the interval to the right, with one exception: observations on the boundary of the interval that is farthest to the right are put in the final interval.