# 2: Graphical Methods for Describing Data Distributions

Source: https://cca.twango.dev/AP-Statistics/chapter-2

# 2: Graphical Methods for Describing Data Distributions

After asking a question and collecting data, display and analyze the data.

## Types of data

- **Categorical:** labels or groups, such as favorite color or yes/no. Numerical category codes are still categorical.
- **Numerical, discrete:** countable possible values, such as the number of errors.
- **Numerical, continuous:** values over an interval, such as elapsed time; measurements are rounded in practice.

## Categorical displays

A **bar chart** shows frequency or relative frequency on the vertical axis. Bars are separated; nominal categories can be arranged in any order. Preserve the natural order of ordinal categories.

A **comparative bar chart** displays groups side by side. Relative frequencies help compare groups of different sizes. Describe which categories are larger and how the groups differ.

## Numerical displays

| Display | Features |
| --- | --- |
| Dot plot | A number line with a dot per observation; stack repeated values. |
| Histogram | Adjacent intervals, often $[a,b)$, with touching bars. Heights show frequency or relative frequency for equal-width bins; unequal-width bins require density so **area** represents frequency. Individual values are hidden. |
| Stem-and-leaf plot | Preserves individual values; include a key and sort leaves. |
| Cumulative relative frequency plot | Shows the proportion at or below each value. It is nondecreasing and may have flat segments; ends at 100%. |
| Time series plot | Time on the horizontal axis, observed value vertically; consecutive observations may be connected. |

### Stem-and-leaf example

Key: $1\mid2=12$.

| Stem | Leaves |
| --- | --- |
| 1 | 2 3 4 |
| 2 | 5 6 7 |

### Comparative stem-and-leaf example

The two groups share a **stem** column. Read the left leaves from the stem outward in increasing order. Key: a leaf of 4 on stem 2 represents 24 in either group.

| Group A | Stem | Group B |
| --- | --- | --- |
| 6 5 4 | 2 | 1 2 3 |
| 3 2 1 | 3 | 4 5 6 |

## Describing distributions: SOCS

- **Shape:** symmetric, skewed, unimodal, bimodal, or multimodal. Unimodal means one peak; it does **not** necessarily mean symmetric or bell shaped.
- **Outliers:** unusually extreme observations relative to the rest.
- **Center:** a typical value, often the mean or median.
- **Spread:** describe variability using a suitable measure, such as standard deviation or IQR.

A left-skewed distribution has a long **left tail**; a right-skewed distribution has a long **right tail**. Two peaks are bimodal; multiple peaks are multimodal.

> [!warning] Review correction
> The original notes equated unimodal with bell shaped and said cumulative plots have only positive slope. A single peak can be skewed, and a cumulative plot can be flat.

## Bivariate numerical data

A **scatterplot** displays pairs $(x,y)$. Put an explanatory variable horizontally and a response vertically when those roles make sense. This choice does not establish that $x$ causes $y$.

Related: [[chapter-3|Numerical summaries]] · [[chapter-4|Correlation and regression]]
