\documentclass[11pt]{article}
\usepackage{color} %used for font color
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage{epsfig}
\topmargin-.5in
\textwidth6.6in
\textheight9in
\oddsidemargin0in
\def\ds{\displaystyle}
\def\d{\partial}
\def\bH{{\bf H}}
\def\bM{{\bf M}}
\def\bB{{\bf B}}
\def\bm{{\bf m}}
\def\bS{{\bf S}}
\def\ve{{\varepsilon}}
%\def\fs{\scriptsize}
\def\fs{\footnotesize}
\def\reals{\mathbb{R}}
\def\complex{\mathbb{C}}
\def\scriptO{{{\it O}\kern -.42em {\it `}\kern + .20em}}

\begin{document}

\centerline{\large \bf Math 540: Project 3}

\bigskip
\noindent
Due Thursday, March 7

\bigskip
\noindent
1. Exercise 7.7.  You should use the sensitivity relations $\frac{\d y}{\d \Phi}$ and $\frac{\d y}{\d h}$, which you computed in Problem~1 of Project 2, to construct your covariance matrix.


\bigskip
\noindent
2. Consider the Helmholtz energy
$$
  \psi(P,q) = \alpha_1 P^2 + \alpha_{11}P^4 + \alpha_{111}P^6,
$$
where $P$ is the polarization on the interval $[0,0.8]$ and $q = [\alpha_1, \alpha_{11}, \alpha_{111}]$ are parameters.  As in Project 2, we will employ the nominal values $\alpha_1 = -389.4, \alpha_{11} = 761.3$ and $\alpha_{111} = 61.5$.

\begin{description}

\item{(a)} For $n = 81, 161$ and $801$ equally spaced polarization values $P_i = (i-1) \Delta P$,$\Delta P = \frac{0.8}{n-1}, i = 1, \ldots, n$,
 compute the model response $\psi(P_i,q)$ and observations 
$$
  \Upsilon_i = \psi(P_i,q) + \varepsilon_i,
$$ 
where $\varepsilon_i  \stackrel{iid}{\sim} {\cal N}(0,\sigma^2)$ with $\sigma = 2.2$.  In each case, compute the OLS estimate for the observation variance $\sigma^2$ and compare it to the true value.  What do you observe?

\item{(b)} For $n=161$, use the normal equations to approximate the parameters and compare to the nominal values.  Compute the covariance matrix estimate $V$ and discuss the correlation of the parameters.  Discuss why global sensitivity methods, with the assumption of mutually independent parameters, may give misleading results as demonstrated in Project 2.  Compute 95\% confidence intervals and plot the residuals and the upper and lower confidence values in one figure.  Do the intervals appear to be correct?  Finally, plot the model and observations as a function of the polarization values.

\end{description}

\bigskip
\noindent
3. Consider the SIR model
$$
\begin{array}{lcl}
  {\ds \frac{d S}{d t} = \delta N - \delta S - \gamma IS} & , & S(0) =  900, \\
  \noalign{\medskip}
  {\ds \frac{d I}{d t} = \gamma IS - (r + \delta) I}  & , & I(0) = 100, \\
  \noalign{\medskip}
  {\ds \frac{d R}{d t} = r I - \delta R} & , & R(0) = 0,
\end{array}
$$
where $\gamma, r$ and $\delta$ are each in the interval $[0,1]$.  The parameter vector is $q = [\gamma, r, \delta]$ 

\begin{description}
 \item{(a)} Use the data in the file \texttt{SIR.txt} to estimate the parameters $q$ using the routine \texttt{fminsearch.m}.  The first column contains times $t_j$ and the second is corresponding values $I(t_j)$.  You can approximate the solution to the ODE system using \texttt{ode45.m}, as you did in Project 2.
 
 \item{(b)} Construct the local sensitivity matrix using either finite-differences or by formulating and numerically solving the sensitivity equations.  Estimate the variance $\sigma^2$ of the observations, compute the covariance matrix $V$, and discuss the parameter correlation.  Is $V$ full rank and are your results to be expected. 
 
 \item{(c)} Using the parameter estimates and variances, use the command \texttt{normpdf.m} to plot the sampling distributions for each of the three parameters.  Additionally, you should plot your residuals, your model fit to the data $I(t_j)$ and the trajectories for $S(t), I(t)$ and $R(t)$. 

\end{description}

\end{document}

