In the Middle – Weighted Average, Part IV

In previous posts I’ve been having fun showing different conceptions of middle, of weighted average, and how those concepts all hang together.

In this post, we’ll play with a generalization of these ideas into two dimensions.

dataset-7-weighted1

In this picture, we see another line with red endpoints, but this time the line is not horizontal, this time the lime doesn’t line up with the number line.  Instead, the line is above the number line, one endpoint is above 42 and the other endpoint is above 62.  What we’ve done here is show two number lines, one horizontal and one vertical.  Together, they form two coordinate axes, and they give us a cool way – brought to us by Descartes in the seventeenth century – of locating points and shapes by reference to a set of numbers.  The bottom-left red endpoint can be precisely located by quoting two numbers: 42 and 6.  The number 42 is known as the x-coordinate and the number 6 as the y-coordinate; the endpoint is directly above 42 on the x-axis and directly to the right of 6 on the y-axis.  Similarly, the upper-right red endpoint has coordinates 62 and 14.  The notation (42,6) and (62,14) is the standard short-hand notation for this.

Where’s the middle between the two red endpoints?  Of course we could ignore the coordinate axes altogether, and pull out one of our approaches from before: have two people walk towards each other, starting from opposite end points, walking at the same rate.  If the two people had rulers, they could mark off equal distances, in a coordinated way, and get closer and closer together, till the middle was easy to spot.  Really, the only difference between the previous situations and this one is that the line doesn’t have regular blue delineations.

And yet – if we imagine two people walking towards each other from the two red endpoints, it is clear that they would also get closer together in the horizontal direction, and closer together in the vertical direction.  When they meet, they have closed the entire gap in the horizontal direction as well as in the vertical direction.  It is not hard to figure that the place they meet must be halfway in the horizontal direction and halfway in the vertical direction.

The number lines are helpful in figuring out where halfway in the horizontal direction is and where halfway in the vertical direction is.  We can figure these out separately and independently, one on the x-axis and one on the y-axis.  The halfway point on the x-axis is at 52, the halfway point on the y-axis is at 10.  When we look at the point (52, 10) – that is, the point with x-coordinate of 52 and y-coordinate of 10 – we see that this point does indeed lie on the line, and does appear to lie halfway between the endpoints.

What we saw here for ‘middle’ turns out to work just as well for weighted average.  To find the weighted average of the two end points, we can independently figure out the weighted average horizontally and vertically.  If we want to find the point on the line that’s 75% towards the upper right, we can find the number on the horizontal number line that’s 75% from 42 to 62, and then find the number on the vertical number line that’s 75% from 6 to 14.

If we give the upper-right endpoint a weight of w, and the lower-left endpoint a weight of 1-w, we can find the coordinates of the weighted average as follows:

\begin{matrix} x & = & (1-w) \times 42 & + & w \times 62 \\ y & = & (1-w) \times 6 & + & w \times 14 \end{matrix}

This particular way of writing this is known as the parametric equation of a line through two points.  By varying w, we can find the coordinates of all kinds of points on the line.  If we keep w between 0 and 1, we get the line segment; if we allow w outside of 0 to 1, we get the line extended arbitrarily long in both directions.

A fancier way of writing the above equation uses the (x,y) notation for points:

(x,y) = (1-w) \times (42,6) + w \times (62,14)

The equations and the notations are not the thing I want to stress here.  What I want to stress is that you can think of the line as the collection of weighted averages of the two endpoints!  The various equations are just other ways to express that notion.

Advertisements
This entry was posted in Uncategorized and tagged , , , , , . Bookmark the permalink.

One Response to In the Middle – Weighted Average, Part IV

  1. Pingback: In the Middle - the Series « Learning and Unlearning Math

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s