Achievable logoAchievable logo
AP Statistics
Sign in
Sign up
Purchase
Textbook
Practice exams
Support
How it works
Resources
Exam catalog
Mountain with a flag at the peak
Textbook
Introduction
1. One variable data
1.1 Categorical and quantitative variables
1.2 The normal distribution
2. Two variable data
3. Data collection
4. Probability and random variables
5. Sampling distributions
6. Categorical data
7. Quantitative data
8. Chi-square
9. Linear regression
Wrapping up
Achievable logoAchievable logo
1.1 Categorical and quantitative variables
Achievable AP Statistics
1. One variable data
Our AP Statistics course is currently in development and is a work-in-progress.

Categorical and quantitative variables

7 min read
Font
Discuss
Share
Feedback

Categorical variables

Definitions
Categorical variable
A variable that takes on values that are category names or group labels
Nominal variable
A type of categorical variable where the labels cannot be ordered or ranked
  • Examples: color (red, orange, green, blue) and food (pizza, tacos, hamburgers)
  • There is no natural “first, second, third” ordering
Ordinal variable
A type of categorical variable where the labels can be ordered and ranked
  • Examples: highest level of education (did not finish high school, high school graduate, bachelor’s degree, master’s degree, PhD), frequency (never, rarely, sometimes, often, always)
  • The options have a logical order or ranking

You can display categorical data with a bar chart, a pie chart, or a dot plot.

Practice problem

A survey asked 30 randomly selected high school students from School A for their favorite movie genre:

  • 8 chose Comedy
  • 12 chose Action
  • 4 chose Romance
  • 3 chose Drama
  • 3 chose Sci-Fi

It’s possible to create a bar chart, a pie chart, and a dot plot to represent this data.

Bar chart

In a bar chart:

  • The x-axis lists the categories (here, the movie genres).
  • The y-axis shows frequency (how many students chose each genre).
  • Each category gets a bar whose height equals its frequency.

Here is the bar graph that represents this data:

Bar chart of movie genre preferences with action as the highest category.
Bar graph example

Pie chart

To create a pie chart, first convert each category’s count into a percentage of the total (30 students).

Category Students Fraction Percent
Comedy 8 308​ ≈27%
Action 12 3012​ =40%
Romance 4 304​ ≈13%
Drama 3 303​ =10%
Sci-fi 3 303​ =10%

In the pie chart, the size of each slice matches the percentage for that genre.

Pie chart of movie genre preferences with comedy as the largest share.
Pie chart example

Quantitative variables

Definitions
Quantitative variable
A variable that takes on numerical values and represents an amount or measurement
Discrete variable
A variable that can only take on a finite or countable number of values (i.e. number of students in a classroom, number of apples in the grocery store)
Continuous variable
A variable that can take on uncountable or infinite values without gaps (i.e. height, weight, time)

Quantitative data can be represented by dot plots, histograms, stemplots, cumulative relative frequency plots, or boxplots.

To describe the distribution of quantitative data, it’s important to consider:

  • Shape
  • Center
  • Spread
  • Outliers
  • Clusters
  • Gaps

Shape

Many different shapes are possible, but here are some common patterns:

Definitions
Symmetric
There is a vertical line of symmetry at or approximately at the mean of the data set.
Skewed to the right
Most data leans to the left of the graph, but a few values far to the right skew the overall mean. For example, income of American people is skewed to the right because over 99% of Americans make somewhere between $0 and $500,000 annually, but there are a few very high earning Americans who earn well over one billion dollars each year, and such people are skewing the average annual income up. To some extent, any American earning over $500,000 is skewing the average income up because very few Americans earn anywhere close to that much money.
Skewed to the left
Most of the data leans to the right of the graph, but a few values far to the left skew the overall mean. For example, out of a total of 1000 AP Statistics students in City X, most of them worked very hard and scored between 75% and 100% on the exam but a small number of students (7 students, for example) did not attend class often and did not keep up with the course material and ended up with a failing grade that was much lower.
Bell-shaped
A specific symmetric case where there is a mound in the center with two sloping tails. For example, IQ scores form a relatively bell-shaped curve with most people having a score fairly close to the mean of 100, with most scores falling in the 85–115 range and only a few people having scores significantly lower than 85 or significantly higher than 115. Learn more about the bell-shaped curve in Chapter 1.3 (The Normal Distribution).
Uniform
A specific symmetric case where the frequency of each value is equal. For example, if someone rolls a fair coin 100 times and records how often they roll each number, they will end up with a roughly equal number of rolls for each outcome because all of the numbers 1 through 6 are equally likely to be rolled.

Center

The center is a “typical” value for the distribution. You’ll usually describe center using either the mean or the median.

