14 Further Integration Techniques and Applications of the Integral Copyright © Cengage Learning. All rights reserved. 14.3 Averages and Moving Averages Copyright © Cengage Learning. All rights reserved. Averages 3 Averages To find the average of, say, 20 numbers, we simply add them up and divide by 20. More generally, if we want to find the average, or mean, of the n numbers y1, y2, y3, . . . yn, we add them up and divide by n. We write this average as (“y-bar”). Average, or Mean, of a Collection of Values Quick Example The average of {0, 2, –1, 5} is 4 Example 1 – Average Speed Over the course of 2 hours, my speed varied from 50 miles per hour to 60 miles per hour, following the function v(t) = 50 + 2.5t 2, 0 ≤ t ≤ 2. What was my average speed over those two hours? Solution: Recall that average speed is simply the total distance traveled divided by the time it took. Recall, also, that we can find the distance traveled by integrating the speed: Distance traveled 5 Example 1 – Solution cont’d It took 2 hours to travel this distance, so the average speed was 6 Example 1 – Solution cont’d In general, if we travel with velocity v(t) from time t = a to time t = b, we will travel a distance of in time b – a, which gives an average velocity of 7 Averages Average Value of a Function The average, or mean, of a function f(x) on an interval [a, b] is Quick Example The average of f(x) = x on [1, 5] is 8 Interpreting the Average of a Function Geometrically 9 Interpreting the Average of a Function Geometrically The average of a function has a geometric interpretation. We can compare the graph of y = f(x) with the graph of y = 3, both over the interval [1, 5] (Figure 8). We can find the area under the graph of f(x) = x by geometry or by calculus; it is 12. The area in the rectangle under y = 3 is also 12. Figure 8 10 Interpreting the Average of a Function Geometrically In general, the average of a positive function over the interval [a, b] gives the height of the rectangle over the interval [a, b] that has the same area as the area under the graph of f(x) as illustrated in Figure 9. The equality of these areas follows from the equation Figure 9 11 Example 2 – Average Balance A savings account at the People’s Credit Union pays 3% interest, compounded continuously, and at the end of the year you get a bonus of 1% of the average balance in the account during the year. If you deposit $10,000 at the beginning of the year, how much interest and how large a bonus will you get? 12 Example 2 – Solution We can use the continuous compound interest formula to calculate the amount of money you have in the account at time t: A(t) = 10,000e 0.03t where t is measured in years. At the end of 1 year, the account will have A(1) = $10,304.55 so you will have earned $304.55 interest. 13 Example 2 – Solution cont’d To compute the bonus, we need to find the average amount in the account, which is the average of A(t) over the interval [0, 1]. Thus, The bonus is 1% of this, or $101.52. 14 Moving Averages 15 Moving Averages Suppose you follow the performance of a company’s stock by recording the daily closing prices. The graph of these prices may seem jagged or “jittery” due to random day-to-day fluctuations. To see any trends, you would like a way to “smooth out” these data. The moving average is one common way to do that. 16 Example 3 – Stock Prices The following table shows Colossal Conglomerate’s closing stock prices for 20 consecutive trading days. Plot these prices and the 5-day moving average. 17 Example 3 – Solution The 5-day moving average is the average of each day’s price together with the prices of the preceding 4 days. We can compute the 5-day moving averages starting on the fifth day. We get these numbers: 18 Example 3 – Solution cont’d The closing stock prices and moving averages are plotted in Figure 10. Figure 10 As you can see, the moving average is less volatile than the closing price. 19 Example 3 – Solution cont’d Because the moving average incorporates the stock’s performance over 5 days at a time, a single day’s fluctuation is smoothed out. Look at day 9 in particular. The moving average also tends to lag behind the actual performance because it takes past history into account. Look at the downturns at days 6 and 18 in particular. 20 Moving Averages The period of 5 days for a moving average, as used in Example 3, is arbitrary. Using a longer period of time would smooth the data more but increase the lag. For data used as economic indicators, such as housing prices or retail sales, it is common to compute the 4-quarter moving average to smooth out seasonal variations. It is also sometimes useful to compute moving averages of continuous functions. 21 Moving Averages We may want to do this if we use a mathematical model of a large collection of data. Also, some physical systems have the effect of converting an input function (an electrical signal, for example) into its moving average. By an n-unit moving average of a function f(x) we mean the function for which is the average of the value of f(x) on [x – n, x]. 22 Moving Averages Using the formula for the average of a function, we get the following formula. n-Unit Moving Average of a Function The n-unit moving average of a function f is 23 Moving Averages Quick Example The 2-unit moving average of f(x) = x2 is The graphs of f(x) and are shown in Figure 11. Figure 11 24