Skip to main content
v2026.11,858 entries · CC-BY 4.0

Types of Graphs in Statistics

Types of graphs in statistics: histogram, box plot, scatter plot, bar and pie chart, matched to the question each answers, with a worked example.

Written and maintained by CASRAI Editorial Board

Last updated

The main types of graphs in statistics are the histogram, box plot, scatter plot, run sequence plot, bar chart and pie chart. Each answers a different question about a data set, so the choice of graph follows from the question you are asking. This guide matches each graph to the questions it answers, using the NIST/SEMATECH e-Handbook of Statistical Methods and the SAS/GRAPH documentation, and then works one small data set through a histogram and a box plot with the arithmetic shown.

Definition in one paragraph

A statistical graph is a picture of data that shows its distribution, its summary statistics or the relationship between variables. NIST describes its gallery of graphical techniques as “useful” tools for exploring data, and lists the box plot, histogram, scatter plot and run sequence plot among them. SAS documents bar charts, histograms, pie charts, scatter plots and box plots as its core statistical graph types. The sections below take them in turn.

Which graph answers which question

Start from the question, not the graph. The table uses the questions NIST lists for the histogram, scatter plot and run sequence plot, NIST’s description of the box plot, plus SAS’s definitions for the bar chart and pie chart.

Graph What it shows Questions it answers Source
Histogram Distribution of one variable What distribution does the data come from? Where is it located and how spread out is it? Is it symmetric or skewed? Are there outliers? NIST
Box plot Median, quartiles and extreme points of one variable Where are the middle 50% of the data and the median? Which points are extreme? NIST
Scatter plot Two variables, one point per observation Are X and Y related? Linearly or non-linearly? Does the variation in Y change with X? Are there outliers? NIST
Run sequence plot One variable against observation order Are there shifts in location? Shifts in variation? Outliers? NIST
Bar chart Vertical or horizontal columns, each representing quantitative data How do the values compare from one column to the next? SAS
Pie chart A circle divided into slices by radial lines What does each part contribute to the total? SAS

Histogram

A histogram graphically summarizes the distribution of a univariate data set. NIST builds one by splitting the range of the data into equal-sized bins (called classes), counting the observations in each bin, and plotting frequency on the vertical axis against the response variable on the horizontal axis. It reveals center, spread, skewness, outliers and multiple modes. For a full treatment see the histogram guide.

Box plot (with the 1.5 × IQR fence)

A box plot identifies the middle 50% of the data, the median and the extreme points. The box is drawn between the quartiles: the lower quartile is the 25th percentile and the upper quartile is the 75th percentile. NIST’s fenced version defines the interquartile range as IQ = upper quartile − lower quartile, then sets the lower fence L1 = lower quartile − 1.5 × IQ and the upper fence U1 = upper quartile + 1.5 × IQ. Points beyond a fence are plotted as outliers, and NIST draws a second pair of fences at 3.0 × IQ (L2 and U2) for the most extreme points. See median and interquartile range for the quartile arithmetic, and how to find an outlier for other rules.

Scatter plot

A scatter plot reveals relationships or association between two variables. NIST puts the response variable on the vertical (Y) axis and, on the horizontal (X) axis, the variable we suspect may be related to the response. SAS defines it as a plot that shows the joint variation of two (or three) variables. For reading patterns, see scatterplot interpretation.

Bar chart vs histogram

SAS defines a bar chart as a grid with vertical or horizontal columns where each column represents quantitative data. It defines a histogram as a bar chart that displays the observed frequencies of data that have been binned. So the practical difference is where the columns come from: in a histogram they come from binning one variable into equal-width classes and counting; in a bar chart each column represents its own quantitative value. See bar charts in SPSS for a worked tool example.

Pie chart

SAS defines a pie chart as a circular chart divided into slices by radial lines, with each wedge showing a part’s contribution to the total.

Run sequence plot

NIST’s version of a plot against order is the run sequence plot: the vertical axis is the response variable Yi and the horizontal axis is the index i = 1, 2, 3, and so on. It is an easy way to summarize a univariate data set graphically and to check for shifts in location and scale and for outliers.

Worked example: one data set, two graphs

This is an invented illustration, not real measurements. Eleven values, already sorted: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 31.

Quartiles. With n = 11 the median is the 6th value, 9. This page takes the lower quartile as the median of the five values below it (4, 5, 6, 7, 8), which is 6, and the upper quartile as the median of the five above it (10, 11, 12, 13, 31), which is 12. Quartile methods differ between software, so check which one your tool uses.