Definitions
Mean
A measure of central tendency where all the data points are added up and then divided by the total number of data points. Mean is also known as the arithmetic average.
Median
A measure of central tendency where all the data points are ordered from smallest to largest and the value that splits the data exactly in half is the median. If there are two middle values, then the average of just those two is the median. Half of the data falls to the left of the median while the other half falls to the right of the median.

Spread

Spread describes how far apart the values are.

Definitions
Range
The difference between the minimum and maximum.
Interquartile range
The difference between the upper quartile and lower quartile (the upper quartile is the median of the top half of the data set; the lower quartile is the median of the bottom half of the data set).
Variance
The value that is the average of the squared deviations from the mean; a measure of spread (more on this later).
Standard deviation
The positive square root of the variance.

In future chapters, there will be examples and further details regarding variance, standard deviation, and the usefulness of both of them.

Outliers, clusters, and gaps

Outliers are values that fall far outside the expected range. For example, a person who has an IQ of 145 is an outlier because about 95% of people have an IQ from 70–130. An American who earned 5 million dollars last year is an outlier, because less than

Categorical variables

  • Values are category names or group labels
  • Two types:
    • Nominal: labels have no natural order (e.g., color, food)
    • Ordinal: labels have a logical ranking (e.g., education level, frequency)

Displaying categorical data

  • Use bar charts or pie charts
  • Bar chart: x-axis = categories, y-axis = frequency
  • Pie chart: convert counts to percentages; slice size = percentage

Quantitative variables

  • Take on numerical values representing amounts or measurements
  • Two types:
    • Discrete: countable, finite values (e.g., number of students)
    • Continuous: measurable values that can take on any value within an interval (e.g., height, weight, time)

Describing quantitative distributions

  • Key features to describe: shape, center, spread, outliers, clusters, gaps
  • Displayed using dot plots, histograms, stemplots, cumulative relative frequency plots, or boxplots

Shape

  • Symmetric: vertical line of symmetry near the mean
  • Skewed right: tail extends to the right; mean pulled up by high outliers
  • Skewed left: tail extends to the left; mean pulled down by low outliers
  • Bell-shaped: mound at center with two tails (e.g., IQ scores)
  • Uniform: all values appear with equal frequency

Center

  • Mean: sum of all values ÷ number of values
  • Median: middle value when data is ordered; splits data exactly in half

Spread

  • Range: maximum − minimum
  • Interquartile range (IQR): upper quartile − lower quartile
  • Variance: average of squared deviations from the mean
  • Standard deviation: positive square root of variance

Outliers, clusters, and gaps

  • Outliers: values falling far outside the expected range

Sign up for free to take 13 quiz questions on this topic

Previous
Next  | 1.2 The normal distribution
All rights reserved ©2016 - 2026 Achievable, Inc.

Categorical and quantitative variables

Categorical variables

Definitions
Categorical variable
A variable that takes on values that are category names or group labels
Nominal variable
A type of categorical variable where the labels cannot be ordered or ranked
  • Examples: color (red, orange, green, blue) and food (pizza, tacos, hamburgers)
  • There is no natural “first, second, third” ordering
Ordinal variable
A type of categorical variable where the labels can be ordered and ranked
  • Examples: highest level of education (did not finish high school, high school graduate, bachelor’s degree, master’s degree, PhD), frequency (never, rarely, sometimes, often, always)
  • The options have a logical order or ranking

You can display categorical data with a bar chart, a pie chart, or a dot plot.

Practice problem

A survey asked 30 randomly selected high school students from School A for their favorite movie genre:

  • 8 chose Comedy
  • 12 chose Action
  • 4 chose Romance
  • 3 chose Drama
  • 3 chose Sci-Fi

It’s possible to create a bar chart, a pie chart, and a dot plot to represent this data.

Bar chart

In a bar chart:

  • The x-axis lists the categories (here, the movie genres).
  • The y-axis shows frequency (how many students chose each genre).
  • Each category gets a bar whose height equals its frequency.

Here is the bar graph that represents this data:

Pie chart

To create a pie chart, first convert each category’s count into a percentage of the total (30 students).

Category Students Fraction Percent
Comedy 8 308​ ≈27%
Action 12 3012​ =40%
Romance 4 304​ ≈13%
Drama 3 303​ =10%
Sci-fi 3 303​ =10%

In the pie chart, the size of each slice matches the percentage for that genre.

Quantitative variables

Definitions
Quantitative variable
A variable that takes on numerical values and represents an amount or measurement
Discrete variable
A variable that can only take on a finite or countable number of values (i.e. number of students in a classroom, number of apples in the grocery store)
Continuous variable
A variable that can take on uncountable or infinite values without gaps (i.e. height, weight, time)

