Aniko

Mean, median, and frequency tables in Desmos

Lesson progressPractice problems 0/4

Type mean(L) or median(L) for a list. With a frequency table, plain mean() gives the wrong answer. Here’s the fix, with SAT examples.

Difficulty
Intermediate
Estimated time
50 minutes

What you’ll learn

  1. Type raw data once as a Desmos list and reuse it with mean(...) and median(...).
  2. Find a weighted mean from value and frequency columns.
  3. Explain why a frequency-table mean divides by the total frequency.
  4. Find a median by adding up frequencies, including when there's an even number of observations.
  5. Spot the mode as the value with the greatest frequency.
  6. Compare the centers of two data sets, with no regression needed.
  7. Tell when sorted data or a clear frequency pattern makes working by hand faster.

Why this matters on the SAT

Enter the data once for every center calculation

The SAT asks about the center of a data set in a few ways: the mean or median of a list of numbers, the mean of a frequency table, or how one unusual value shifts the center. Desmos saves you the adding. Type raw numbers once as a list, or type values and their frequencies as two paired columns, and every calculation works from what you typed.

Two words to have ready. The mean is the total of the values divided by how many values there are. The median is the middle value once the data are in order. With an even number of values there are two middle ones, and the median is their mean.

SAT example

The number of minutes nine students spent completing a task is shown below.

6, 10, 13, 2, 15, 22, 10, 4, 46,\ 10,\ 13,\ 2,\ 15,\ 22,\ 10,\ 4,\ 4

What is the mean number of minutes?

Fast Desmos solution

Give the list a name:

A=[6,10,13,2,15,22,10,4,4]

Then type mean(A). Desmos shows 9.555…9.555\ldots, and the fraction toggle turns that into the exact value:

869.\boxed{\frac{86}{9}}.

If a follow-up question asked for the median, median(A) would use the same list, with no retyping.

Here you’ll work with measures of center for one-variable data. Spread, standard deviation, and data displays come in the next lesson.

Calculator loads as you approach
Type the list once, then ask it for the mean.

When should you use Desmos?

Look at how the question hands you the data. Raw numbers go in a list. Values with counts go in a value-frequency table. And sometimes hand reasoning gets you there first.

Use a list when…

  • The question gives the raw numbers, like the nine task times above.

  • The numbers are out of order, like 1414, 99, 1818, 1212, so sorting or adding them in your head invites a slip.

  • You need more than one statistic, like both the mean and the median, from the same numbers.

Use a value-frequency table when…

  • The question shows each value next to how many times it occurs.

  • Writing out every repeat would take forever, like typing 88 nine times and 99 twelve times.

  • Two data sets share the same values but have different frequencies, like two classes taking the same test.

Use hand reasoning when the answer is already in view. A sorted list shows you its middle, the biggest frequency points straight to the mode, and cumulative counting (adding up frequencies) can find the median faster than typing a longer expression. Leave regression out of this one: a frequency table describes one variable, so there are no input and output pairs to fit a model to.

Check your understanding:

A sorted list has 1111 values, and the question asks only for the median. A different question gives six distinct values whose frequencies add up to 8080, and it asks for the mean. Which method would you pick for each?

Enter a list once and reuse it

Here's a new set of raw data:

14, 9, 18, 12, 16, 11, 20, 12.14,\ 9,\ 18,\ 12,\ 16,\ 11,\ 20,\ 12.

Name it:

B=[14,9,18,12,16,11,20,12]

Then type mean(B) and median(B). Desmos returns

mean⁡(B)=14\operatorname{mean}(B)=14

and

median⁡(B)=13.\operatorname{median}(B)=13.

You don't have to sort the numbers first. median(B) puts them in order for you and then finds the middle. In order, they're 9,11,12,12,14,16,18,209, 11, 12, 12, 14, 16, 18, 20. With 88 values there's no single middle one, so the median is the mean of the 44th and 55th values:

12+142=13.\frac{12+14}{2}=13.
Check your understanding:

Change the 2020 in list BB to 2828, without retyping the rest of the list. What are the new mean and median? Which one changed?

