Another frequent ^{ 1 }Awful pun. The two main approaches to statistics are frequentism and Bayesianism; the latter named after Bayes' Theorem which is, in turn, named for Reverand Thomas Bayes. While this (both the approaches to statistics and their history and naming) is a very interesting and quite philosophical topic, it is beyond the scope of this course. The interested reader has plenty of interesting reading here to interest them. application of integration is computing averages and other statistical quantities. We will not spend too much time on this topic — that is best left to a proper course in statistics — however, we will demonstrate the application of integration to the problem of computing averages.

Let us start with the definition ^{ 2 }We are being a little loose here with the distinction between mean and average. To be much more pedantic — the average is the arithmetic mean. Other interesting “means” are the geometric and harmonic means:
\begin{align*}
\text{arithmetic mean} &= \frac{1}{n}\left( y_1 + y_2 + \cdots + y_n \right)\\
\text{geometric mean} &= \left( y_1 \cdot y_2 \cdots y_n \right)^{\frac{1}{n}}\\
\text{harmonic mean} &= \left[\frac{1}{n}\left( \frac{1}{y_1} + \frac{1}{y_2} + \cdots \frac{1}{y_n} \right)\right]^{-1}
\end{align*}
All of these quantities, along with the median and mode, are ways to measure the typical value of a set of numbers. They all have advantages and disadvantages — another interesting topic beyond the scope of this course, but plenty of fodder for the interested reader and their favourite search engine. But let us put pedantry (and beyond-the-scope-of-the-course-reading) aside and just use the terms average and mean interchangably for our purposes here. of the average of a finite set of numbers.

Definition2.2.1

The average (mean) of a set of \(n\) numbers \(y_1\text{,}\) \(y_2\text{,}\) \(\cdots\text{,}\) \(y_n\) is

\begin{gather*}
y_\ave =\bar y = \llt y\rgt =\frac{y_1+y_2+\cdots+y_n}{n}
\end{gather*}

The notations \(y_\ave\text{,}\) \(\bar y\) and \(\llt y\rgt\) are all commonly used to represent the average.

Now suppose that we want to take the average of a function \(f(x)\) with \(x\) running continuously from \(a\) to \(b\text{.}\) How do we even define what that means? A natural approach is to

select, for each natural number \(n\text{,}\) a sample of \(n\text{,}\) more or less uniformly distributed, values of \(x\) between \(a\) and \(b\text{,}\)

take the average of the values of \(f\) at the selected points,

and then take the limit as \(n\) tends to infinity.

Unsurprisingly, this process looks very much like how we computed areas and volumes previously. So let's get to it.

First fix any natural number \(n\text{.}\)

Subdivide the interval \(a\le x\le b\) into \(n\) equal subintervals, each of width \(\De x=\frac{b-a}{n}\text{.}\)

The subinterval number \(i\) runs from \(x_{i-1}\) to \(x_i\) with \(x_i=a+i\frac{b-a}{n}\text{.}\)

Select, for each \(1\le i\le n\text{,}\) one value of \(x\) from subinterval number \(i\) and call it \(x_i^*\text{.}\) So \(x_{i-1}\le x_i^*\le x_i\text{.}\)

The average value of \(f\) at the selected points is
\begin{align*}
\frac{1}{n}\sum_{i=1}^n f(x_i^*)
=&\frac{1}{b-a}\sum_{i=1}^n f(x_i^*) \De x
&\text{since $\De x=\frac{b-a}{n}$}
\end{align*}
giving us a Riemann sum.

Now when we take the limit \(n\rightarrow\infty\) we get exactly \(\frac{1}{b-a}\int_a^b f(x)\dee{x}\text{.}\) That's why we define

Definition2.2.2

Let \(f(x)\) be an integrable function defined on the interval \(a\le x\le b\text{.}\) The average value of \(f\) on that interval is

while the left-hand side can be seen as the area of a rectangle of width \(b-a\) and height \(f_\ave\text{.}\) Since these areas must be the same, we interpret \(f_\ave\) as the height of the rectangle which has the same width and the same area as \(\big\{(x,y)\ \big|\ a\le x\le b,\ 0\le y\le f(x)\ \big\}\text{.}\)

Let us start with a couple of simple examples and then work our way up to harder ones.

