# Ch 2.2 Histogram

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$

( \newcommand{\kernel}{\mathrm{null}\,}\) $$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\id}{\mathrm{id}}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\kernel}{\mathrm{null}\,}$$

$$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$

$$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$

$$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

$$\newcommand{\vectorA}[1]{\vec{#1}} % arrow$$

$$\newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow$$

$$\newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vectorC}[1]{\textbf{#1}}$$

$$\newcommand{\vectorD}[1]{\overrightarrow{#1}}$$

$$\newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}}$$

$$\newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}}$$

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\avec}{\mathbf a}$$ $$\newcommand{\bvec}{\mathbf b}$$ $$\newcommand{\cvec}{\mathbf c}$$ $$\newcommand{\dvec}{\mathbf d}$$ $$\newcommand{\dtil}{\widetilde{\mathbf d}}$$ $$\newcommand{\evec}{\mathbf e}$$ $$\newcommand{\fvec}{\mathbf f}$$ $$\newcommand{\nvec}{\mathbf n}$$ $$\newcommand{\pvec}{\mathbf p}$$ $$\newcommand{\qvec}{\mathbf q}$$ $$\newcommand{\svec}{\mathbf s}$$ $$\newcommand{\tvec}{\mathbf t}$$ $$\newcommand{\uvec}{\mathbf u}$$ $$\newcommand{\vvec}{\mathbf v}$$ $$\newcommand{\wvec}{\mathbf w}$$ $$\newcommand{\xvec}{\mathbf x}$$ $$\newcommand{\yvec}{\mathbf y}$$ $$\newcommand{\zvec}{\mathbf z}$$ $$\newcommand{\rvec}{\mathbf r}$$ $$\newcommand{\mvec}{\mathbf m}$$ $$\newcommand{\zerovec}{\mathbf 0}$$ $$\newcommand{\onevec}{\mathbf 1}$$ $$\newcommand{\real}{\mathbb R}$$ $$\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}$$ $$\newcommand{\laspan}[1]{\text{Span}\{#1\}}$$ $$\newcommand{\bcal}{\cal B}$$ $$\newcommand{\ccal}{\cal C}$$ $$\newcommand{\scal}{\cal S}$$ $$\newcommand{\wcal}{\cal W}$$ $$\newcommand{\ecal}{\cal E}$$ $$\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}$$ $$\newcommand{\gray}[1]{\color{gray}{#1}}$$ $$\newcommand{\lgray}[1]{\color{lightgray}{#1}}$$ $$\newcommand{\rank}{\operatorname{rank}}$$ $$\newcommand{\row}{\text{Row}}$$ $$\newcommand{\col}{\text{Col}}$$ $$\renewcommand{\row}{\text{Row}}$$ $$\newcommand{\nul}{\text{Nul}}$$ $$\newcommand{\var}{\text{Var}}$$ $$\newcommand{\corr}{\text{corr}}$$ $$\newcommand{\len}[1]{\left|#1\right|}$$ $$\newcommand{\bbar}{\overline{\bvec}}$$ $$\newcommand{\bhat}{\widehat{\bvec}}$$ $$\newcommand{\bperp}{\bvec^\perp}$$ $$\newcommand{\xhat}{\widehat{\xvec}}$$ $$\newcommand{\vhat}{\widehat{\vvec}}$$ $$\newcommand{\uhat}{\widehat{\uvec}}$$ $$\newcommand{\what}{\widehat{\wvec}}$$ $$\newcommand{\Sighat}{\widehat{\Sigma}}$$ $$\newcommand{\lt}{<}$$ $$\newcommand{\gt}{>}$$ $$\newcommand{\amp}{&}$$ $$\definecolor{fillinmathshade}{gray}{0.9}$$

### 2.2 Histogram

Histogram can be used to show distribution of medium to large quantitative data.  Data are summarized into frequency classes.

- consists of contiguous (adjoining) bars. A Typical histogram should have about 5 to 15 bars or classes. Each bar represents one class of data.

- The horizontal axis is labeled with what the data represents in each class.

- The vertical axis is labeled either frequency or relative frequency.

- Histogram can show shape of distribution of the data, the center, and the spread of the data, but data cannot be recovered.

- Histogram can also show outliers that has a frequency of 1 or 2 but with large gap from the rest of data.

Ex1. The histogram below shows distribution of weights of players in a football team.

a) How many players are on the team?

sum of frequencies: 2 + 10 + 9 + 7 + 4 + 2 = 34

b) How many players weight 240 lb. or more?

sum of the last three frequencies:  7 + 4 + 2 = 13

c) Can we tell the actual weights of the players from the histogram?

no because we only have frequency for each class.

d) Are there any outliers?

No outliers.

### Graph histogram from data

Method 1: Use Statdisk (statdisk.org) Histogram

- Input or copy and paste (ctrl-V) data to Sample Editor in a column.

- Select Data/Histogram.

- Select column where data is located.

- Enter Histogram Title, x and y-axis label.

-Use Statdisk default classes (Auto-fit) or select “user-defined”, enter “class-width” and “class start”.  “Class start” must be lower or equal to the minimum value in the data.

- Select frequency or relative frequency.

- Click plot. screen shot to save the histogram.

- Find the class range by hovering over each bar.

Ex1. Sketch a histogram for the following commute time. Use class width of 10 and lowest value of 20.

Method 2: Use Statdisk, Explore data.

- Enter data to one column,

- Select data, select Explore data-descriptive statistics.

- Select column, click evaluate.

- Summary statistics will be on the left and three graphs: Histogram (using auto-fit classes), boxplot and Normal quantile plot will be on the right.

Ex2. Sketch a Histogram of number of  customers in a sample of stores.

12, 34, 45, 67, 43, 55, 57, 89, 77, 72, 56, 37, 45, 49, 51

a) Use default class of statdisk. Copy Histogram below.  Describe shape of distribution.

The shape of the distribution is symmetrical normal, bell shape.

b) Regraph histogram with classwidth of 12 and lowest class limit 10.

use statdisk/data/select column 1/ click User-defined,

enter class width = 12

class start = 10

### B) Other graphs for quantitative data:

Frequency polygon/relative frequency polygon – Use for large datasets from frequency distribution. Use a line to show frequency distribution instead of bars. Line starts and ends at the horizontal axis.

Multiple frequency polygons can be graphed on the same graph for comparing two or more datasets.

### C) Shape of distribution and skewness

Histogram and frequency polygon can be used to show shape of distribution and skewness of data values.

Normal distribution means data are in a symmetrical bell shape.

Skewed to the right – most data are in the low values.

Skewed to the left – most data are in the high values.

Uniform – data are evenly distributed.

#### D) Time Series Graph:

Show trend of data collected over times. Data are not summarized. Time series graph shows increasing and decreasing data values over time.

Data are represented by points connected with lines.

Graph time-series graph by Excel

- Input data with time in one column and data in another column.

- Select the data values, insert chart, line graph.

- Select the x-axis label, right click, select data, select

- Edit horizontal axis label by selecting the year column. Select Ok and Ok.

- Input Chart Title, x and y-axis label and marker

Ch 2.2 Histogram is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.