Learning Objectives
By the end of this section, you will be able to:
- Define the average value of a continuous function over an interval
- Calculate average values using the definite integral formula
- Interpret the average value geometrically as the height of an equal-area rectangle
- State and apply the Mean Value Theorem for Integrals
- Connect average value to expected value in probability and machine learning
- Solve real-world problems involving average quantities
The Big Picture: From Sums to Integrals
"The average value of a continuous function is the natural extension of the arithmetic mean to the world of infinitely many values."
We all know how to find the average of a finite set of numbers: add them up and divide by how many there are. But what if you have infinitely many values? What is the "average height" of a curve?
This section answers that question using the definite integral. The average value of a function is one of the most intuitive applications of integration — it tells us what single constant value would give the same "total effect" as the varying function over an interval.
Why Average Value Matters
Average value appears everywhere: the average temperature over a day, the average velocity of a moving object, the average power consumption of a device, the expected value in probability theory, and the mean loss in machine learning. Understanding this concept unlocks a powerful way to summarize continuous data.
Historical Context: Measuring the Unmeasurable
The problem of finding average values of continuously varying quantities puzzled mathematicians and scientists for centuries. Before calculus, there was no systematic way to answer questions like:
- What is the average height of a parabolic arch?
- What is the average speed of an accelerating object?
- What is the average value of a sine wave?
Ancient mathematicians like Archimedes could compute areas under curves using exhaustion methods, but the connection to "average height" wasn't explicitly formalized until the development of calculus in the 17th century.
The Key Insight
The breakthrough came from recognizing that if the area under a curve equals the area of a rectangle with the same base, then the rectangle's height must be the "average height" of the curve.
The Core Idea
If we can find the height such that the rectangle with this height has the same area as the region under the curve, then is the average value of .
From Discrete to Continuous Averages
The Discrete Case: Arithmetic Mean
For a finite set of values , the average is:
This is sum divided by count — the total divided by how many.
Sampling a Continuous Function
Now consider a continuous function on an interval . If we sample equally-spaced points:
The sample average of at these points is:
Taking the Limit
Rewriting this sum:
As , this Riemann sum becomes a definite integral:
The Continuous Average
The Pattern
Notice the structure: sum → integral, and count → interval length. The integral is a "continuous sum," and the interval length plays the role of "how many."
The Average Value Formula
Definition: Average Value of a Function
If is integrable on , the average value of on is:
Understanding Each Part
- : The total accumulation (signed area under the curve)
- : The length of the interval (like the count in discrete averages)
- : The height of a rectangle with the same area as the region under
Geometric Interpretation
The signed area between the curve and the x-axis from to .
A rectangle with base and height has the same area.
Why 'Average'?
The average value is the height at which a horizontal line would "balance" the function — if you could pour the area under the curve into a rectangle, would be its height.
Interactive: Average Value Explorer
Explore how the average value relates to the area under different functions. Notice how the rectangle with height always has the same area as the region under the curve:
The Mean Value Theorem for Integrals
The average value formula raises a natural question: is there a point in where the function actually attains its average value? The answer is yes, for continuous functions.
Mean Value Theorem for Integrals
If is continuous on , then there exists a point such that:
Equivalently:
Why This Theorem Is True
By the Extreme Value Theorem, a continuous function on a closed interval attains its minimum and maximum . The average value must lie between these:
By the Intermediate Value Theorem, since is continuous and takes values and , it must take every value in between — including . Therefore, there exists where .
Geometric Meaning
The MVT for Integrals guarantees that somewhere on the interval, the curve crosses the horizontal line at height . At that point , the function value equals the average value.
Interactive: MVT for Integrals
Explore how the Mean Value Theorem for Integrals works. For any continuous function, there's always a point where the function equals its average:
Worked Examples
Example 1: Polynomial Function
Problem: Find the average value of on .
Solution:
Step 1: Apply the average value formula:
Step 2: Evaluate the integral using FTC Part 2:
Step 3: Divide by the interval length:
Check with MVT: Where does ? At , which is in . ✓
Example 2: Trigonometric Function
Problem: Find the average value of on .
Solution:
Evaluate the integral:
Physical meaning: The average height of one complete arch of the sine function is about 64% of its maximum height.
Example 3: Exponential Function
Problem: Find the average value of on .
Solution:
Note: For an exponential, the average is closer to the larger end because exponentials grow rapidly.
Example 4: Finding Where f(c) = f_avg
Problem: For on , find the value where .
Solution:
Step 1: Find the average value:
Step 2: Solve :
Real-World Applications
Physics: Average Velocity
Problem: An object's velocity is m/s for seconds. Find the average velocity.
Solution:
Note: Average velocity also equals total displacement divided by time: if , then .
Engineering: Average Temperature
Problem: The temperature in a room over a 12-hour period follows °C, where is hours. Find the average temperature.
Solution:
Economics: Average Cost
Problem: The marginal cost of production is dollars per unit for quantities . Find the average marginal cost.
Solution:
This tells us the "typical" cost per additional unit over the production range.
Interactive: Applications Demo
Explore average value in different real-world contexts:
An object accelerates with velocity v(t) = at² + v₀. Find the average velocity over the time interval.
Machine Learning Connection: Expected Value
The average value of a function is intimately connected to one of the most fundamental concepts in probability and machine learning: expected value.
Expected Value as a Weighted Average
For a continuous random variable with probability density function (PDF) , the expected value is:
This is precisely an average value — but instead of dividing by the interval length, we weight each value by its probability density .
The Deep Connection
In probability, the PDF integrates to 1 over its entire domain. So expected value is a weighted average where the weights are probabilities. The average value formula is the special case where all -values are weighted equally (uniform distribution).
Expected Loss in Machine Learning
In ML, we often minimize expected loss:
This is the average value of the loss function weighted by the data distribution .
Why Sample Mean Works
In practice, we approximate expected values with sample means:
This is exactly the discrete average! The Law of Large Numbers guarantees that as , the sample mean converges to the true expected value.
| Concept | Discrete Version | Continuous Version |
|---|---|---|
| Average/Mean | (1/n) Σᵢ xᵢ | (1/(b-a)) ∫ₐᵇ f(x) dx |
| Expected Value | Σᵢ xᵢ · P(X=xᵢ) | ∫ x · f(x) dx |
| Expected Loss | (1/n) Σᵢ ℓ(θ, xᵢ) | ∫ ℓ(θ, x) · p(x) dx |
Root Mean Square (RMS) in Signals
In signal processing, we often use the RMS value:
This is the square root of the average value of . For a sine wave , the RMS is . This is why household AC voltage labeled "120V" is actually referring to the RMS value.
Python Implementation
Computing Average Values
The following code demonstrates how to compute average values using numerical integration:
Machine Learning Connections
See how average value connects to expected value and loss functions:
Common Mistakes to Avoid
Mistake 1: Averaging endpoints instead of integrating
Wrong:
Correct:
The endpoint average only works for linear functions! For curves, you must integrate.
Mistake 2: Forgetting the 1/(b-a) factor
Wrong:
Correct: The integral gives the total (area), not the average. You must divide by the interval length to get the average.
Mistake 3: Confusing average value with maximum/minimum
The average value is typically between the minimum and maximum values, but it's usually not equal to either. For non-constant functions, .
Mistake 4: Using the wrong interval in applications
Make sure you're averaging over the correct interval. The average temperature "during the day" should use the daytime interval, not a full 24-hour period.
Mistake 5: Ignoring signs for signed area
If for part of the interval, that region contributes negatively to the average. The average of sin(x) over is 0, not !
Test Your Understanding
Summary
The average value of a function extends the familiar concept of arithmetic mean to continuous functions using the definite integral.
The Central Formula
Average Value = Total Accumulation ÷ Interval Length
Key Results
| Concept | Formula | Meaning |
|---|---|---|
| Average Value | f_avg = (1/(b-a)) ∫ₐᵇ f(x) dx | Height of equal-area rectangle |
| MVT for Integrals | ∃c: f(c) = f_avg | Continuous functions attain their average |
| Expected Value | E[X] = ∫ x·f(x) dx | Probability-weighted average |
| RMS Value | f_rms = √((1/(b-a)) ∫ₐᵇ f² dx) | Square root of average of squares |
Key Takeaways
- Average value generalizes arithmetic mean — from finitely many values to infinitely many (continuous) values
- The average value is the height of a rectangle with the same area as the region under the curve
- MVT for Integrals guarantees that continuous functions actually achieve their average value somewhere
- Expected value in probability is a probability-weighted version of average value
- Don't confuse average value with the average of endpoints — you must integrate!
- Applications include average temperature, velocity, power, cost, and many quantities in science and engineering
Coming Next: In the next section, we'll explore Numerical Integration: Trapezoidal Rule — methods for approximating definite integrals when antiderivatives are difficult or impossible to find.