Let \(x(t)\) be the position at time \(t\) of a car moving along the \(x\)-axis. The velocity of the car at time \(t\) is the derivative \(v(t)=x'(t)\text{.}\) The average velocity of the car over the time interval \(a\le t\le b\) is

\begin{align*}
v_\ave &= \frac{1}{b-a}\int_a^b v(t)\dee{t}\\
&=\frac{1}{b-a}\int_a^b x'(t)\dee{t}\\
&=\frac{x(b)-x(a)}{b-a} & \text{by the fundamental theorem of calculus.}
\end{align*}

The numerator in this formula is just the displacement (net distance travelled — if \(x'(t)\ge 0\text{,}\) it's the distance travelled) between time \(a\) and time \(b\) and the denominator is just the time it took.

Notice that this is exactly the formula we used way back at the start of your differential calculus class to help introduce the idea of the derivative. Of course this is a very circuitous way to get to this formula — but it is reassuring that we get the same answer.

When you plug a light bulb into a socket ^{ 3 }A normal household socket delivers alternating current, rather than the direct current USB supplies. At the risk of yet another “the interested reader” suggestion — the how and why household plugs supply AC current is another worthwhile and interesting digression from studying integration. The interested reader should look up the “War of Currents”. The diligent and interested reader should bookmark this, finish the section and come back to it later. and turn it on, it is subjected to a voltage

\(\omega=2\pi\times 60\) (which corresponds to \(60\) cycles per second ^{ 4 }Some countries supply power at 50 cycles per second. Japan actually supplies both — 50 cycles in the east of the country and 60 in the west.) and

the constant \(\delta\) is an (unimportant) phase. It just shifts the time at which the voltage is zero

The voltage \(V_0\) is the “peak voltage” — the maximum value the voltage takes over time. More typically we quote the “root mean square” voltage ^{ 5 }This example was written in North America where the standard voltage supplied to homes is 120 volts. Most of the rest of the world supplies homes with 240 volts. The main reason for this difference is the development of the light bulb. The USA electrified earlier when the best voltage for bulb technology was 110 volts. As time went on, bulb technology improved and countries that electrified later took advantage of this (and the cheaper transmission costs that come with higher voltage) and standardised at 240 volts. So many digressions in this section! (or RMS-voltage). In this example we explain the difference, but to simplify the calculations, let us simplify the voltage function and just use

\begin{align*}
V(t) &= V_0 \sin(t)
\end{align*}

Since the voltage is a sine-function, it takes both positive and negative values. If we take its simple average over 1 period then we get

This is clearly not a good indication of the typical voltage.

What we actually want here is a measure of how far the voltage is from zero. Now we could do this by taking the average of \(|V(t)|\text{,}\) but this is a little harder to work with. Instead we take the average of the square ^{ 6 }For a finite set of numbers one can compute the “quadratic mean” which is another way to generalise the notion of the average:
\begin{equation*}
\text{quadratic mean}
= \sqrt{\frac{1}{n}\left(y_1^2 + y_2^2 + \cdots + y_n^2 \right) }
\end{equation*}
of the voltage (so it is always positive) and then take the square root at the end. That is

Though we do know how to integrate sine and cosine, we don't (yet) know how to integrate their squares. A quick look at double-angle formulas ^{ 7 }A quick glance at Appendix A.14 will refresh your memory. gives us a way to eliminate the square:

the constant \(\delta\) is an (unimportant) phase.

If the light bulb is “100 watts”, then what is its resistance?

To answer this question we need the following facts from physics.

If the light bulb has resistance \(R\) ohms, this causes, by Ohm's law, a current of
\begin{align*}
I(t) &= \frac{1}{R} V(t) &
\end{align*}
(amps) to flow through the light bulb.

The current \(I\) is the number of units of charge moving through the bulb per unit time.

The voltage is the energy required to move one unit of charge through the bulb.

The power is the energy used by the bulb per unit time and is measured in watts.

So the power is the product of the current times the voltage and, so

In the limit as the length of the time interval \(b-a\) tends to infinity, this converges to \(\frac{V_0^2}{2R}\text{.}\) The resistance \(R\) of a “100 watt bulb” obeys

If we translate the peak voltage to the root mean square voltage using
\begin{align*}
V_0 &= V_\mathrm{rms} \cdot \sqrt{2}
\end{align*}
then we have
\begin{align*}
P &= \frac{V^2_{\mathrm{rms}}}{R}
\end{align*}

If we were using direct voltage rather than alternating current then the computation is much simpler. The voltage and current are constants, so
\begin{align*}
P &= V \cdot I & \text{but $I = V/R$ by Ohm's law} \\
&= \frac{V^2}{R}
\end{align*}
So if we have a direct current giving voltage equal to the root mean square voltage, then we would expend the same power.