Here is an example of an average calculus problem suggested by David Yu of Fort Collins, Colorado. Suppose that two numbers are chosen at random between 0 and 1. How far apart do we expect these two numbers to be?
The first step is to try to understand the problem, perhaps by drawing some pictures. Here is a picture of 10 pairs of randomly chosen numbers between 0 and 1. The random numbers are endpoints of the line segments.
Think about the problem and try to solve it. At least determine what a reasonable answer might be. Here is a very naïve approach: If the first number is or , then the
average for the second number should be about , so the distance between
the two numbers should be about . On the other hand, if the first
number is , then the second number is either between and , or
between and . In either case, the average distance between the two
numbers should be about . So the answer to the initial problem must be
between and . The Farey mean
provides a reasonable guess for the average distance between two numbers chosen at random.
The next step might be to do some experiments using random numbers. Pick two
numbers between and and compute the distance between them. Repeat
this times and add together all of the distances. Divide by and get as an estimate for the average distance
between two numbers . Repeat this process times. Here are the results:
, , , ,
, , , ,
If these numbers acted like complete strangers, that would cause doubts.
However, these number are quite compatible. They all look like close friends
of our original guess .
Now use some calculus and see if stands up as a likely solution. Let be the length of an interval that represents the distance between two
points. Then the larger endpoint can be chosen anywhere in a interval of
length . The probability of picking a line segment of length should
be proportional to . The integral
represents the sum of the possible lengths together with the frequency
with which each such length occurs. The frequency with which all possible
lengths occur is given by the integral .
In the discrete case, an average of numbers , , , is given by the quotient
The calculus equivalent uses the quotient
where the numerator represents of sum of all possible lengths together with
their frequencies and the denominator represents the sum of the frequencies.
Alternatively, assume that and are the endpoints of an interval
inside the unit interval. Then is the distance
between the two endpoints. The average distance between the points and in the unit interval is given by
since the integral in the denominator is equal to . The absolute value
can be eliminated by decomposing the unit square into two disjoint
triangular regions and rewriting the integral as a sum
By this time, confidence in the answer should be running high.