\chapter{Power Functions as Models}

\specialsection{Introduction}
In the two previous chapters we have studied using linear and exponential functions
as models.  In this chapter we turn to another type of model based on \emph{power functions},
or functions of the form
\begin{equation}
\label{eq:PowerLaw}
\framebox{$y = \beta \cdot x^\alpha$,}
\end{equation}
where $x$ is the independent variable, $y$ is the dependent variable, and $\alpha$ and
$\beta$ are constants.
These are used quite commonly in biology, ecology, and other scientific areas, both as theoretical models 
and as tools to analyze experimental data.  We will introduce the idea with the following
example.

\begin{example}
Consider the question of how many individuals of a given animal species can coexist in some
fixed environment, say a fixed area, and how that might depend on the typical
body sizes of the animals.   Clearly, the larger the animals' bodies are, the smaller 
the number the area can support should be.  But can we say more?

The individual animals will have some
average resource use rate per unit time, $R$, while the environment will produce those
resources at some rate  per unit area per unit time, $P$.  For instance, if the species is herbivorous,
the $R$ would represent how much plant biomass an individual consumes per unit
time, while $P$ would represent the rate of production of that plant biomass per unit time by
the environment. 
Similarly, if the species is carnivorous  and predatory, $R$ would represent how much animal biomass an
individual consumes per unit time, while $P$ would represent the rate of production of 
the prey species the predators consume for food per unit area per unit time.  
In either case, the \emph{maximum number of individuals} that could be supported,
which we will denote by $N$, would be proportional to the ratio between the  resource productivity
of the environment and the individual resource use:
\begin{equation}
\label{eq:Carrying}
N = C \cdot \frac{P}{R},
\end{equation}
where $C$ is some constant.  

It is clear that $R$, the average resource use rate for the individual animals, is
correlated with their average body mass, since larger bodies require more food intake
to maintain their metabolisms.  By examining this relationship, biologists
have noted the empirical observation that $R$ tends to be proportional to 
the body mass $M$ raised to the $3/4$ power:
\begin{equation}
\label{eq:RateMass}
R = C_0 \cdot M^{3/4}
\end{equation}
for some constant $C_0$.
A closely related statement is known as \emph{Kleiber's Law} -- the metabolic rate in animal
bodies should follow a power law with 
$${\rm metabolic\ rate} = C \cdot M^{3/4}.$$
We will examine a real-world data set that is related to this pattern later in 
the chapter.  For now, note that we have an example of a power function
as in Equation~\eqref{eq:PowerLaw} with $\alpha = 3/4$.
This says, in particular, that the resource use rate does not increase \emph{linearly}
with $M$, but somewhat less than linearly.

If we substitute for $R$ from Equation~\eqref{eq:RateMass} into Equation~\ref{eq:Carrying}, 
then we see
$$N = \frac{C}{C_0}\cdot M^{-3/4},$$
which expresses the maximum sustainable population $N$ as another power function
of the body mass $M$.  Note that this one has exponent $\alpha = -3/4 < 0$.
This indicates that $N$ should decrease as $M$ increases, as is only reasonable
from our intuition about the real world situation.   But note that
it gives a much more precise mathematical model describing a theory about
how the relation between body size
and sustainable population should work!  With experimental data we could then
either find evidence to support the theory or perhaps indicate that it needs
revision or modification.
 $\triangle$
\end{example}

In this chapter, we will consider power functions in general first, then look at
their use in modeling.  We will introduce some techniques for fitting power
law models to data and consider a number of examples.

\specialsection{Power Functions}
Power functions are those given by the general form in Equation~\eqref{eq:PowerLaw}.  The constant
$\alpha$ is sometimes called the \emph{scaling exponent} because scaling $x$ by 
a constant factor $c$ -- that is, replacing $x$ by $c x$ multiplies the output value $y$
by the factor $c^\alpha$.  In the applications we usually restrict to $x \ge 0$, and these
inputs are \emph{always} in the domain of a power function.   The $x < 0$ will 
not be in the domain of power functions such as $x^{1/2}$.  So restricting to $x \ge 0$
simplifies the discussion somewhat.  

\begin{example}
\label{FirstPowerEx}
We have encountered several simple power functions in examples in previous chapters.
For instance, the area of a square of side $x$ is $A = x^2$, a power function with 
exponent $\alpha =2$.  The volume of a cube of
side $x$ is $V = x^3$, a power function with exponent $\alpha = 3$.  
These geometric formulas are the reason for calling $x^2$ 
``$x$ squared'' and $x^3$ ``$x$ cubed.''  The area of a circle as a function of the radius is 
given by $A = \pi r^2$, which is another power function with exponent $\alpha = 2$.  $\triangle$
\end{example}

The graphs of power functions have several forms.
In Figure~\ref{fig:PowerLawsPos}, we plot several power functions with the 
scaling exponent $\alpha > 0$.
\begin{figure}
\begin{center}
\includegraphics[width=3.0in,width=3.0in]{PowerFunctions.png}
\caption{Power functions $y = x^\alpha$ with $\alpha > 0$}
\label{fig:PowerLawsPos}
\end{center}
\end{figure}
The solid red curve is $y = x^{1/2}$; the dashed blue curve is $y =x^{3/4}$, 
the solid black curve is the linear function $y = x$ (linear functions with intercept $= 0$ are special cases of 
power functions); the dashed red curve is $y = x^2$; the solid blue curve is $y = x^3$; the dashed
black curve is $y = x^{4.3}$.    Note that:
\begin{itemize} 
\item The graphs of the functions with $\alpha > 1$ are \emph{concave up} for all $x \ge 0$ and cross
from below the line $y = x$ to above that line at $x = 1$.
\item The graphs of the functions with $0 < \alpha < 1$ are \emph{concave down} for all $x \ge 0$
and cross from above the line $y = x$ to below that line at $x = 1$.
\item The graph of the function with $\alpha = 1$ is a \emph{straight line} and something like
a \emph{boundary case} between the other two types of power law graphs with $\alpha > 0$.
\end{itemize}

All of the plots pass through the point $(1,1)$ because we plotted functions with the constant $\beta = 1$ in the 
general form from Equation~\ref{eq:PowerLaw} in all cases.  Note that $f(x) = \beta \cdot x^\alpha$ would
satisfy $f(1) = \beta$ instead.  Changing $\beta$ to some value other than $\beta = 1$ multiplies
all function values by that constant and stretches or shrinks the whole graph 
vertically depending on whether $\beta > 1$ or $0 < \beta < 1$.

The power functions with a negative scaling exponent are somewhat less variable.
\begin{figure}
\begin{center}
\includegraphics[width=3.0in,width=3.0in]{PowerFunctionsNegativeExponent.png}
\caption{Power functions $y = x^\alpha$ with $\alpha < 0$}
\label{fig:PowerLawsNeg}
\end{center}
\end{figure}
In Figure~\ref{fig:PowerLawsNeg}, the solid curve is $y = x^{-2}$, the dashed curve is $y = x^{-1}$ and the dotted one
is $y = x^{-1/2}$.  No power function with $\alpha < 0$ is defined at $x = 0$, 
and each of the graphs has a \emph{vertical asymptote} there.  As $x$ approaches
$0$ through positive values, the value of each of these functions grows without
bound.  The larger $|\alpha|$ is, the greater the values of the function for $0 < x < 1$ are.
But the pattern reverses for $x > 1$.  There, the larger $|\alpha|$ is, the smaller
the values of the function are for $x > 1$.

\subsection*{Power Functions Versus Exponential and Logarithm Functions.}
There are some superficial similarities between certain power functions,
exponentials, and logarithms that should be noted.  But these functions should
not be confused with one another.  First, be careful that you understand
the difference between powers and exponentials.  Even though the values
of both functions can often be computed with the same calculator button (the \^{} button
on many scientific calculators), these are quite different.  In the $a^x$ exponential, 
it is the base that is constant and the variable is in the exponent.  On the 
other hand, in the power function $x^\alpha$, it is the exponent that is
constant and the base is the variable.  

Power functions $x^\alpha$ with $\alpha > 1$ and 
exponentials $a^x$ with $a > 1$ also have somewhat similar-looking
graphs -- they are both increasing and ``concave up.''  If only a subset of
the domain is considered, it can appear as though a power function 
is growing faster than an exponential.  For instance, in Figure~\ref{fig:ExpPow1},
the solid curve is $y = x^3$, while the dashed graph is $y = 2^x$ and the 
interval of $x$-values shown is $0 \le x \le 3$.  Here it looks as
though $y = x^3$ is growing faster.  On the other hand, if
we extend the plotting interval to $0 \le x \le 11$, as in Figure~\ref{fig:ExpPow2}, then we can see that the 
exponential $y = 2^x$ has overtaken $y = x^3$ around $x = 10$ and is growing more quickly after that point.\footnote{Technical Note: $2^{10} = 1024$, while
$10^3 = 1000$, so by $x = 10$, the exponential has already exceeded the power and the curves cross for $x$ slightly less than $10$.  There is 
no simple algebraic way to solve the equation $2^x = x^3$, though, because the unknown $x$ appears both in the exponent and in the base of the
power.  Root-finding tools based on calculus are necessary to approximate the solutions.  There are two solutions
visiible in Figures~\ref{fig:ExpPow1} and \ref{fig:ExpPow2}.  The values are approximately $x = 1.373467120$
and $x = 9.939535141$.} 
\begin{figure}
\centering
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=.4\linewidth]{ExpAndPower1.png}
  \caption{Plotted on $0 \le x \le 3$.}
  \label{fig:ExpPow1}
