In this quiz, we’ll take a look at how Riemann sums naturally appear in a variety of problems. Let’s start by working with the average value of a function.
Let be the following piecewise function:
What is the average value of over the interval ?
Let , meaning the largest integer not exceeding . For example, , and . What is the average value of on the interval
We’ve now seen that calculating the average value of step functions (piecewise functions where each segment maps to a constant) is relatively straightforward. We multiply the value of on each segment by the length of the segment, sum the results, and at the end divide by the length of the entire interval. (Sound familiar yet?)
To calculate the average value of more general functions, like we approximate the function using a step function and calculate its average value. This is done as follows:
This gives the desired step function. For example, if on the interval and we use , we do the following steps:
So our function is
Suppose on . Approximating by splitting into 3 intervals i.e. what is the average value of
Now let’s look at the general case. Let be any function on the interval . If we approximate by splitting into intervals, what is the average value of in terms of and
Remember from the previous quiz that
So the average value of a function can be approximated by Riemann sums, just like distance. Let's see this again in a totally different area: continuous probability!
Let’s start with the discrete case: a group of people were asked to rate a product on a scale of 1-9 and gave the responses shown in the following bar chart:
What portion of people gave a rating between 4 and 6 inclusive?
A group of people were given a task to solve and their times were recorded (perfectly accurately). Suppose we wanted to know how many people took 4 seconds on the task.
Because the times are recorded perfectly accurately, it’s almost certainly true that nobody took exactly 4 seconds, but this isn’t a very useful answer. Instead, it is more useful to consider a small interval around 4 seconds, as we would in real life (e.g. if someone completed a task in 4.001 seconds, we’d forgive them for saying it took them 4 seconds!).
Suppose that 2% of people complete the task between 4 and 4.1 seconds. Approximately what proportion of people are likely to complete the task between 4 and 4.01 seconds? Assume a uniform distribution.
Suppose is a function so that represents the proportion of people completing a task between and seconds as goes to 0. In terms of , what proportion of people solved the task between 4 and 6 seconds inclusive?
Remember from the previous quiz that
We’ve now seen how Riemann sums appear in multiple apparently unrelated ways: distance traveled, average value of functions, and continuous probability. Each situation was different, but we approached it in a similar way: take the interval, chop it up into pieces, multiply the function times the length of each piece, add them all up, and finally take a limit as the number of pieces approaches infinity. In other words, we turned each problem into calculating the limit of a Riemann sum.
Clearly, Riemann sums are important! In the next quizzes, we'll define the integral as the limit of Riemann sums, see the connection with area, and begin to investigate how to actually calculate them. (This is calculus, after all!)