IQR and fences. IQ = 12 − 6 = 6. L1 = 6 − 1.5 × 6 = 6 − 9 = −3. U1 = 12 + 1.5 × 6 = 12 + 9 = 21. The value 31 is above 21, so the box plot flags it as an outlier. The 3.0 × IQ fence is U2 = 12 + 3 × 6 = 30, and 31 is above that too. No value is below −3.

Histogram bins. Using bins of width 5 starting at 0:

Bin Values Count
0 to under 5 4 1
5 to under 10 5, 6, 7, 8, 9 5
10 to under 15 10, 11, 12, 13 4
15 to under 30 none 0
30 to under 35 31 1

The counts sum to 1 + 5 + 4 + 0 + 1 = 11. The histogram shows a cluster between 5 and 15 and one isolated bar at 30 to 35; the box plot shows the same fact as a single flagged point. Two graphs, one finding, reached through different questions.

Interpretation

If you see Look for Source
A histogram with an isolated bar far from the rest A possible outlier NIST
A box plot with points beyond a fence Outliers by the 1.5 × IQ rule NIST
A scatter plot where Y changes systematically with X An association between the variables NIST
A run sequence plot with a step change A shift in location NIST

Assumptions and common mistakes

  • Treating a flagged point as an error. The fence only flags a point as unusual; it does not say the value is wrong.
  • Comparing quartiles across tools without checking the method. The same data can give different quartiles, and therefore different fences.
  • Forgetting that a histogram depends on its bins. NIST builds it from equal-sized bins, so the bin width you pick shapes what you see.
  • Reading a scatter plot as proof of cause. It shows association between two variables.

To pick the test that follows a graph, see how to choose a statistical test.

How to draw them in Excel, R or Python

Excel. Quartiles for the example data in cells A1:A11: =QUARTILE.EXC(A1:A11,1) returns 6 and =QUARTILE.EXC(A1:A11,3) returns 12. (QUARTILE.INC uses a different method and returns 6.5 and 11.5.) Then insert a histogram or box and whisker chart from the Insert tab.

R.

x <- c(4,5,6,7,8,9,10,11,12,13,31)
quantile(x, c(.25,.75), type = 6)   # 6 and 12
hist(x, breaks = seq(0, 35, 5), right = FALSE)
boxplot(x)

Python.

import numpy as np, matplotlib.pyplot as plt
x = [4,5,6,7,8,9,10,11,12,13,31]
print(np.percentile(x, [25, 75], method='weibull'))  # [ 6. 12.]
plt.hist(x, bins=range(0, 40, 5)); plt.show()
plt.boxplot(x); plt.show()

R’s hist closes bins on the right by default, so right = FALSE is set above to match the half-open bins in the table; Python’s plt.hist uses left-closed bins, with the last bin closed on both sides.

FAQ

What are the types of graphs in statistics?

The ones covered by NIST and SAS are the histogram, box plot, scatter plot, run sequence plot, bar chart and pie chart. Each is matched to its questions in the table above.

What is the difference between a bar chart and a histogram?

SAS defines a histogram as a bar chart that displays the observed frequencies of data that have been binned. A histogram’s columns come from binning one variable; a bar chart’s columns each represent their own quantitative value.

Which graph shows outliers?

NIST lists outliers among the questions answered by the histogram, box plot, scatter plot and run sequence plot. The box plot’s 1.5 × IQ fence gives a stated rule.

How do I see how two variables are related?

Use a scatter plot, which NIST describes as revealing relationships or association between two variables.

Sources

  • NIST/SEMATECH e-Handbook of Statistical Methods, Box Plot: https://www.itl.nist.gov/div898/handbook/eda/section3/boxplot.htm (checked 2026-10-29)
  • NIST/SEMATECH e-Handbook, Histogram: https://www.itl.nist.gov/div898/handbook/eda/section3/histogra.htm (checked 2026-10-29)
  • NIST/SEMATECH e-Handbook, Scatter Plot: https://www.itl.nist.gov/div898/handbook/eda/section3/scatterp.htm (checked 2026-10-29)
  • NIST/SEMATECH e-Handbook, Run Sequence Plot: https://www.itl.nist.gov/div898/handbook/eda/section3/runseqpl.htm (checked 2026-10-29)
  • SAS/GRAPH, Types of Statistical Graphs: https://support.sas.com/documentation/cdl/en/grnvwug/62918/HTML/default/p1onmh62dcccaqn1a4tf0n7bpwqs.htm (checked 2026-10-29)

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Types of Graphs in Statistics

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →

Ask CASRAI · Regulatory Radar

Research-admin question? Get an answer that links its sources.

An AI assistant specialized in research administration. Every answer links its sources to check before you act. 2 questions free, no account. $29/month after.

  • Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.
  • Every answer numbers its sources and links each one, so you can check the source yourself.