\end{subfigure}%
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=.4\linewidth]{ExpAndPower2.png}
  \caption{Plotted on $0\le x \le 11$.}
  \label{fig:ExpPow2}
\end{subfigure}
\caption{The exponential $2^x$ (dashed) grows faster than the power $x^3$ (solid) for large enough $x$.}
\end{figure}
In fact, it can be shown, using techniques from calculus that:
\begin{itemize}
\item \emph{Every exponential function} $a^x$ with 
$a > 1$ eventually grows faster than every power function $x^\alpha$, in the sense that 
$\frac{x^\alpha}{a^x}$ eventually tends to zero as $x$ increases without bound.\footnote{Technical Note: 
In calculus terms, we are saying that when $a > 1$,
$\displaystyle{\lim_{x\to\infty} \frac{x^\alpha}{a^x} = 0}$  no matter how large $\alpha$ is.  This can be shown using L'Hopital's Rule.}
\end{itemize}

The graphs of power functions with $0 < \alpha < 1$ have a superficial similarity to graphs of logarithm functions.
Both are increasing and ``concave down'' as in Figure~\ref{fig:PowLog}.  There, $y = x^{1/2} = \sqrt{x}$ is shown solid
and $y = \log_2(x)$ is shown dashed.  However,  the power function graph does not cross the $x$-axis
at $x = 1$ and it does not have the portion below the $x$-axis for $0 < x \le 1$.  On that range, the logarithm is approaching a vertical asymptote
at $x = 0$ (with $y$ going to
$-\infty$ as $x$ goes to zero).
\begin{figure}
\begin{center}
\includegraphics[width=3.0in,width=3.0in]{PowerAndLog.png}
\caption{Power function $y = x^{1/2}$ (solid) and logarithm $y = \log_2(x)$ (dashed).}
\label{fig:PowLog}
\end{center}
\end{figure}

\subsection*{Working With Power Functions.}
Since there are two parameters $\alpha$ and $\beta$ in the general form \eqref{eq:PowerLaw}, given
two distinct points in the first quadrant of the plane (that is, with $x,y > 0$), there is exactly one power function
whose graph passes through those two points.  

\begin{example}
\label{PowerLawTwoPoints}
Say the two points are $(2.3,5.6)$ and $(3.4,2.1)$.  We want to find a power function $f(x) = \beta x^\alpha$ 
such that 
\begin{align}
\label{eq:TwoPointEquations}
\nonumber
5.6 &= \beta \cdot (2.3)^\alpha\\
2.1 &= \beta \cdot (3.4)^\alpha.
\end{align}
If we divide the first equation by the second, then canceling the $\beta$ factors gives
$$2.667 \doteq \frac{5.6}{2.1} = \frac{\beta (2.3)^\alpha}{\beta (3.4)^\alpha} = \left(\frac{2.3}{3.4}\right)^\alpha \doteq  (.6765)^\alpha.$$
Taking logarithms (to solve for the $\alpha$ in the exponent!) we get
$$\log_{10}(2.667) = \alpha \cdot \log_{10}(.6765) \Rightarrow \alpha \doteq -2.51.$$
Then we can solve for $\beta$ using either of the equations in Equation~\eqref{eq:TwoPointEquations}.  Using the first gives
$$5.6 = \beta \cdot (2.3)^{-2.51} \Rightarrow \beta = 5.6\cdot (2.3)^{2.51}\doteq 45.3.$$
The power function we want is (approximately) $f(x) = 45.3 \cdot x^{-2.51}$.
It is easy to check then that $45.3\cdot (3.4)^{-2.51}$ is approximately equal to $2.1$.  Note also 
that since $5.6 > 2.1$, we must have that the power function whose graph passes through these two points
is decreasing.  Hence we expect a \emph{negative} $\alpha$ value by looking at Figures~\ref{fig:PowerLawsPos} and \ref{fig:PowerLawsNeg}.
The value $\alpha \doteq -2.51$ matches this.  $\triangle$
\end{example}