Quantitative data can be represented by dot plots, histograms, stemplots, cumulative relative frequency plots, or boxplots.

To describe the distribution of quantitative data, it’s important to consider:

  • Shape
  • Center
  • Spread
  • Outliers
  • Clusters
  • Gaps

Shape

Many different shapes are possible, but here are some common patterns:

Definitions
Symmetric
There is a vertical line of symmetry at or approximately at the mean of the data set.
Skewed to the right
Most data leans to the left of the graph, but a few values far to the right skew the overall mean. For example, income of American people is skewed to the right because over 99% of Americans make somewhere between $0 and $500,000 annually, but there are a few very high earning Americans who earn well over one billion dollars each year, and such people are skewing the average annual income up. To some extent, any American earning over $500,000 is skewing the average income up because very few Americans earn anywhere close to that much money.
Skewed to the left
Most of the data leans to the right of the graph, but a few values far to the left skew the overall mean. For example, out of a total of 1000 AP Statistics students in City X, most of them worked very hard and scored between 75% and 100% on the exam but a small number of students (7 students, for example) did not attend class often and did not keep up with the course material and ended up with a failing grade that was much lower.
Bell-shaped
A specific symmetric case where there is a mound in the center with two sloping tails. For example, IQ scores form a relatively bell-shaped curve with most people having a score fairly close to the mean of 100, with most scores falling in the 85–115 range and only a few people having scores significantly lower than 85 or significantly higher than 115. Learn more about the bell-shaped curve in Chapter 1.3 (The Normal Distribution).
Uniform
A specific symmetric case where the frequency of each value is equal. For example, if someone rolls a fair coin 100 times and records how often they roll each number, they will end up with a roughly equal number of rolls for each outcome because all of the numbers 1 through 6 are equally likely to be rolled.

Center

The center is a “typical” value for the distribution. You’ll usually describe center using either the mean or the median.

Definitions
Mean
A measure of central tendency where all the data points are added up and then divided by the total number of data points. Mean is also known as the arithmetic average.
Median
A measure of central tendency where all the data points are ordered from smallest to largest and the value that splits the data exactly in half is the median. If there are two middle values, then the average of just those two is the median. Half of the data falls to the left of the median while the other half falls to the right of the median.

Spread

Spread describes how far apart the values are.

Definitions
Range
The difference between the minimum and maximum.
Interquartile range
The difference between the upper quartile and lower quartile (the upper quartile is the median of the top half of the data set; the lower quartile is the median of the bottom half of the data set).
Variance
The value that is the average of the squared deviations from the mean; a measure of spread (more on this later).
Standard deviation
The positive square root of the variance.

In future chapters, there will be examples and further details regarding variance, standard deviation, and the usefulness of both of them.

Outliers, clusters, and gaps

Outliers are values that fall far outside the expected range. For example, a person who has an IQ of 145 is an outlier because about 95% of people have an IQ from 70–130. An American who earned 5 million dollars last year is an outlier, because less than

Key points

Categorical variables

  • Values are category names or group labels
  • Two types:
    • Nominal: labels have no natural order (e.g., color, food)
    • Ordinal: labels have a logical ranking (e.g., education level, frequency)

Displaying categorical data

  • Use bar charts or pie charts
  • Bar chart: x-axis = categories, y-axis = frequency
  • Pie chart: convert counts to percentages; slice size = percentage

Quantitative variables

  • Take on numerical values representing amounts or measurements
  • Two types:
    • Discrete: countable, finite values (e.g., number of students)
    • Continuous: measurable values that can take on any value within an interval (e.g., height, weight, time)

Describing quantitative distributions

  • Key features to describe: shape, center, spread, outliers, clusters, gaps
  • Displayed using dot plots, histograms, stemplots, cumulative relative frequency plots, or boxplots

Shape

  • Symmetric: vertical line of symmetry near the mean
  • Skewed right: tail extends to the right; mean pulled up by high outliers
  • Skewed left: tail extends to the left; mean pulled down by low outliers
  • Bell-shaped: mound at center with two tails (e.g., IQ scores)
  • Uniform: all values appear with equal frequency

Center

  • Mean: sum of all values ÷ number of values
  • Median: middle value when data is ordered; splits data exactly in half

Spread

  • Range: maximum − minimum
  • Interquartile range (IQR): upper quartile − lower quartile
  • Variance: average of squared deviations from the mean
  • Standard deviation: positive square root of variance

Outliers, clusters, and gaps

  • Outliers: values falling far outside the expected range

More from One variable data

  • The normal distribution