StatLabStudent EditionUser guideGalleryFeaturesAbout

Histogram with normal curve

Shows the distribution of a scale variable as bins of equal width, with a normal curve of the same mean and SD for comparison. Panels split it by one or two categorical variables using the same bins.

Menu: Graphs → More charts → Histogram (bin rules, normal curve)…

When should I use it?

What are the assumptions?

How do I run it in StatLab?

  1. Choose the variable.
  2. Keep the normal curve; choose the bin rule (Sturges is the default; Freedman-Diaconis suits skewed data).
  3. Optionally add panel row/column variables.

How do I read the output?

OutputMeaning
BarsNumber of cases in each bin.
Normal curveWhat the histogram would look like if the data were normal with this mean and SD.
Mean, Std. Dev., NTop right of each panel.

Worked example

On the practice survey dataset (File → Sample dataset), this command — which the dialog's Paste button also produces — runs the procedure:

PROC vizHistogram /x=score /panel='' /panelCol='' /normal=YES /binRule=sturges /niceBins=NO.

Computed by StatLab's validated procedure code when this page was built. The example only illustrates the steps; choose variables that fit your own research question.

What are common mistakes?

Open StatLab   All guide topics