\specialsection{Log-Log plots and Fitting Power Law Models}
We will say one quantity $y$ follows a \emph{power law} if $y$ is given by a power
function of some other quantity $x$, that is 
$$y  = \beta\cdot x^\alpha$$
as in Equation~\eqref{eq:PowerLaw}.  Any equation of this form can also be thought of 
a mathematical model describing how the quantities $y$ and $x$ are related.

As with the exponential models studied in Chapter 5, the most basic standard process of fitting a power law
model  to a data set proceeds by applying the least squares regression technique to a transformed data set.
We can see the idea if we start from Equation~\eqref{eq:PowerLaw} and take logarithms
on both sides:
$$y = \beta \cdot x^\alpha \Leftrightarrow \log_{10}(y) = \log_{10}(\beta \cdot x^\alpha) = \alpha \log_{10}(x) + \log_{10}(\beta),$$
using parts (1) and (4) of Proposition~\ref{LogProps}.  Note that we have applied the logarithm function 
to \emph{both $x$ and $y$} here.  We will call this the \emph{log-log transform} on the original data set, and the resulting
point plot is called a log-log plot.  Note that this means \emph{both} the independent and dependent variables are plotted using a logarithmic
scale as discussed in Chapter 1. From this we see:
\begin{itemize}
\item  \emph{If the data set $(x_i,y_i)$ follows a power law $y = \beta\cdot x^\alpha$ exactly, then the log-log transformed data points
$(\log_{10}(x_i),\log_{10}(y_i))$ lie on the straight line with slope $\alpha$ and intercept $\log_{10}(\beta)$.}
\item \emph{Even if not, a power law model can be fit to the data set by finding the best linear fit for the log-log transformed data
set using least squares regression.  If the best fit line has slope $\hat{m}$ and intercept $\hat{b}$, then 
$\alpha = \hat{m}$ and $\beta = 10^{\hat{b}}$ are the parameters of the best fit power law.}
\end{itemize}
 In ``the old days,'' both this process and the process described in Chapter 5
for fitting exponential models were often carried out using specially-designed graph paper.  Semi-log graph paper
has the vertical axis ruled on a logarithmic scale; log-log graph paper has both axes ruled this way.
 One very basic and approximate
way to carry out these computations is to plot the data set on the appropriate sort of graph paper,
estimate the ``best-fit'' line \emph{visually}, and use that to derive the appropriate exponential or power law
model.  It is still possible to find templates for printing out both kinds of graph paper online today, but we will
not use them because estimating the best-fit line that way tends to be a somewhat ambiguous and subjective
process.  We will use Excel or other software to carry out the calculations more precisely.

Just as for the exponential models from Chapter 5, there are two different ways to use 
the Excel spreadsheet environment to perform computations like these.
You have the option of either
\begin{itemize}
\item doing the process as described and shown in this text, or 
\item using one of the {\it Trendline} options shown in the Chart Tools/Trendline menu, namely
the {\it Power} option,
but on the \emph{untransformed}, $(x_i,y_i)$ data set.
\end{itemize}
Those Excel options perform the computations exactly as we have described them above (by the 
log-log transform) but they
automate the process so you don't have to do the log-log transformation
yourself.

We next illustrate the process for fitting a power law model on an example.


