Warm-up: Restaurant wait times
0.05
A local food critic investigates
wait times for Slowhand Pizza.
After conducting an anonymous
survey of wait times (in min), he
creates the histogram shown on
the right:
0.04
0.03
0.02
0.01
0
10
20
30
40
50
60
Time (min)
Poll Question
1. True or false: The longest time a survey participant waited was 0.04
minutes.
A
True
B
False
2. If you were to go to Red Lobster later today, would you anticipate having
to wait less than 30 minutes or more than 30 minutes? Why?
A
Less than 30 min
B
More than 30 min
1
MAT133
Calculus and Linear Algebra for Commerce
Feb 27, 2026
Lecture 57 The Density Scale
& Density Functions
Big Questions
• How can we visually represent a long list of data measurements?
• How can we extract useful information from our visual
representations?
Warm-up: Restaurant wait times
0.05
0.04
A local food critic investigates
wait times for Red Lobster. After
conducting an anonymous survey
of wait times (in min), he creates
the histogram shown on the right:
0.03
0.02
0.01
0
10
20
30
40
50
60
Time (min)
Poll Question
1. True or false: The longest time the food critic waited was 0.4 minutes.
A
True
B
False
2. If you were to go to Red Lobster later today, would you anticipate having
to wait less than 30 minutes or more than 30 minutes? Why?
A
Less than 30 min
B
More than 30 min
3
The Density Scale
Recall: A proportion of area under a histogram represents a proportion
of data.
The density scale is the natural way of labelling the vertical axis of a
histogram so that
the
is equal to the
represented by it.
e.g. The histogram from the warm up slide uses the density scale.
Discussion Question
The sum of the areas of all the blocks of a histogram is
when using
the density scale.
4
Recall: Creating a Histogram
Suppose that you measure the heights of people in your hive (in cm) and
you create the following list, in increasing order:
149, 160, 162, 166, 166, 169, 172, 177, 181, 205
Recall
Last class, we used the data to complete the table on the left. We then
determined that a histogram for our data table would have the shape of that
shown on the right.
Bin
Frequency
Fraction
[140, 160)
[160, 170)
[170, 180)
[180, 210)
1
5
2
2
1
10
5
10
2
10
2
10
140
150
160
170
180
190
200
210
Let’s see how to determine the density scale for this histogram!
5
The Density Scale
Recall: Using the density scale, the area of a block is equal to the fraction
of data represented by it. We can use this fact to solve for the block
heights.
Example 1
Consider the [170, 180) block on the previous slide.
10 cm
If we label the vertical axis with the density scale, we
can determine that the area of this block is equal to
. What must the height be in this case?
y =?
170
180
The units of y are
.
Now let’s go back and label our vertical axis with the density scale.
6
Creating a Histogram on the Density Scale
Recall the list of heights of people in your hive (in cm) from before:
149, 160, 162, 166, 166, 169, 172, 177, 181, 205
1. Complete the table by
determining the block’s
height using the density
scale:
Bin
Frequency
Fraction
[140, 160)
[160, 170)
[170, 180)
[180, 210)
1
5
2
2
1
10
5
10
2
10
2
10
Block Height
2. Make a histogram (with these bins) on the density scale.
140
150
160
170
180
190
200
210
Height (cm)
7
Larger data sets
So far, the bin widths for our histograms were fairly wide.
When the data set is very large and the bins of data are chosen to be very
narrow then the histogram may look like a smooth curve:
y
Global Income Distribution 2013
Measured in 2013 PPP in USD units
y = p(x)
x
0
2000
4000
6000
8000
10000
12000
Individual yearly income ($)
Poll Question
If you were to label the vertical axis with a density scale, what would the
units be?
A
Dollars
B
People
C
Fraction of population
D Other
8
An Example of a Density Function
If we indeed label the vertical axis with the density scale, this graph represents the graph of the density function for all incomes in 2013.
y
Global Income Distribution 2013
Measured in 2013 PPP in USD units
y = p(x)
x
0
2000
4000
6000
8000
10000
12000
Individual yearly income ($)
Here, y = p(x), where y represents the density (in units
)
at income x in dollars.
9
A Density Function
y
Global Income Distribution 2013
Measured in 2013 PPP in USD units
y = p(x)
x
0
2000
4000
6000
8000
10000
12000
Individual yearly income ($)
Discussion Question
Consider the fraction of incomes between $2000 and $4000.
• How would you use the graph to estimate this fraction?
• Can you think of a way of representing this fraction mathematically?
10
Properties of Density Functions
Definition
A density function p(x) for a variable x is a function such that:
Area under the
Fraction of the
(i) population for which x = graph of p between =
a and b
is between a and b
(ii) p(x) ≥ 0 for all x
Z ∞
(iii)
p(x)dx =
−∞
11
Example: Larval Stage Lengths
fraction of insects
per day of larval stage
The density function p(t) for the
length of the larval stage, in days,
for a certain insect is shown on
the right.
0.15
0.12
0.09
0.06
0.03
4
8
12 16 20
t (days)
Poll Question
(a) Approximately what fraction of these insects’ larval stage is between 10
and 12 days?
A
0.12
B
0.15
C
0.24
D 0.27
(b) Approximately what fraction of these insects’ larval stage is less than 8
days? More than 14 days?
12
Interpreting Density Function Values
fraction of insects
per day of larval stage
The density function p(t) for the
length of the larval stage, in days,
for a certain insect is shown on
the right.
0.15
0.12
0.09
0.06
0.03
4
8
12 16 20
t (days)
Poll Question
In plain language, what does p(10) = 0.12 mean, approximately? Choose the
best answer.
A
12% of insects are in the larval stage for at least 10 days.
B
12% of insects are in the larval stage for at most 10 days.
C
12% of insects are in the larval stage for exactly 10 days.
D 1.2% of insects will be in the larval stage for 10 to 10.1 days.
13
To Do List
To do before next class:
• Re-read section 7.2.
• Finish Homework 19!
• Checkpoint 19C!
• Reminder: Project 3 due next Tuesday.
Return your voting booklets to the front tables!
My drop-in hours are now (in OI 2286).
Have a great day!
14
Preview: Larval Stage Lengths
fraction of insects
per day of larval stage
The density function p(t) for the
length of the larval stage, in days,
for a certain insect is shown on
the right.
0.15
0.12
0.09
0.06
0.03
4
8
12 16 20
t (days)
Let P(t) be the fraction of the insect population whose larval stage (LS)
is less than or equal to t days.
Discussion Question
(a) How can we express P(t) in terms of p(t) mathematically?
(b) Use (a) to estimate the values of P(t) to complete the following table.
LS length t
2
4
6
8
10
12
14
16
18
20
P(t)
15
Preview: Larval Stage Lengths
cumulative distribution P
1
Let P(t) be the fraction of the
insect population whose larval
stage (LS) is less than or equal
to t days.
0.8
0.6
0.4
0.2
0
LS length t
P(t)
2
0.00
4
0.00
6
0.03
8
0.12
0
10
0.30
2
4
6 8 10 12 14 16 18 20
length of larval stage
12
0.55
14
0.79
16
0.94
18
0.99
20
1.00
Poll Question
What proportion of the insects were in larval stage for 10-12 days? How did
you find this using P(t)?
A
0.25
B
0.30
C
0.55
D 0.85
16
Preview: Cumulative distribution functions
Definition
If p is a density function, then
P(t) =
is the cumulative distribution function (or CDF) of p.
17