Common mistake:

Typing the numbers again inside each statistic, once for the mean and once for the median. Every retype is another chance to drop or mistype a value. Define the list once, check it against the numbers in the question, and reuse its name.

Calculator loads as you approach
Change a value in B and watch both results update.

Calculate a weighted mean from frequencies

A frequency tells you how many times a value occurs. Take this table:

ValueFrequency
2211
4433
6644
8822

It describes one 22, three 44s, four 66s and two 88s. Put the values in x_1 and their frequencies in y_1. The mean of all those numbers is a weighted mean:

sum of the value-frequency productstotal frequency.\frac{\text{sum of the value-frequency products}}{\text{total frequency}}.

In Desmos, type

total(x_1*y_1)/total(y_1)

The top multiplies each value by its frequency and adds the results. That's the same as adding all ten numbers one by one:

2(1)+4(3)+6(4)+8(2)=54.2(1)+4(3)+6(4)+8(2)=54.

The bottom counts every observation:

1+3+4+2=10.1+3+4+2=10.

So the mean is

5410=5.4.\frac{54}{10}=\boxed{5.4}.

Here's the part that trips people up. The table has 44 rows, but it holds 1010 observations. Divide by 44 and you're treating each value as if it showed up only once. Count observations, not rows.

Check your understanding:

A student divides the weighted total by the four table rows and gets 13.513.5. What went wrong, and what should the denominator be?

Common mistake:

Typing total(x_1)/total(y_1). That adds each value only once and ignores how often it occurs. Here it gives 20/10=220/10=2, which can't be right when 99 of the 1010 numbers are 44 or more. Multiply the paired columns first, then total.

Calculator loads as you approach
Each value is multiplied by the frequency in its own row.

Read median and mode from a frequency table

Stay with the same table, and add a column showing which positions each value fills once all 1010 numbers are in order:

ValueFrequencyPositions in order
221111
443322 through 44
664455 through 88
882299 through 1010

With 1010 observations, the median sits halfway between positions 55 and 66. Both of those positions hold a 66, so

median⁡=6.\operatorname{median}=6.

The greatest frequency is 44, and it belongs to the value 66, so

mode⁡=6.\operatorname{mode}=6.

Here's how to find a frequency-table median every time:

  1. Add the frequencies to get the total number of observations.
  2. Find the middle position. When the total is even, there are two middle positions.
  3. Add frequencies from the smallest value upward until you reach those positions.
  4. Read the value at those positions. If the two middle positions hold different values, the median is their mean.

For the mode, find the greatest frequency and report the value that goes with it. If several values tie for the greatest frequency, they're all modes. If every value occurs equally often, there's no unique mode.

Check your understanding:

A frequency table has values 11, 33, 55, and 77 with frequencies 22, 55, 44, and 33. What are the median and the mode?

Common mistake:

Picking the middle row of the table as the median. In the table above, the middle rows are 44 and 66, which would give 55, but the real median is 66. Rows are values, and some values fill more positions than others, so let the frequencies tell you where the middle is.

Common mistake:

Reporting the greatest frequency as the mode. In the table above, 44 is how often 66 appears, so the mode is 66, not 44. The mode is always one of the data values.

Example: Compare means and medians

Worked example

Data set P and data set Q each consist of 2424 test scores. The table shows how many times each score occurs.

ScoreData set P frequencyData set Q frequency
60606622
70707744
80805555
90904477
1001002266

Which statement correctly compares the means and medians of the two data sets?

  1. A

    The mean of data set P is greater, and the medians are equal.

  2. B

    The means are equal, and the median of data set P is less.

  3. C

    The mean of data set P is less, and the medians are equal.

  4. D

    The mean and median of data set P are both less than the mean and median of data set Q.

Step 1

Line up the scores and both frequency columns

Put the scores in x_1, P's frequencies in y_1, and Q's frequencies in y_2. Each frequency belongs to the score in its row, so keep the rows lined up.

Step 2

Calculate both means

Type one weighted-mean expression for each data set:

total(x_1*y_1)/total(y_1)

and

