Skip to main content
MedCalc
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
working
Show menu

Histogram

Command:Statistics
Next selectDistribution plot
Next selectHistogram

Description

A histogram is used to summarize discrete or continuous data. In other words, it provides a visual interpretation of numerical data by showing the number of data points that fall within a specified range of values.

Required input

Dialog box for histogram.

Enter the name of a variable and optionally a filter. If you have previously entered this variable and filter in the box for summary statistics, then this new variable will be selectable in the Variable list (click the Drop-down button button).

Options

  • Show Normal distribution: option to have a Normal distribution curve (with Mean and Standard Deviation of the data represented in the histogram) superimposed over the histogram.
  • Relative frequency (%): option to express frequencies as percentages.
  • Show on secondary Y-axis: when this option is selected, frequencies will be shown on the left Y-axis, and relative frequencies (percentages) will be shown on a secondary Y-axis at the right side.

After you click OK the program collects the data, performs some initial calculations, and displays the following dialog box:

Define histogram.

In this dialog box, the program gives the mean, standard deviation, minimum and maximum value for the selected variable. Next, the default lower and upper limits, and the default number of classes in the histogram are displayed. If you prefer other values than these default values, you can make the necessary changes. For Lower and Upper limit, the program will not accept values greater or less than the minimum and maximum of the variable. When you click OK the program will continue with the new settings, but when you click Cancel the program will display the histogram with the initial default settings.

This is the histogram for the variable Weight:

Histogram.

The first bar in this histogram represents the number of cases (frequency) with weight ≥ 55 and < 60. The second bar represents the number of cases with weight ≥ 60 and < 65, etc.

When the Show Normal distribution option is selected, a Normal distribution plot (with Mean and Standard Deviation of the data represented in the histogram) is superimposed over the histogram.

Histogram with Normal distribution

Using the histogram it can be evaluated visually whether the data are distributed symmetrically, Normally or Gaussian or whether the distribution is asymmetrical or skewed.

When the distribution is not Normal, it can not accurately be described by mean and standard deviation, but instead the median, mode, quartiles and percentiles should be used. The latter statistics are reported in the Summary statistics window.

To change the titles, colors or axis scaling used in the graph, see Format graph.

By clicking Export on the File menu you can export the displayed graph as a picture file (see Export graphs). When you want to print the graph, press Ctrl P.

Literature

  • Altman DG (1991) Practical statistics for medical research. London: Chapman and Hall. Buy from Amazon

See also

External links