Data Representation
Sofia's student council asked 120 eighth graders how long they spend on their phones each day. A list of 120 numbers is useless to the principal. A good graph tells the story in five seconds, and a bad one can tell the wrong story. So which graph should Sofia pick, and how does she build it?
Types of data
The graph you choose depends on the kind of data you have. Data (a variable) comes in two main types.
Categorical data are labels or categories: favorite app, pizza topping, school grade. Quantitative data are numbers you can add or average: siblings, height, minutes.
Quantitative data split again. Discrete data are counted and take separate values, like 0, 1, 2, 3 siblings. Continuous data are measured and can take any value in a range, like a height of 5.25 ft or a race time of 61.3 seconds.
| Type of data | Examples | Usual graph |
|---|---|---|
| Categorical | favorite genre, type of transportation | bar graph, circle graph |
| Quantitative discrete | number of siblings, number of absences | bar graph |
| Quantitative continuous (grouped) | height, time, weight | histogram |
If a measurement is only recorded in whole units (such as whole hours per week), it is often treated as discrete and shown with a bar graph. When data are grouped into intervals, it is treated as continuous.
Classify the following statistical variables obtained from a survey carried out in a middle school, indicating whether they are qualitative or quantitative (in the…
Classify the following statistical variables obtained from a survey carried out in a middle school, indicating whether they are qualitative or quantitative (in the latter case, specify whether they are discrete or continuous):
- a) The name of each student's favorite social network.
- b) The number of weekly hours they spend playing video games.
- c) The height, measured in feet, of the players on the basketball team.
- d) The number of siblings each student in a class has.
Frequency tables
Before you graph raw data, organize it in a frequency table.
Some problems write the frequency as $n_i$ instead of $f_i$. It is the same idea. Relative frequencies always add up to $1$ (or 100%), and the last cumulative frequency always equals $N$.
| Pets | $f_i$ | $h_i$ | Percent | $F_i$ | $H_i$ |
|---|---|---|---|---|---|
| 0 | 5 | 0.25 | 25% | 5 | 0.25 |
| 1 | 8 | 0.40 | 40% | 13 | 0.65 |
| 2 | 4 | 0.20 | 20% | 17 | 0.85 |
| 3 | 2 | 0.10 | 10% | 19 | 0.95 |
| 4 | 1 | 0.05 | 5% | 20 | 1.00 |
| Total | 20 | 1.00 | 100% |
For the "your turn" step, $H_i$ for 3 pets is $\frac{19}{20} = 0.95$, so 95% of the students have at most 3 pets.
Complete the following partial frequency table on the number of times a group of friends has been to the movies in the last month: | Movies ($x_i$) | Absolute frequency…
Complete the following partial frequency table on the number of times a group of friends has been to the movies in the last month:
| Movies ($x_i$) | Absolute frequency ($n_i$) | Relative frequency ($h_i$) | Percentage ($\%$) |
|---|---|---|---|
| $0$ | $4$ | $0,20$ | $20\%$ |
| $1$ | $8$ | ||
| $2$ | $5$ | $0,25$ | |
| $3$ | $0,15$ | $15\%$ | |
| Total | $20$ | $1,00$ | $100\%$ |
Bar graphs
A bar graph (bar chart) is for categorical or discrete data. Each value gets a bar whose height equals its frequency. The bars are separated by gaps, all have the same width, and the vertical axis starts at 0.
To draw one: label the horizontal axis with the values or categories, choose an even scale for the frequencies, then draw a bar to each frequency. Categories have no natural order, so you can arrange the bars any way you like.
A group of $20$ teenagers has answered what their favorite movie genre is. The results are: Action, Comedy, Horror, Action, Comedy, Science Fiction, Horror, Action,…
A group of $20$ teenagers has answered what their favorite movie genre is. The results are:
Action, Comedy, Horror, Action, Comedy, Science Fiction, Horror, Action, Action, Comedy, Horror, Science Fiction, Action, Comedy, Horror, Action, Action, Science Fiction, Comedy, Action.
Create a frequency table that includes the absolute frequency ($n_i$) and draw a bar chart to represent this data clearly.
A group of 30 teenagers has recorded how many hours a week they spend watching series on streaming* platforms. The data obtained is:…
A group of 30 teenagers has recorded how many hours a week they spend watching series on streaming platforms. The data obtained is:
$4, 7, 5, 8, 10, 4, 6, 7, 5, 9, 12, 6, 8, 7, 5, 4, 10, 8, 7, 6, 5, 9, 11, 4, 7, 6, 5, 8, 7, 6$.
- a) Classify the statistical variable.
- b) Create a frequency table that includes the absolute frequency ($f_i$) and the relative frequency ($h_i$).
- c) Represent the data using a bar chart.
Histograms
When data are continuous or spread over many values, you group them into intervals (also called classes). A histogram is like a bar graph, but the bars touch, because the intervals are consecutive. The base of each bar is its interval.
An interval like $[20, 30)$ includes 20 but not 30. A value equal to 30 goes in the next interval, $[30, 40)$. The class width is the length of the interval, and the class midpoint is the center of the interval. Some problems call the midpoint the class mark.
For the "your turn" step, the values $50$ and $55$ are in $[50, 60)$, so $f = 2$, and the midpoint is $\frac{50 + 60}{2} = 55$. Then draw touching bars of heights $3, 4, 3, 2$.
The time (in minutes) it takes $15$ students to get from their home to school has been recorded. The data is as follows:…
The time (in minutes) it takes $15$ students to get from their home to school has been recorded. The data is as follows:
$12, 15, 8, 22, 10, 14, 18, 25, 11, 13, 20, 9, 15, 12, 17$.
Group this data into a frequency table using class intervals of width $5$, starting at $5$. That is: $[5, 10), [10, 15), \dots$
Using the interval table created in the previous exercise, draw the corresponding frequency histogram. Make sure the bars are touching each other to indicate that the…
Using the interval table created in the previous exercise, draw the corresponding frequency histogram. Make sure the bars are touching each other to indicate that the variable is continuous.
An athletics club has recorded the times (in seconds) of its members in a 400-meter sprint. As it is a continuous variable, they have been grouped into the following…
An athletics club has recorded the times (in seconds) of its members in a 400-meter sprint. As it is a continuous variable, they have been grouped into the following intervals: $[50, 55), [55, 60), [60, 65), [65, 70)$. The absolute frequencies are $4, 12, 18$ and $6$ respectively.
- a) Construct the frequency table including the class mark for each interval.
- b) Draw the frequency histogram.
- c) What percentage of athletes took less than a minute ($60$ seconds) to complete the race?
Frequency polygons
A frequency polygon shows the same information as a histogram with a line. Plot a point above the midpoint of each interval at the height of its frequency, then connect the points with line segments. To close the polygon, extend it down to the axis at the midpoints of the empty intervals just before the first bar and just after the last bar.
For a bar graph of discrete data, do the same thing: connect the tops of the bars.
Reading a polygon works backward. Each peak sits at an interval's midpoint, so the intervals are centered on those points. If the midpoints are $62, 66, 70$, the class width is $4$ and the intervals are $[60, 64)$, $[64, 68)$, $[68, 72)$. The heights are the frequencies, and their sum is $N$.
To count data "at least" some value, add the frequencies of all intervals from that one up. Then divide by $N$ for the relative frequency of that group.
The backpacks of 40 students were weighed at the school entrance for a health study. The results have been organized in the following table: | Weight (lbs) | $[0, 2)$ |…
The backpacks of 40 students were weighed at the school entrance for a health study. The results have been organized in the following table:
| Weight (lbs) | $[0, 2)$ | $[2, 4)$ | $[4, 6)$ | $[6, 8)$ | $[8, 10]$ |
|---|---|---|---|---|---|
| Students ($f_i$) | $3$ | $8$ | $15$ | $10$ | $4$ |
- a) Draw the frequency histogram.
- b) Plot the frequency polygon on the same graph.
- c) How many students carry a backpack weighing $6$ lbs or more? Calculate the cumulative relative frequency of this group.
A weather station has recorded the maximum temperatures during the month of November. By grouping the data into intervals, the following frequency polygon has been…
A weather station has recorded the maximum temperatures during the month of November. By grouping the data into intervals, the following frequency polygon has been obtained:
The values on the $X$-axis are the class marks of intervals with a width of $4^\circ\text{C}$.
- a) Determine the temperature intervals that have been used.
- b) Given that the points represent the absolute frequency ($f_i$), how many days did the month of November have according to this record? Is the total number of days correct?
- c) In which temperature interval is the mode found?
Relative frequency and unequal class widths
Instead of frequency, a histogram can use relative frequency on the vertical axis. The shape is identical. Only the numbers on the axis change, from counts to proportions of the total.
The area of a bar is height $\times$ width. When all intervals have the same width, area is proportional to height, so the area of each rectangle shows that interval's share of the data.
When the widths are different, a bar that is twice as wide looks twice as big, even if it holds the same number of data values. Fix this by using the density:
$$\text{density} = \frac{\text{frequency}}{\text{class width}}$$Now the area of each bar equals its frequency. Likewise, density computed from relative frequency gives area equal to the relative frequency. To read such a graph, use $\text{frequency} = \text{height} \times \text{width}$.
For the "your turn" step, the area is $2 \times 10 = 20$, which is the frequency of $[10, 20)$.
In a quality control check at a smart light bulb factory, the lifespan (in thousands of hours) of a sample of $100$ units was measured. It is known that: $20\%$ lasted…
In a quality control check at a smart light bulb factory, the lifespan (in thousands of hours) of a sample of $100$ units was measured. It is known that:
-
$20\%$ lasted between $10$ and $15$ thousand hours.
-
$50\%$ lasted between $15$ and $20$ thousand hours.
-
The rest lasted between $20$ and $25$ thousand hours.
- a) Construct the absolute and relative frequency table.
- b) Represent the relative frequency histogram. What does the area of each rectangle represent in this case?
- c) If a light bulb is considered "excellent" if it lasts more than $20$ thousand hours, how many light bulbs in the sample are excellent?
Look at the following histogram representing the resting heart rates of a group of athletes. Note that the intervals do not have the same width. In this type of graph,…
Look at the following histogram representing the resting heart rates of a group of athletes. Note that the intervals do not have the same width.
In this type of graph, the frequency is proportional to the area of the bar, not its height. If there are $10$ athletes in the interval $[40, 50)$:
- a) How many athletes are there in total in the study?
- b) Construct the grouped frequency table for the intervals shown, indicating the class mark for each one.
Cumulative frequency graphs
A cumulative frequency graph (also called an ogive) answers questions like "How many data values are below a given number?" Some problems call it a cumulative frequency polygon. Build it from the cumulative column.
For grouped data, plot the points $(\text{right endpoint of the interval},\ F_i)$, add a starting point at $0$ at the left end of the first interval, and connect the points with segments. The graph never goes down. For discrete data, plot $(x_i, F_i)$ and connect.
You can also go backward from a table with missing entries. Because $H_i = \frac{F_i}{N}$, you get $F_i = H_i \cdot N$, and each frequency is the difference between consecutive cumulative frequencies: $f_i = F_i - F_{i-1}$.
For the "your turn" step, look at $30$: $F = 16$ and $H = 0.80$, so 80% of the students practice less than 30 minutes.
In the Language Arts exam, the marks obtained by an 8th grade class were the following: Marks: $3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 8, 8, 9, 10$. a) Create a…
In the Language Arts exam, the marks obtained by an 8th grade class were the following:
Marks: $3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 8, 8, 9, 10$.
- a) Create a cumulative absolute frequency table ($F_i$).
- b) Represent the absolute frequency polygon from the bar chart of the grades.
- c) Looking at the polygon, in which range of grades does the greatest increase in frequency occur?
The environment department of a local council wants to represent the monthly water consumption of families in a neighborhood. They have collected the data from the…
The environment department of a local council wants to represent the monthly water consumption of families in a neighborhood. They have collected the data from the latest bill and classified it in cubic feet ($m^3$):
| Consumption ($m^3$) | $[0, 10)$ | $[10, 20)$ | $[20, 30)$ | $[30, 40)$ |
|---|---|---|---|---|
| Families ($f_i$) | $15$ | $45$ | $30$ | $10$ |
- a) Calculate the cumulative relative frequency ($H_i$) for each interval.
- b) Represent the data on a cumulative frequency graph (or ogive).
- c) If the council decides to give a bonus to families who consume less than $20 m^3$, what percentage of the neighborhood's population benefits from this measure?
A soft drinks brand has carried out a study on how many cans a group of teenagers consume per week. However, the frequency table has been stained and only some of the…
A soft drinks brand has carried out a study on how many cans a group of teenagers consume per week. However, the frequency table has been stained and only some of the cumulative relative frequencies ($H_i$) can be read:
| Cans ($x_i$) | Absolute freq. ($f_i$) | Cumul. relative freq. ($H_i$) |
|---|---|---|
| 0 | $0,15$ | |
| 1 | $12$ | |
| 2 | $0,65$ | |
| 3 | $0,85$ | |
| 4 | $6$ | $1,00$ |
Given that the sample size is $40$ individuals:
- a) Reconstruct the complete frequency table (calculating $f_i$, $F_i$, $n_i$ and $H_i$).
- b) Represent the data using a cumulative frequency polygon.
Circle graphs
A circle graph (pie chart) shows how a whole is divided into parts, mostly for categorical data. Each sector's angle is proportional to its share:
$$\text{angle} = h_i \cdot 360^\circ = \frac{f_i}{N} \cdot 360^\circ$$Going the other way, $\text{percent} = \dfrac{\text{angle}}{360^\circ}$, and the quantity in a sector is $\dfrac{\text{angle}}{360^\circ} \cdot \text{total}$. A whole circle is 100%, or $360^\circ$, so a quarter of the circle is 25% and $90^\circ$.
For the "your turn" step, $h = \frac{5}{20} = 0.25$ and the angle is $0.25 \times 360^\circ = 90^\circ$. Always check that all the angles add up to $360^\circ$.
The following pie chart shows the distribution of the $400$ students at a school according to the extracurricular language they have chosen to study. Look at the graph…
The following pie chart shows the distribution of the $400$ students at a school according to the extracurricular language they have chosen to study. Look at the graph and answer:
- a) What percentage of students study German?
- b) How many students in total study English?
- c) Which is the least popular language?
A study has been carried out on the type of transport used by students at a middle school to get to class. The results are shown in the following pie chart, but some…
A study has been carried out on the type of transport used by students at a middle school to get to class. The results are shown in the following pie chart, but some data has been erased:
-
The "Walking" sector occupies an angle of $144^\circ$.
-
The "Bus" sector represents $25\%$ of the students.
-
The rest of the students come by "Bicycle".
- a) Calculate the percentage of students who walk.
- b) Determine the angle in degrees corresponding to the "Bus" sector and the "Bicycle" sector.
- c) If there are 600 students in the school, how many come by each means of transport?
The following pie chart shows the distribution of the types of waste collected in a school recycling campaign. It is known that a total of $180$ pounds of waste was…
The following pie chart shows the distribution of the types of waste collected in a school recycling campaign. It is known that a total of $180$ pounds of waste was collected.
- a) Calculate the angle corresponding to the "Plastic" sector.
- b) Calculate how many pounds of each type of waste were collected.
- c) If next year the amount of glass is expected to double while keeping the total waste constant, how would the degrees of the paper sector change?
Stratified samples
Often you cannot ask everyone, so you survey a sample of the population. For a sample to represent the population, it should mirror its groups. In a stratified sample, you split the population into groups (strata), such as neighborhoods or grades. Then you choose randomly within each group, taking a share proportional to the group's size:
$$\text{sample from a group} = \frac{\text{group size}}{\text{population}} \cdot \text{sample size}$$For the "your turn" step, $\frac{240}{800} \cdot 80 = 24$, and $30 + 26 + 24 = 80$.
After surveying, you will often get a percent for each group, like "40% of the 6th graders said yes". These percents do not add up to 100%, because each one is a share of a different group. A circle graph needs parts of one whole, so use a bar graph to compare them.
A local council wants to find out young people's opinions on the new skate parks. The total population is $12.000$ young people, distributed across three neighborhoods:…
A local council wants to find out young people's opinions on the new skate parks. The total population is $12.000$ young people, distributed across three neighborhoods: Center ($5.000$), North ($4.000$) and South ($3.000$). They decide to take a representative sample of $600$ individuals using stratified random sampling.
- a) How many young people from each neighborhood must be selected for the sample to be representative?
- b) After carrying out the survey, it is found that $40\%$ in the Center, $60\%$ in the North and $30\%$ in the South are "Very satisfied". Represent these satisfaction results using a comparative bar chart (clustered bar chart).
Line graphs and choosing a graph
A line graph shows how something changes over time, like followers per month or temperature per hour. Plot a point for each time, then connect neighboring points with segments. The line shows the trend: rising, falling or steady.
To compare two series, draw both lines on the same axes with different colors (or one dashed) and a legend. A steady line that stays roughly flat is stable. A line that keeps climbing has a clear upward trend. Look at the overall shape and how much the points jump up and down.
| I want to show… | Graph |
|---|---|
| How often separate values or categories occur | Bar graph |
| Data grouped into intervals | Histogram (and polygon) |
| Parts of one whole | Circle graph |
| Change over time | Line graph |
An "influencer" has recorded the number of new followers they have gained each day for a week: Monday:* $120$, Tuesday:* $150$, Wednesday:* $130$, Thursday:* $180$,…
An "influencer" has recorded the number of new followers they have gained each day for a week:
Monday: $120$, Tuesday: $150$, Wednesday: $130$, Thursday: $180$, Friday: $210$, Saturday: $250$, Sunday: $230$.
Represent this evolution using a frequency polygon. To do this, plot the points on a coordinate axis (Day, Followers) and join them with line segments.
State which is the most appropriate type of statistical graph (Bar chart, Histogram or Pie chart) to represent the following situations: a) We want to compare the…
State which is the most appropriate type of statistical graph (Bar chart, Histogram or Pie chart) to represent the following situations:
- a) We want to compare the recycling percentage of glass, paper and plastic in a neighborhood.
- b) We want to show the number of absences for each student in a class (from $0$ to $5$ absences).
- c) We want to represent the weight of newborns in a hospital over a month (data grouped into intervals).
- d) We want to compare the preferences for $4$ different brands of soft drinks among the young people in a town.
An influencer* analyzes the growth of their followers on two different social networks over the last 5 months. The data (in thousands of new followers per month) is:…
An influencer analyzes the growth of their followers on two different social networks over the last 5 months. The data (in thousands of new followers per month) is:
-
Network A: $2, 5, 8, 12, 15$
-
Network B: $6, 7, 6, 8, 7$
- a) Represent both data series on the same line graph (frequency polygon). Use a different color for each network or a dashed line for one of them.
- b) Explain, based on the shape of the graphs, which of the two social networks has more stable growth and which has a clearer upward trend.
Box plots
A box plot (box-and-whisker plot) shows how data are spread out. It is built from the five-number summary: minimum, first quartile $Q_1$, median, third quartile $Q_3$ and maximum.
To find the quartiles, order the data and find the median. $Q_1$ is the median of the lower half, and $Q_3$ is the median of the upper half. If the number of values is odd, leave the median out of both halves. The interquartile range is $\text{IQR} = Q_3 - Q_1$, and it measures the spread of the middle half of the data.
For the "your turn" step, $8$ is greater than $0.75$, so it is not an outlier, and the lower whisker ends at $8$.
Play with the numbers in the widget and watch how the median and spread change.
To compare two box plots, compare the center (the medians) and the spread (the IQR and the overall range). A group with a smaller IQR is more consistent. Also note any outliers.
A social media content creator analyses the duration (in seconds) of their latest videos. The data obtained is: $15, 42, 55, 12, 18, 30, 45, 95, 110, 20, 35, 48$. a)…
A social media content creator analyses the duration (in seconds) of their latest videos. The data obtained is: $15, 42, 55, 12, 18, 30, 45, 95, 110, 20, 35, 48$.
- a) Calculate the interquartile range and identify if there are any outliers (those at a distance greater than $1,5 \cdot \text{IQR}$ from the quartiles).
- b) Represent the box-and-whisker plot, clearly marking any outliers with a prominent dot.
Two 8th grade groups have recorded the daily time (in minutes) they spend playing video games. The results have been represented in the following box plots. Analyze the…
Two 8th grade groups have recorded the daily time (in minutes) they spend playing video games. The results have been represented in the following box plots.
Analyze the graphs and give reasoned answers:
- a) What is the maximum playing time in Group B? And the value of the upper quartile ($Q_3$) in Group A?
- b) In which group is the data more spread out? Use the range and the interquartile range to justify this.
- c) If a student claims that $75\%$ of the students in Group B play for longer than the median of Group A, are they correct? Why?
Misleading graphs
A graph can be technically correct and still give the wrong impression. Both graphs below show the same data: a bike shop's sales were 50 (thousand dollars) in 2023 and 55 in 2024, which is a 10% increase.
On the left, the second bar looks more than three times as tall as the first. On the right, it is only a little taller. Sales really grew by $\frac{55 - 50}{50} = 10\%$, so the right graph is more honest. Watch for these red flags:
-
A vertical axis that does not start at 0 on a bar graph.
-
A scale that is uneven (the gaps between ticks are not equal).
-
Bars or pictures that grow in both width and height, so area exaggerates the change.
-
A short time window that hides the long-term trend.
-
A circle graph whose percents do not add up to 100%.
A quick test: compute the real percent change from the numbers, then compare it with how big the change looks.
Back to the start: Sofia measured phone time in minutes, which is continuous, so she can group the times into intervals and draw a histogram with touching bars and an axis that starts at 0.
A graph has been published in a news report about the increase in rent prices in a city. Some critics say the graph is misleading because the y-axis does not start at…
A graph has been published in a news report about the increase in rent prices in a city. Some critics say the graph is misleading because the y-axis does not start at zero.
- a) According to the graph, what percentage increase appears to be there visually when comparing the height of the bars?
- b) Calculate the actual percentage increase in the rent price between the year 2022 ($\$800$) and 2024 ($\$900$).
- c) Mentally redraw (or describe) how the perception of the increase would change if the $Y$-axis started at $\$0$.