total(x_1*y_2)/total(y_2)

Desmos gives

mean⁡(P)=90512≈75.42\operatorname{mean}(P)=\frac{905}{12}\approx75.42

and

mean⁡(Q)=101512≈84.58.\operatorname{mean}(Q)=\frac{1015}{12}\approx84.58.

So P's mean is lower than Q's.

Calculator loads as you approach
Read the results next to the expressions. The dots on the graph are the table rows, not the means.

Step 3

Find both medians

Each data set has 2424 observations, so each median sits between positions 1212 and 1313.

For P, the 6060s fill positions 11 through 66 and the 7070s fill 77 through 1313. Both middle positions hold 7070:

median⁡(P)=70.\operatorname{median}(P)=70.

For Q, the running count reaches 1111 by the end of the 8080s, and the 9090s fill positions 1212 through 1818. Both middle positions hold 9090:

median⁡(Q)=90.\operatorname{median}(Q)=90.

P's median is lower too.

Step 4

Match both comparisons to a choice

Both comparisons point the same way:

mean⁡(P)<mean⁡(Q)\operatorname{mean}(P)<\operatorname{mean}(Q)

and

median⁡(P)<median⁡(Q).\operatorname{median}(P)<\operatorname{median}(Q).

P is lower on both, so the answer is D.

Common mistake:

Deciding from one row, like the 100100 row, where Q has 66 and P has 22. Every row feeds the mean, and the median depends on where the middle positions land, so use the whole table.

Notice the split. The calculator did the heavy lifting on the means, and cumulative counting was quicker for the medians. One SAT question can reward both. Matching centers wouldn't make two data sets alike, though. They could still differ in spread and shape, which comes up in the next lesson.

Finish the solution

The table is already in the calculator. Add the weighted-mean expression, then submit the mean.

Finish the weighted mean

Finish the solution

The table summarizes a data set.

ValueFrequency
121222
161655
202044
242411

What is the mean of the data set?

First steps

  1. Find the value column and the frequency column.
  2. Type one expression that divides the weighted total by the total frequency.
  3. Submit the mean.

Finish it

Calculator loads as you approach
Values in the first column, frequencies in the second.

Practice problems

Your turn. Before you type anything, look at how the data are given and which center the question asks for.

Find a median from raw data

Practice problem

The recorded travel times, in minutes, for eight trips are

18, 12, 15, 23, 19, 12, 21, 17.18,\ 12,\ 15,\ 23,\ 19,\ 12,\ 21,\ 17.

What is the median travel time, in minutes?

Calculator loads as you approach
One list, then its median.

Find a weighted mean

Practice problem

The table summarizes the number of points scored by a player in each of 1010 games.

PointsFrequency
3322
6644
9933
121211

What is the mean number of points scored per game?

Calculator loads as you approach
Points and frequencies as paired columns.

Compare center after adding a value

Practice problem

The table summarizes delivery times over 2121 days.

Delivery time (minutes)Frequency
121233
131344
141466
151555
161633

One additional delivery takes 3030 minutes and is added to the data set. Which statement correctly compares the mean, median, and mode of the new data set with those of the original data set?

Answer choices
Calculator loads as you approach
You may not need the calculator for this one.

Finish the lesson

4 practice examples left

Finish the remaining questions correctly to complete this lesson.

Quick recap

  • Type raw data once as a list, check it against the question, and reuse its name with mean(...) and median(...).
  • For a frequency table, the mean is total(x_1*y_1)/total(y_1).
  • Divide by the total frequency: count observations, not rows.
  • Find a frequency-table median by counting positions, not by picking the middle row.
  • The mode is the value with the greatest frequency, not the frequency itself.
  • When sorted values or a running count already show the answer, work by hand.
  • A center doesn't tell the whole story. Spread and shape take more information.

Next lesson

Spread, standard deviation, and box plots in Desmos

Compare variability and interpret one-variable data displays without confusing center and spread.

Start next lesson

Practice

Practice this lesson

456 SAT questions use what this lesson teaches. Practice a few in a study session at the difficulty you choose.

Start practice