Professional Documents
Culture Documents
Let N be the size of the class, and yk the grade of student k. Here k is the number of the student
from 1 to N, and yk takes any value between 0 and 40 points). Then the average grade Ȳ is
computed by adding up the scores of all students and dividing by the number of students as follows:
N
1 X
Ȳ = yk
N
k=1
(If we do this we get 26 for class 1 and 27 for class 2 out of 40 points.)
We might notice that some students got exactly the same grade. For example, there might be 3
students in the class who got 21/40 points. We could count up how many students got the same
grade xi , and call that number of students pi . The fraction of the class that scored grade xi is then
pi
.
N
These definitions suggest a slightly modified way of computing the average grade. Now we are
summing up how many students got each grade from 0 to 40, so our total is:
40
1 X
X̄ = xi pi .
N i=0
Of course, this should lead to the same result (X̄ = Ȳ )! We are just grouping the numbers in a
different way in our summation: not adding one student’s grade at a time, but rather adding the
number of students getting each grade value. This version is illuminating, because it generalizes to
many similar ideas that we will encounter in forming a mean or average (or, what turns out to be
equivalent, a center of mass.) We can rewrite the same average in the clearly related form:
40
X pi
X̄ = xi .
i=0
N
25.0 25.0
Class 2 grade distribution Class 2 grade distribution
mean mean
0.0
28.5 0.0
28.9
0.0 40.0 0.0 40.0
A plot of pi against x̃i is called a frequency distribution. There are several ways of plotting such
a distribution. We might draw a bar graph as shown in Figure 7.1, where the results of the two
sections are compared. Columns 1 and 2 of the table below list the values for the distribution of
grades in class 1.
If the class consists of a total of N students, then it follows that
10
X
N= pi .
i=1
This is just saying that the sum of the number of students in every one of the categories has to add
up to the total class size.
We can use our frequency distributions to compare the performance of the two classes. One
way of doing this is to compare the numbers of students in each grade category. For example, we
might notice that more students in class 2 achieved the highest grades, or that the distribution in
class 1 is broader, meaning that the range of abilities of the students is more varied in that class,
with more students on the low end of the distribution. We could also say that both classes appear
to consist of two distinct groups; this is shown by the two peaks in each case, though the trend is
more pronounced in class 2.
The frequency distribution can also be used to compute an average value: each (approximate) grade
value x̃i is achieved by pi students, which is a fraction (pi /N) of the whole class. When we form
the multiple (pi /N)x̃i , we assign a “weight” to each of the categories according to the proportion
of the class that was in that category. (The terminology weighted average is sometimes used.)
We define the mean or average grade in the distribution by (M is the number of bins)
M
X pi
x̄ = x̃i .
i=1
N
M PM
1 X x̃i pi
x̄ = x̃i pi = Pi=1
M
N i=1 i=1 pi
The sum in the denominator of this last fraction is simply the total class size since
M
X
N= pi .
i=1
We have written this expression above so that later similar expressions will look familiar.
In the table, we show steps in the calculation of the mean grade for class 1. A similar calculation
was done for class 2. The two results are shown on the graphs in Figure 7.2. We observe that the
mean grade in section 1 is 27.25 and in section 2 it is 28.9, suggesting that “on average”, the students
did a little better in the second class, or that section 2 has slightly stronger students.
P P P
i grade x̃i number pi pi x̃i pi (1/N) x̃i pi
0 0 0 0 0.0 0.0
1 4 0 0 0.0 0.0
2 8 0 0 0.0 0.0
3 12 1 1 12 0.125
4 16 6 7 108 1.125
5 20 14 21 388 4.04
6 24 20 41 868 9.04
7 28 20 61 1428 14.87
8 32 21 82 2100 21.87
9 36 11 93 2496 26
10 40 3 96 2616 27.25
There are other ways of describing the performance of the class. For example, we could calculate a
“running total” as shown on figure 7.3, where we plot for each grade category, the total number of
students whose grade was somewhere below that level.
0.0 0.0
0.0 40.0 0.0 40.0
Figure 7.2: Same as in Figure 7.1, but showing the superimposed cumulative distributions.
i
X
Fi = pk .
k=1
Of course, when we add up all the way to the last category, we arrive at the total number of
students in the class (assuming each student wrote the test and received a grade). Thus
m
X
Fm = pk = N.
k=1
(That’s because each student has been counted in one of the categories corresponding to the grade
he or she achieved.) Another way of saying the same thing is that
m
X pk
= 1.
N
k=1
We can use the cumulative distribution and its features to come up with new ways of summarizing
the distribution or comparing the performance of two sections. Suppose we subdivide a given class
into exactly two equal groups: the “top students”, and the “weaker” students. Then there would
100.0 100.0
50% 50%
50% 50%
median median
0.0 0.0
0.0 40.0 0.0 40.0
Figure 7.3: The cumulative distributions are used to determine a median grade for each section.
be some grade that was achieved (or surpassed) by the top half of the class, but not by the weaker
half. We call that grade the median of the distribution.
It is easy to find that median grade using a cumulative distribution. We must ask what grade
level was attained precisely by 50% of the class. To determine that level, we draw a horizontal line
corresponding to N/2 and read off the grade that corresponds to this value on the graph of F . In
section 1 the median is 25.5 whereas in section 2 it is 27. We observe that the median is not equal
to the mean computed earlier. However, at least in this example, the trend is conserved, i.e. section
2 shows a better performance on the test than section 1.
In Figure 7.4 we see a number of beads, i = 1 . . . n (there are five beads so that n = 5) distributed
along a thin wire. Each bead has a certain position (that we will think of as the value of xi ) and a
mass that we will call pi . We will think of this arrangement as a discrete mass distribution: both
the masses of the beads, and their positions are of interest to us. We would like to describe some
properties of this distribution so that we can compare two different arrangements, for example.
p p2 p p5
1 4
x x2 x 4 x 5
1
Figure 7.4: This picture is meant to represent a discrete distribution of masses along a (one dimen-
sional) wire. We later compare this to a continuous mass distribution in 1D.
(Remark: This example will be similar to the one we discussed in the previous section: instead of
“bins” we have “beads”. Instead of test scores we have positions, and instead of number of student
scores in each bin we have the mass of each bead.)
The total mass of the beads, M, is just the sum of the individual masses, so that
n
X
M= pi .
i=1
We might also say that when we add up the fraction of the total mass represented by each bead
over all the beads, we get 1, i.e.
n
X pi
=1
i=1
M
We might also be interested in the “center of mass” of the distribution, which is, simply put,
the average x coordinate. We form this average as before:
1
x̄ = (p1 x1 + p2 x2 + . . . p5 x5 )
M
Then, in general (for arbitrary n), we define the center of mass of the distribution as follows:
n
1 X
x̄ = xi pi .
M i=1
It is no coincidence that this “average x value” is identical in calculation to the mean or average
grade we discussed in the previous section! The concepts are, in fact identical, provided we make
the correspondence between grades and placements, number of students and bead mass described
above.
Now suppose that we have a continuous mass distribution, i.e. a changing density. For example,
the bar in Figure 7.5 has a density that varies along its length. The portion at the left is made of
lighter material, or has a lower density than the portions further to the right. (The density of the
material along the length of the bar is shown in the graph.) How would we find the total mass and
the center of mass?
We are already familiar with the first part of the question, since we have dealt with densities in
a previous chapter: Let us imagine dividing up the bar into small pieces of length ∆x as shown in
Figure 7.5. The coordinates of the endpoints of those pieces are then
xk = k∆x
and the corresponding masses of each of the pieces are approximately
pi = p(xi )∆x.
The total mass is then a sum of masses of all the pieces, and, as we have seen in an earlier chapter,
this sum will approach the integral Z L
M= p(x)dx
0
as we make the size of the pieces smaller.
We can also define a center of mass for the continuous mass density. By analogy, we get
n
1 X
x̄ = xi p(xi )∆x.
M i=1
As ∆x → dx, this becomes an integral.
L
1
Z
x̄ = xp(x)dx .
M 0
7.3.5 Example
∆x
mass distribution
p(x) p p p 3 ... p
1 2 n
x x x ... xn
x 1 2 3
Figure 7.5: Left: Continuous mass distribution in Example 7.3.5. Right: the discretized approxi-
mation of this same distribution. The finite sums applicable to discrete distributions will become
integrals when the size, ∆x, of the pieces shrinks to zero.
A long thin bar of length L is made of material whose density varies along the length of the bar.
Let x be distance from one end of the bar. Suppose that the mass density is given by
ρ(x) = ax 0 ≤ x ≤ L
Solution
¿From our previous discussions in a preceding chapter, we may remember that the total mass of
the bar is Z L L
ax2 aL2
M= ax dx = =
0 2 0 2
Solution
The average mass density along the bar is computed just as one would compute the average value
of a function: integrate the function over an interval and divide by the length of the interval. Thus
1 L aL
Z
ρ̄ = ρ(x) dx =
L 0 2
where we have used part (a) for the integral.
(c) Find the center of mass of the bar.
Solution
2a L3 2
x̄ = = L
aL 3
2 3
(d) Where along the length of the bar should you cut to get two pieces of equal mass?
Solution
1 2 1
as = a(L2 − s2 ),
2 2
as = aL2 − as2 ,
2
2as2 = aL2 ,
√
1 2
s= √ L= L.
2 2
√
Thus, the bar should be cut at x = ( 2/2)L.
Remark: the position that subdivides the mass into two equal pieces is analogous to the grade
that subdivides a class into “top” and “other” students. In other words, this is example is related
conceptually to the idea of a median.
Notice that both the mass and the position of each child is important - a light child sitting on the
very edge of the teeter totter can balance a heavier child sitting closer to the fulcrum (middle). The
center of mass need not be the same as the median position. (However, for symmetric distributions,
the median and the mean are the same.)
m 1 m 2 m 3
x x x x 3
1 2
Figure 7.6: The center of mass of a distribution is the position on which the given mass distribution
would balance.
In physics, we speak of the “moment of mass” of a distribution about a point. This quantity is
related to the tendency of the mass to contribute a torque, i.e. to make the object rotate. Suppose
we are interested in a particular point of reference x. The moment of mass of each of the beads
relative to point x is given by the product of the mass and its distance away from the point - as
with the teeter totter, beads farther away will contribute more torque than beads closer to point x,
and heavier beads (i.e. greater mass) will contribute more torque than lighter beads. For example,
mass 1 contributes an amount m1 (x − x1 ) to the total moment of mass of the distribution about
the point x. Altogether the moment of mass of the distribution about the point x is defined as
n
X
M1 (x) = mi (x − xi ).
i=1
The center of mass is a special point x̄ such that the moment of mass about that point is zero.
(Loosely speaking the tendency to rotate to the left or the right are the same: thus the distribution
would be balanced if it “rested on that point”.)
Thus, we identify the center of mass as the point at which
M1 (x̄) = 0
or
n
X
mi (x̄ − xi ) = 0.
i=1
n
X n
X
x̄ mi − ( mi xi ) = 0.
i=1 i=1
But we already know that the first summation above is just the total mass, so that
n
X
x̄M − ( mi xi ) = 0,
i=1
so, taking the second term to the other side and dividing by M leads to
n
1 X
x̄ = mi xi .
M i=1
We have recovered precisely the definition of the center of mass or “average x coordinate”.
Example
A semicircle shape of uniform thickness, shown in Figure 7.7, is balanced along its horizontal edge.
Find the coordinate c̄ at which the shape balances.
y
y= 9 − x 2
Solution
The semicircle is one quarter of a circle of radius 3. Its edge is described by the equation
√
y = f (x) = 9 − x2 .
The mass of this shape is “distributed” along the x axis precisely as if it were a 1 dimensional
rod whose density varies with position according to the function f : i.e. if we cut the shape at
increments of ∆x along the x axis, we get a collection of pieces whose mass is each proportional to
f (x)∆x. The total mass of the shape is thus
Z 3 Z 3 √
M= f (x) dx = 9 − x2 dx
0 0
Let u = 9−x . Then du = −2x dx. The endpoints are converted as follows: x = 0 ⇒ u = 9−02 = 9
2
We can similarly find the y coordinate of the center of mass: To do so, we would express the
boundary of the shape in the form x = f (y) and integrate to find
Z 3
ȳ = yf (y) dy.
0
p
For the semicircle, y 2 + x2 = 9 so x = f (y) = 9 − y 2 . Thus
Z 3 p
ȳ = y 9 − y 2 dy.
0
This integral looks identical to the one we wrote down for x̄. Thus, based on this similarity (or
based on the symmetry of the problem we will find that
4
ȳ = .
π