\begin{example}
\label{BodyMassHeartRate}
The data in Table~\ref{MammalianHeartRatesVsBodyMass} shows a range of typical resting heart rates (in beats per minute -- bpm) for adults of a number of mammalian species
and an adult body mass value for the same species.\footnote{The non-human heart rate ranges are
from S. Fielder, ``Resting Heart Rates,'' {\tt http://www.merckvetmanual.com/appendixes/reference-guides/resting-heart-rates},  average body masses from {\tt eol.org},
both accessed
July 2, 2017.} 
\begin{table}[ht]
\renewcommand\arraystretch{1.5}
\caption{Mammalian Resting Heart Rate and Body Mass Ranges}
\label{MammalianHeartRatesVsBodyMass}
\noindent\[
\begin{array}{|c|c|c|}
\hline
{\rm Species} & {\rm Heart Rate\ (bpm)} & {\rm Body Mass\ (g)} \\ 
\hline
{\rm cat} & 120-140 & 2,900\\
\hline
{\rm cattle} & 48-84  & 347,000\\
\hline
{\rm dog} & 70-120 & 40,000\\
\hline
{\rm Asian\ elephant} & 25-35 & 2,720,000\\
\hline
{\rm goat} & 70-80 & 33,500\\
\hline
{\rm guinea\ pig}& 200-300 & 720\\
\hline
{\rm horse} & 28-40 & 250,000\\
\hline
{\rm rabbit} & 180-350 &  1,580\\
\hline
{\rm human} & 60-84 & 70,000\\
\hline
\end{array}
\]
\end{table}
The body mass values here are estimated averages.  
We will think of the body mass as the independent variable here and the heart rate as the 
dependent variable.  For simplicity, we use the midpoint of each range of heart rates.\footnote{For some of the species, 
for instance for {\it Canis lupus familiaris} (the domestic dog), there is a tremendous range of body sizes, 
weights, and heart rates.  Hence we try to average over the whole range of the species in making
this comparison.}
Applying the log-log transform, we find the straight line best fitting the transformed data set and we find
$$\log_{10}({\rm heart\ rate}) = -0.265 \cdot \log_{10}({\rm body\ mass}) + 3.146.$$
Raising $10$ to both sides of this equation we get the fitted power law model,
$${\rm heart\ rate} = 1400 \cdot ({\rm body\ mass})^{-.265}.$$
The log-log transformed point plot and the regression line are shown in Figure~\ref{fig:PowLawMod}.
\begin{figure}
\begin{center}
\includegraphics[width=3.0in,width=3.0in]{PowerLawReg.png}
\caption{The log-log transformed point plot of the body mass/heart rate data, and best fit line.}
\label{fig:PowLawMod}
\end{center}
\end{figure}
The question we are considering here is related to the relation between body mass and metabolic
rate (Kleiber's Law) discussed in the Introduction.   This relationship between body mass and
resting heart rate is thought to follow a power law with scaling exponent
$\alpha = -1/4$.\footnote{V.M. Savage, et. al. ``The predominance of quarter-power scaling in biology,'' Funct. Ecol. 2 April, 2004.}
The results from the analysis of our small data set agrees with that pretty well!
 $\triangle$
\end{example}



For a second example, we will consider the data set of measured lengths and masses of trout from
Exercise~\ref{ex:TroutWeightLength} in Chapter 5.  

\begin{example}
\label{TroutExample}
In Exercise~\ref{ex:TroutWeightLength} from Chapter 5, you fit linear and exponential models
to the data set from Table~\ref{Trout}.   Figure~\ref{fig:RawTroutFig} shows the point plot
of the ``raw'' data set (i.e. before applying any logarithmic transformations).
\begin{figure}
\begin{center}
\includegraphics[width=3.0in,width=3.0in]{RawTrout.png}
\caption{The data from Table~\ref{Trout} of Chapter 5.}
\label{fig:RawTroutFig}
\end{center}
\end{figure}
We view the length as the independent variable and the mass as the dependent variable.
Visually, we can see that a linear model would be reasonably good here, although there
is a certain amount of upward curvature (concavity upward) in the point plot as the
length variable increases and this would tend to produce a sign pattern in
the residuals for the linear regression.   Hence an exponential model is also a possibility here,
and computing $R^2$ values indicates that the exponential model is perhaps
slightly better ($R^2 \doteq .94$ for the linear model versus $R^2 \doteq .96$ for
the exponential model).  

Let us also fit a power law model.  The log-log transformed data set and the 
regression line are shown in Figure~\ref{fig:LogLogTroutFig}.
\begin{figure}
\begin{center}
\includegraphics[width=3.0in,width=3.0in]{LogLogTrout.png}
\caption{Log-Log transform of trout data and regression line.}
\label{fig:LogLogTroutFig}
\end{center}
\end{figure}
The equation of the regression line is 
$$\log_{10}({\rm mass}) = 2.724 \cdot \log_{10}({\rm length}) - 4.268.$$
So our power law model is 
$${\rm mass} \doteq (5.395 \times 10^{-4})\cdot ({\rm length})^{2.724}.$$
The $R^2$ statistic here is $R^2 \doteq .97$, which indicates that the power law
is perhaps a slightly better fit than either the linear or the exponential model (these
are not large differences though and we should not read too much into them).  
Note that the scaling exponent $2.724$ is also relatively
close to the value of $3$ that you should have derived from the simplifying 
assumption that the fish are all scaled copies of each other in part (b)
of Exercise~\ref{ex:TroutWeightLength} from Chapter 5.  A possible
explanation for the fact this is not closer to that theoretical value
of $3$ is that the fish are not just scaled copies of one another (i.e. for 
instance, knowing that one fish is $1.2$ times the length of another 
does not mean that every structure in the two bodies has
dimensions in the same proportion).  Moreover, different tissues in 
the fish bodies have different mass densities and variations
in scaling between different structures may produce deviations from 
a power law with scaling exponent $3$.  $\triangle$
\end{example}

This last example shows an important consideration to keep in mind.  
Namely, the techniques we have introduced for fitting models of various sorts
(linear, exponential, power law) can be used in different ways in 
different circumstances.  In some situations, there is a ``preferred''
type of model to use based on a theoretical understanding of 
what is happening in the real-world situation being studied.  
 For example, over a short time frame, even though a 
linear model might fit measured amounts of a radioactive isotope
undergoing decay quite closely, we also know on theoretical
grounds that the exponential models are a better description of 
the underlying physical process.  So exponential models would
be preferred and the goal might be to estimate the half-life
of the isotope from the fitted model. Similarly, in the situation of
Example~\ref{TroutExample}, consideration of the geometry
of the fish bodies seems to indicate that a power law would
be a better model for how weight depends on length than
either a linear model or an exponential model on theoretical
grounds and then the question becomes: What scaling exponent
matches the data for a given species?  
But in other cases, we may not have a theoretical model in hand
and several or all of the sorts of models we have discussed
may be applicable.  As we have discussed, there are indications
to look for that show a linear model might not be matching
a data set well, and then exponential or power law models
might yield better results.  

On the other hand, you should be cautious about attempting to \emph{infer a theoretical
exponential or power law relationship  between quantities on the basis of the results of modeling}
using the techniques we have discussed.  This is a much more
subtle problem and it calls for more sophisticated statistical
tools than we will be able to consider in this introductory treatment.\footnote{There are times
when consulting an expert statistician is necessary!}
We will see some examples that indicate the subtleties involved
in the next section.

\specialsection{Power Law Distributions}
%%Power law distributions in probability
To discuss our next application of power law models, we need to begin by introducing another data 
analysis concept.  It is often of interest to understand how the items in a data set
are distributed.  One way to analyze this is to construct a \emph{frequency histogram},
which shows how many of the items in the given data set lie in each one of a given
set of ranges of values, or \emph{``bins.''} Histograms are often plotted as bar
charts as in Figure~\ref{fig:HybridBarChart} from Chapter 4.

\begin{example}
\label{Histogram}
Consider the following hypothetical (i.e. ``made-up'') data set with $N = 17$ values:
\begin{align}
\label{eq:HypData}
&12.4\quad 5.6\quad 21.3\quad 4.3\quad 23\quad 24.4\quad  2.3\quad 17.6\quad 12.0\\ \nonumber
&13.9\quad 21\quad 27.0\quad 12.2\quad 14.1\quad 3.4\quad 11.8\quad 12.9.
\end{align} 
We see that all of the data lies in the numerical range $0.0$ to $28.0$.  If we divide
this range into 7 equal subintervals, or \emph{``bins''} of width 4, then the frequency histogram
is based on the number of data values that fall into each of the bins, as in Table~\ref{HypDataFreqs}.
The value $12.0$ comes at the boundary between two of the bins.  As indicated, we counted it
in the bin for $12 \le x < 16$, not the bin for $8 \le x < 12$.
\begin{table}[ht]
\renewcommand\arraystretch{1.5}
\caption{Frequencies in data from Equation~\eqref{eq:HypData}}
\label{HypDataFreqs}
\noindent\[
\begin{array}{|c|c|}
\hline
{\rm Bin} & {\rm Frequency}\\ 
\hline
0 \le x < 4 & 2\\
\hline
4 \le x < 8 & 2 \\
\hline
8 \le x < 12 & 1 \\
\hline
12 \le x < 16 & 6 \\
\hline
16 \le x < 20 & 1\\
\hline
20 \le x < 24 & 3  \\
\hline
24 \le x < 28 &  2\\
\hline
\end{array}
\]
\end{table}
Note that the entries in the Frequency column sum to $N = 17$ since we have accounted
for all of the data values.  The corresponding histogram is then a bar chart in which the 
heights of the bars represent the Frequency values.  These might be plotted, for 
centered at the midpoints of the bins, as in Figure~\ref{fig:HybridBarChart} from Chapter 4.
See Figure~\ref{fig:HypHistogram} for the frequency histogram bar chart from this data. $\triangle$
\begin{figure}
\begin{center}
\includegraphics[width=3.0in,width=3.0in]{HypHist.png}
\caption{The frequency histogram for the data from Table~\ref{HypDataFreqs}.}
\label{fig:HypHistogram}
\end{center}
\end{figure}
\end{example}

There are many choices involved in the constructions of histograms:
\begin{itemize}
\item how many bins are used,
\item where the bin boundaries are placed and what the widths of the bins are,
\item how the values at the boundaries of bins are handled.  
\end{itemize}
In our example we arbitrarily chose $7$ bins of width $4$ and handled
boundaries by saying that any values at a boundary between two bins
would count in the higher bin.  For instance, the bin definition $0 \le x < 4$ in Table~\ref{HypDataFreqs}
means that if we had a value of $4.0$, it would count in the next bin for $4 \le x < 8$, not in the bin for
$0 \le x < 4$.  It would also always be possible to (re)define bins so that no data values
occur at bin boundaries(!)

All of this means that it is not possible to 
specifiy any one histogram that is the sole correct representation of the distribution of values
in a data set.\footnote{There are also many ``shady'' tricks that can be used to conceal patterns in data
or create the appearance of patterns that are not present.  As Mark Twain was fond of saying, ``there are
three kinds of lies:  lies, damned lies, and statistics.''}  In general, however, rules of thumb that are usually followed include:
\begin{itemize}
\item Unless there are clear \emph{outliers} far outside the range of values in the rest of the 
data, the bins should cover the whole range of values represented in the data set.
\item Somewhere between 5 and 10 bins are normally used; using fewer might mean too many data values may get 
``lumped'' into one bin for important underlying structure to be revealed, while using more might mean
that not enough aggregation into groups happens -- missing the forest for the trees, so to speak.
\item It is not necessary for all the bins to have equal width, but in that case, it is probably
``good form'' to plot the bar chart using rectangles the whole width of the bin to 
show how the bins are related.
\end{itemize}
A variant of the frequency histogram is the \emph{relative frequency} histogram where the
heights of the bars are scaled by dividing by the number of data values, $N$, and (possibly)
multiplying by $100\%$.  If the heights are converted to percents, then the bars in 
a histogram represent the portion of the data set contained in the different bins.  For example,
in the relative frequency histogram corresponding to Figure~\ref{fig:HypHistogram}, the
bar for the bin $12 \le x < 16$ would have height $6/17 \times 100\% \doteq 35.3\%$, so 
about $35\%$ of the data values are in that range.

For large data sets, it can be quite tedious to count the numbers of data values in each
bin to construct a frequency histogram.  Hence software like Excel has facilities to automate
the process.  The controls for doing this are under the Tools/Data Analysis pull-down
menu.  (If you do not see Data Analysis under the list of Tools options, you will need
to install the \emph{Analysis ToolPak} add-on package.  This is always distributed with Excel, 
but not all users need its features, so it is not automatically installed when you launch
Excel for the first time.  Follow the instructions under the listing for the \emph{Analysis ToolPak}
to install it.)
Once you have the Tools/Data Analysis going, the steps to construct a histogram are the 
following:
\begin{itemize}
\item Enter your data in one range of cells, and a list of \emph{upper bin boundaries} in a second range of cells.
\item Select Histogram from the list of Tools/Data Analysis functions.
\item Enter the range of cells containing your data.
\item Enter the second range of cells where you have entered the bin boundaries.
\item Enter the options you want (indicate whether you want the histogram plotted, and
whether you want the output on a separate page of the spreadsheet).
\item Press the OK button.  
\end{itemize}

We now discuss how histograms and the power law models we have introduced can be
used to understand the distribution of many real-world data sets.
Many kinds of real-world data have frequency histograms showing that \emph{small values
of some quantity are much more common than large values}.   For instance, small towns
are much more numerous than larger cities.  Small
wildfires that burn an acre or two are much more common than the massive
fires that burn many square miles of forest.  Small oil spills are much more
common than the ``mega-disasters'' like the 
Deepwater Horizon oil well blowout in the Gulf of Mexico in 2010.  

Power law models can be used to describe the distribution 
of quantities like the population of cities, or the area burned in wildfires, or the amount
of oil spilled in accidents in some situations.  
A standard method for fitting a power law model to a distribution is as follows
\begin{itemize}  
\item Construct a histogram for the data 
\item For each bin, start by computing what is called the \emph{reverse cumulative frequency} -- the number
of data points with values \emph{greater than or equal to the lower boundary of 
the bin}.  
\item Fit a power law model to the data set $(x_i,y_i)$ where 
$x_i = $ midpoint of $i$th bin, and $y_i$ is the reverse cumulative frequency for the $i$th bin.
\item If the power law model (which will almost always have $\alpha < 0$) fits the data
well ($R^2$ close to 1, or $R$ close to $-1$), then we say the data has an (approximate)
\emph{power law distribution}.
\end{itemize}


We apply this idea to study the distribution of several data sets.
%%%%%%%%
%Example where power law distribution does fit
%%%%%%%%
\begin{example}
\label{MassCitiesAndTowns}
According to the 2010 Federal Census, the 127 largest cities and towns in the state
of Massachusetts had populations distributed as in Table~\ref{MassCityPops}.
\begin{table}[ht]
\renewcommand\arraystretch{1.5}
\caption{Populations of the 127 largest Massachusetts cities and towns, 2010 census.}
\label{MassCityPops}
\noindent\[
\begin{array}{|c|c|c|}
\hline
{\rm Population Range} & {\rm Frequency} & {\rm Reverse\ Cumulative\ Frequency}\\ 
\hline
< 40,000 & 91 & 91 + 25 + 8 + 1 + 1 + 1 = 127\\
\hline
40,000 - 80,000  & 25 &  25 + 8 + 1 + 1 + 1 = 36 \\
\hline
80,000 - 120,000 & 8 & 8 + 1 + 1 + 1 = 11 \\
\hline
120,000 - 160,000 & 1 & 1 + 1 + 1 = 3 \\
\hline
160,000 - 200,000 & 1 & 1 + 1 = 2\\
\hline
200,000 - 620,000 & 1 & 1 \\
\hline
\end{array}
\]
\end{table}
The one extremely large value was Boston, with a population of $617,594$; the cities of Worcester and Springfield were the 
unique cities in the $160,000 - 200,000$ and $120,000 - 160,000$ bins, respectively.
 Figure~\ref{fig:MassCityPLFit}
shows the log-log plot of the reverse cumulative frequencies versus the bin midpoints, together with the best fit
regression line, which has the equation 
$$\log_{10}({\rm reverse\ cumulative\ frequency}) = -1.757\cdot \log_{10}({\rm bin\ midpoint}) + 9.727.$$
The regression $R^2$ is .9497, which indicates a reasonably good fit.  We can say these populations
apparently follow a power law model with scaling exponent $\alpha \doteq -1.757$.  However, caution
must be exercised in using this approach.  For instance, the estimates of the scaling exponent definitely
depend on the choice of bins in constructing the histogram of the original data.  
For instance, note that the final bin we used above is much wider than the others--this is permissible.  
The alternative would be to continue with bins of width
$40,000$ containing no data points until a bin containing the one largest value was found.  In Exercise~\ref{ex:AltBinsPowerLaw},
you will redo the calculation with that choice of bins and you will find that the reported fit is essentially
almost as good, but the estimated $\alpha,\beta$ parameters for the power law are different.  
$\triangle$
\begin{figure}
\begin{center}
\includegraphics[width=3.0in,width=3.0in]{CityPLFit.png}
\caption{Fitting a power law model to the Massachusetts city and town population data.}
\label{fig:MassCityPLFit}
\end{center}
\end{figure}
\end{example}

Here is another example where the results turn out somewhat differently.  

\begin{example}
\label{CalQuakes}
The whole West Coast of the U.S. is a \emph{very active} area seismically because of the numerous
faults that run through this part of the country and the high level of volcanic activity.  
For instance, in the six-day period between June 29 and July 4, 2017, there were 829 earthquakes
and other seismic events with epicenters in California and Nevada that were strong enough to be measured 
and recorded at the Southern California Earthquake Data Center.\footnote{Data from
{\tt http://scedc.caltech.edu/recent/Quakes}, accessed July 5, 2017.  Around 10 of the reported events were
probably results of man-made explosions in quarries.}  All of them had magnitudes less than 3.5 -- they
were fortunately quite minor and none caused large property damage or 
loss of life.   We will not show all the data points corresponding to the measured
moment magnitudes (see Exercise~\ref{ex:QuakeMagnitude} in Chapter 1), because
the data set is so large(!)  Instead, we will simply consider the  frequency tabulations in Table~\ref{CalQuakeRevCumFreqs}.
The histogram in Figure~\ref{fig:CalQuakeHist} shows
the distribution of quakes by their magnitudes, computed with bins of width $0.5$.  
\begin{figure}
\begin{center}
\includegraphics[width=3.0in,width=3.0in]{QuakeHist.png}
\caption{Histogram of earthquakes by magnitude (bins of width $.5$).}
\label{fig:CalQuakeHist}
\end{center}
\end{figure}
Note the way the larger magnitude quakes tend to happen much less frequently than the very mild 
quakes with magnitudes $< 1$.  But quakes with magnitude between $.5$ and $1$ are more common than
smaller ones.  Since this data set, too, is generally following the ``smaller values more common than larger 
ones'' pattern, it makes sense to ask whether the California and Nevada earthquake 
magnitude data is following a power law distribution.  

The computation of the reverse cumulative frequencies from the raw frequencies is shown in Table~\ref{CalQuakeRevCumFreqs}.
\begin{table}[ht]
\renewcommand\arraystretch{1.5}
\caption{Reverse cumulative frequencies of California and Nevada earthquakes by magnitude.}
\label{CalQuakeRevCumFreqs}
\noindent\[
\begin{array}{|c|c|c|}
\hline
{\rm Magnitude} & {\rm Frequency} & {\rm Reverse\ Cumulative\ Frequency}\\ 
\hline
x < 0.5 & 234 & 234 + 307 + 164 + 82 + 28 + 9 + 5 = 829\\
\hline
0.5 \le x < 1.0 & 307 &  307 + 164 + 82 + 28 + 9 + 5 = 595 \\
\hline
1 \le x < 1.5 & 164& 164 + 82 + 28 + 9 + 5 = 288 \\
\hline
1.5 \le x < 2.0 & 82 & 82 + 28 + 9 + 5 = 124 \\
\hline
2.0 \le x < 2.5 & 28 & 28 + 9 + 5 = 42\\
\hline
2.5 \le x < 3.0 & 9 & 9+5 = 14 \\
\hline
3.0 \le x < 3.5 &  5 & 5\\
\hline
\end{array}
\]
\end{table}
We plot the log-log transformed bin-midpoint versus reverse cumulative frequency
data set and the best-fit regression line in Figure~\ref{fig:PowDistQuake}.
We see that this fit is nowhere near as good as some we have seen before.  In fact
the plot definitely shows one of the warning signs that the linear regression is 
not fitting the data--the curvature (downward concavity) produces a definite sign pattern in the residuals.  
Moreover, the $R^2$ value, $R^2 \doteq .774$, while not terrible, is probably 
too far from $1$ for us to draw a definite conclusion that the corresponding
power law fits this distribution well.  It is possible, of course, that looking at the 
data for a longer time span would yield different results.  This 6-day period might
have had uncharacteristically many quakes of magnitude beween $.5$ and $1$ and 
uncharacteristically few quakes of magnitude less than $.5$, the apparent 
``culprit'' for the relatively bad fit of the power law model.  $\triangle$
\begin{figure}
\begin{center}
\includegraphics[width=3.0in,width=3.0in]{PowerLawDistQuake.png}
\caption{Log-log plot of reverse cumulative frequencies versus bin-midpoints.}
\label{fig:PowDistQuake}
\end{center}
\end{figure}
\end{example}

Technical Note:
Although the method we have outlined is simple and appealing,\footnote{and analogous calculations have
appeared many times in published scientific papers studying questions in biology and other areas!} you should be aware that it is 
\emph{somewhat questionable} as a way of \emph{inferring that a power law distribution actually fits a real world situation}.  
One problem is that measurement errors and random variation will be present in real-world data.  Assumptions about those errors
are necessary to obtain confidence bounds on the coefficients in the equation of the best-fit line (something we have not discussed yet, but
an important part of using regression as a statistical tool).  Even if those assumptions are true for the raw data, they are 
\emph{usually not satisfied} after we apply the log-log transform.
We will return to such issues later in the course.   Even
when a definite power law distribution should hold on theoretical grounds, the effect of random errors in the data and 
different binning schemes used to produce the histograms
can lead to very inaccurate results for the estimated scaling exponent $\alpha$ and the parameter $\beta$.
Hence care is required.  A sounder alternative for fitting power law
distributions and evaluating their goodness of fit requires more advanced mathematical and statistical techniques.  If
you ever need to address such questions (say in a research project later in your studies), you may want to look at
the article  Clauset, Shalizi, and Newman, ``Power law distributions in empirical data,'' SIAM Review volume 51 (4) (2010)
661-703, and/or consult a practicing statistician. 

\specialsection{Chapter Project}
The chapter project for this chapter involves using the techniques we have developed to notice a pattern that holds in many
types of data.  The first data set you will study will be the list of populations of the 382 MSA's (Metropolitan Statistical
Areas) identified by the Bureau of the Census in the United States.  The MSA's are standard metropolitan areas 
used by government agencies and many others to study demographic and economic trends.  They are designed to coincide with 
the major concentrations of population, \emph{not administrative boundaries}.  Thus, for instance, 
the MSA for Boston contains not just the City of Boston, but also the first ``ring'' of suburban towns around the city.  
The data you need is tabulated at 
\vskip 10pt
\centerline{\tt https://en.wikipedia.org/wiki/List$\_$of$\_$Metropolitan$\_$Statistical$\_$Areas} 
\vskip 10pt
\noindent
and in other places.   As you can see, the first few items in the list, ranking the populations in decreasing order, are the MSA's corresponding
to New York, Los Angeles, Chicago, Dallas-Fort Worth, etc.    Fairly early in the list
are perhaps unexpected places like Riverside-San Bernardino-Ontario, CA (located east of Los Angeles).
These are not traditional ``big cities,'' but major concentrations of population.   
Not surprisingly, high population states such as California, Texas, and 
Florida tend to have a lot of the larger MSAs.  The MSA for Boston is  ranked 10 on this list.  Worcester, MA is included 
in the MSA ranked 58.   

\subsection*{Questions}
Investigate the data and try to develop answers to these questions:
\begin{enumerate}
\item[(A)]  Does it seem as though a linear model gives a good fit between $x = $ rank of the MSA
and $y = $ population of the MSA?   Look at the value of $R^2$ and the residuals for the 
regression -- as always strong patterns in the residuals indicate a ``lack of fit.''
\item[(B)]  What about an exponential model?  Again, look at the 
value of $R^2$ and the residuals.
\item[(C)]  What about a power law model?
Once again, look at the value of $R^2$ and the residuals.
\item[(D)]  It should be fairly clear from the data that the 8 or so largest
MSA's are somewhat unrepresentative of the rest.  What happens if you 
repeat parts (A), (B), and (C) on just the 9th through the 382nd?
\item[(E)]  What can you say about a functional relation between
$x = $ rank of the MSA, and $y = $ population based on what you 
have found?
\item[(F)]  {\it Extra Credit.}  Does the pattern you found here hold in
other countries as well?  It is fairly easy to find data online about
the largest cities in countries around the world.  Try the United
Kingdom, India, etc.  Is the pattern pretty general, or are there
differences? 
\end{enumerate}
Now we turn to what should seem like a totally unconnected topic, namely
the distribution of frequencies of words in English texts.  The Corpus of 
Contemporary American English is a 450-million word cross-section
of written and spoken English usage as it is practiced in the early 21st century.
The web page 
\vskip 10pt
\centerline{\tt http://www.wordfrequency.info/free.asp?s=y}
\vskip 10pt
\noindent
contains a 
listing of the top 5000 most frequently used words in contemporary English,
sorted by their frequency in the Corpus.  (This much is free; more detailed
and more extensive lists can also be purchased!)  
\begin{enumerate}
\item[(G)]  Does it seem as though a linear model gives a good fit between $x = $ rank of the word
and $y = $ frequency in the Corpus?   Look at the value of $R^2$ and the residuals for the 
regression -- as always strong patterns in the residuals indicate a ``lack of fit.''
\item[(H)]  What about an exponential model?  Again, look at the 
value of $R^2$ and the residuals.
\item[(I)]  What about a power law model?
Once again, look at the value of $R^2$ and the residuals.
\item[(J)]  What can you say about a functional relation between
$x = $ rank of a word, and $y = $ frequency in the Corpus based on what you 
have found?
\item[(K)]  {\it Research Project.}  Does the pattern you found here hold for
other languages as well?  Can you find similar compilations of words
appearing in some corpus of texts for other languages?  What
does an analysis show?
\end{enumerate}
Write up your results and include the spreadsheets you used for these computations.  As a final step before 
submitting your work, look up a formal statement of \emph{``Zipf's Law.''} Were your results
consistent with that?

\begin{xcb}{Chapter Exercises}
\begin{enumerate}
\item Which of the following formulas for functions can be rewritten to show that they are examples of power functions of $x$?  For the ones that 
can be so rewritten, give
the values of $\alpha$ and $\beta$ from Equation~\eqref{eq:PowerLaw}.
For the ones that are not power functions, explain why they are not.
\vskip 5pt
\begin{enumerate}
\item $\displaystyle{f(x) = \frac{5.4}{x}}$
\vskip 5pt
\item $f(x) = (2.3)\cdot \sqrt[5]{x}$
\vskip 5pt
\item $f(x) = 4x^2 + 4x + 1$
\vskip 5pt
\item $f(x) = \log_{10}(4^{-(x^2)})$
\vskip 5pt
\end{enumerate}
\vskip 5pt
\item Find the equation of the power function $f(x) = \beta\cdot  x^\alpha$ (i.e. the values of $\alpha, \beta$) for which
\begin{enumerate}
\item $f(2) = 4.5$ and $f(4) = 7.9$.
\item $f(2.1) = 3.7$ and $f(2.4) = 3.2$.
\item $f(4.3) = 1$ and $f(7.9) = 2$.  
\end{enumerate}
\vskip 5pt
\item In the previous exercise, you might have noticed that there is also a \emph{straight line}, the graph of a linear function,
passing through the points $(2,4.5)$ and $(4,7.9)$ from part (a) and similarly for the other 
parts.  We saw in the text that some linear functions are also power functions.  But your
answers in the previous exercise are not linear functions.  How can you reconcile this
seeming inconsistency?
\vskip 5pt
\item Given that $f(x) = 3.4 \cdot x^{2.3}$, find the $x$ for which $f(x) = 10$.  Note:  the range of a power function 
for $x \ge 0$ always contains all values $y > 0$ (and $y = 0$ as well, if $\alpha > 0$).  So there must be such an $x$.
\vskip 5pt
\item Given that $f(x) = 7.8 \cdot x^{-4.3}$, find the $x$ for which $f(x) = 10$.  (See note in previous problem.)
\vskip 5pt
\item 
\begin{enumerate}
\item Suppose the log-log plot of a data set ends up lying exactly along a line
$\log_{10}(y) = 3.4\cdot \log_{10}(x) - 7.3$.  What is the relationship between $y$ and $x$ (without the logarithms).
\item Same question, but the line is $\log_{10}(y) = -1.1\cdot \log_{10}(x) + 2.7$.
\end{enumerate}
\vskip 5pt
\item
Enter the data from Table~\ref{MammalianHeartRatesVsBodyMass} into Excel.
\begin{enumerate} 
\item Verify the fit of the power law model given in Example~\ref{BodyMassHeartRate}.  What is the $R^2$
value?  Interpret the information you get from that and explain.
\item What happens if, instead of using the midpoints of the heart rate ranges, you include two
data points for each species, one for the lower boundary of the range, and one for the upper boundary
of the range?  How does the fitted power law model change?
\item What happens if you fit a power law model to the data from Table~\ref{MammalianHeartRatesVsBodyMass}, 
but you think of the heart rate as the independent variable and the body mass as the dependent variable?
What power law model fits that modified data set, and how good is the fit?
\end{enumerate}
\vskip 5pt
\item
Enter the trout mass and length data from Table~\ref{Trout} from Chapter 5 into Excel and verify
the calculations from Example~\ref{TroutExample}.
\vskip 5pt
\item
Using the data from Table~\ref{Trout} from Chapter 5:
\begin{enumerate}
\item Construct a histogram for the trout masses.  State clearly how you are setting up 
the binning scheme.
\item Does a power law distribution apparently fit this data set?  Explain.
\item Construct a histogram for the trout lengths.  Again, clearly describe your binning scheme.
\item How well does a power law distribution apparently fit this data set?  Explain.
\end{enumerate}
\vskip 5pt
\item
\label{ex:AltBinsPowerLaw}  Redo the computations for fitting a power law distribution to the data on Massachusetts
cities and towns from Example~\ref{MassCitiesAndTowns}, but using bins of equal width equal to $40,000$.   The data is
available in an Excel spreadsheet posted on the course homepage.  Note that this
means that a number of bins with zero frequency need to be included before a bin containing the data point
corresponding to Boston is reached.  There will be a number of points in the reverse cumulative frequency versus
bin midpoint data set where the log of the reverse cumulative
frequency is equal to zero.  You should see that the estimated scaling exponent $\alpha$ and the parameter
$\beta$ both change if the computation is done this way.
\vskip 5pt
\item
\label{ex:AltBinsPowerLaw}  Follow the computations for fitting a power law distribution to the data on
populations of cities and towns from Example~\ref{MassCitiesAndTowns} for \emph{your home state}.
If your home state is Massachusetts, use another state(!)  Use the 100 largest cities and towns.  
You will need to find the appropriate census data online, design a binning scheme for the histogram
of populations, and then carry out the computations to see whether a power law distribution
fits your data.  Discuss your results.
\vskip 5pt
\begin{table}[ht]
\renewcommand\arraystretch{1.5}
\caption{The 20 largest tanker oil spills in history, by amount of oil spilled.}
\label{TankerOilSpillData}
\noindent\[
\begin{array}{|c|c|c|}
\hline
{\rm Tanker} & {\rm Year} & {\rm Estimated\ Amount\ (metric\ tons)}\\ 
\hline
{\rm ATLANTIC\ EMPRESS} &1979 & 287,000\\
\hline
{\rm ABT\ SUMMER} & 1991 & 260,000\\
\hline
{\rm CASTILLO\ DE\ BELLVER} & 1983 & 252,000\\
\hline
{\rm AMOCO\ CADIZ} & 1978 & 223,000\\
\hline
{\rm HAVEN} & 1991 & 144,000 \\
\hline
{\rm ODYSSEY} & 1988 & 132,000\\
\hline
{\rm TORREY\ CANYON} &  1967 & 119,000\\
\hline
{\rm SEA\ STAR} & 1972 & 115,000\\
\hline
{\rm IRENES\ SERENADE}  & 1980 & 100,000\\
\hline
{\rm URQUIOLA} & 1976 & 100,000\\
\hline
{\rm HAWAIIAN\ PATRIOT} & 1977 & 95,000\\
\hline
{\rm INDEPENDENTA} & 1979 & 95,000\\
\hline
{\rm JAKOB\ MAERSK} & 1975 & 88,000\\
\hline
{\rm BRAER} & 1993 & 85,000\\
\hline
{\rm AEGEAN\ SEA} & 1992 & 74,000\\
\hline
{\rm SEA\ EMPRESS} & 1996 & 72,000\\
\hline
{\rm KHARK\ 5} & 1989 & 70,000\\
\hline 
{\rm NOVA} & 1985 & 70,000\\
\hline
{\rm KATINA\ P} & 1992 & 67,000\\
\hline
{\rm PRESTIGE} & 2002 &  63,000\\
\hline
\end{array}
\]
\end{table}
\item
The data in Table~\ref{TankerOilSpillData} shows the 20 largest tanker oil spills in history,\footnote{Data from {\tt www.itopf.com}, accessed on
July 7, 2017.  Note:  ITOPF is the International Tanker Owners Pollution Federation, a trade organization of oil tanker owners.  Most
of the data on this site is geared toward showing that oil spills by tankers are becoming less frequent and involve lower amounts spilled, in other
words that the tanker industry's safety record is improving.} ordered
by the amount spilled in metric tons.\footnote{One metric ton $= 1000$ kg, so about 2,200 lb.}  
Note this does not include other oil spills due to drilling accidents, spills by oil transports other 
than sea-going tankers, spills by end-users, etc.  Some of these spills had relatively little environmental
impact because the spill occurred in open ocean, so these might not be so well-known. By the same token, some more well-known spills like the Exxon 
Valdez spill in Alaska in 1989 were actually farther down the list in terms of amount of oil spilled.  But they had
greater environmental impact because of the sensitivity of the habitats where the oil was spilled. \vskip 5pt
\begin{enumerate}
\item Construct a frequency histogram for the numbers of top-20 spills by decade.  When were these large spills most frequent?
Why do you suppose that only one of the largest spills occurred before 1970?  
Does your histogram support the claim that the number of large spills has been decreasing in recent years?  \vskip 5pt
\item Does the amount spilled seem to follow a power law distribution?  What are the 
parameters $\alpha$, and $\beta$ for the best-fitting model? Explain how you
are drawing your conclusions.
\end{enumerate}

\end{enumerate}
\end{xcb}


\endinput