Homework
7* BMElib*
track:

Mapping using a dataset of hard
data values

Date given: 11/10

Date Due: 12/01 noon

** **

**You are asked to do part 1 and 2 of this homework without help from
classmates or students who have already taken the class. Doing otherwise on
this homework will violate your honor code pledge.**

**Part 1**

Due to a
traffic accident, a truck carrying the toxic agent *A* contaminates a lake in *A* indicates that if *X** _{h}* is the
concentration in the lake and

_{}

There
is no toxic effect on an *n* months old
infant if *x** _{k}*<(

Consider
the situation where you do not have any measurement for *X** _{h}*, and that the age

a.
Indicate what *n*
is in your case.

b.
What is the expected value of *X** _{k}* (i.e. calculate E[

c.
What is the probability that the infant will suffer
from an adverse health effect

(i.e. calculate P[ *X*_{k}* _{
}*> (

d.
Should you request evacuation of the infant?

Now
consider that the concentration measured in the lake is *X** _{h}*=0.1.

e.
What is the expected value of *X** _{k}* given that

f.
What is the probability that the infant will suffer
from an adverse health effect given that *X** _{h}*=0.1

(i.e. calculate P[ *X*_{k}* _{
}*> (

g.
Should you request evacuation of the infant given that *X** _{h}*=0.1?

**Part 2**

Before you start, review the examplesBMEPROBALIB.m program providing a tutorial on using BMElib to obtain the posterior pdf at estimation points using measurements at data points.

Consider the space/time random
field (S/TRF) *X(**p**)*, with ** p**=(

_{},

where *r*
is the spatial lag, *t* is the
temporal lag, and the covariance parameters are *c _{01}*=1.5,

Do you think this field can be
assumed to be homogeneous/stationary, and space/time separable? Justify your answer.

Measurements of hard data values
are available for this S/TRF, as follow

At *p _{1}*

At *p _{2}*

Your task is to use the BME
conceptual framework to provide the mathematical steps to obtain a stochastic
characterization of the S/TFR at the location *p _{k}*

Hints:

- The general knowledge consists in the covariance
equation, and there are 3 mapping points.
Using the prior step of the BME framework, derive the formulae of
the prior PDF, and write down the set of equations used to solve for the
Lagrange coefficient
- The site specific knowledge consists of two hard data
values. Using the posterior step of
the BME analysis, write the formulae of the BME posterior PDF
- For the more advanced students: Using properties of the multivariate Gaussian PDF, provide a closed form formulae for the prior PDF, as well as the posterior PDF, and numerically calculate its moments (i.e. calculate its mean, variance, and skewness using BMEprobaMoments.m).

**Part 3**

Create a directory called hwk7, and from that directory create the following three sub-directories: hwk7\resAlongRiver, hwk7\resMonitoringStation, and hwk7\resValidation

In the hwk7 directory download the following files which perform a BME mapping analysis of surface water Phosphorus data in the Raritan river basin:

analysis.m, estPhosTutorial.m, plotStationTutorial.m, plotMapTutorial.m, raritanmask.m, and raritanbuffer_2.mat

You will also need to add to the following files from the homework with the phosphorus data and the exploratory analysis function:

Raritan_Phos.txt, raritan_river.e00, exploreDataTutorial.m,

as well as the following function from the homework on covariance modeling:

Review the estPhosTutorial.m function, which calculates the BME estimates of phosphorus over space and time. Note that this function has the option to calculate the BME estimate as a function of time for a selected monitoring station and plot the resulting time series using plotStationTutorial.m, or the option to calculate the BME estimate across space for a selected estimation time and plot the resulting map using plotMapTutorial.m and raritanmask.m. Review also the analysis.m function, which calls estPhosTutorial.m to estimate several time series of Phosphorus at a set of pre-selected monitoring stations, and calculates the map of phosphors for pre-selected time instances.

Use the analysis.m function to create time-series and maps of BME estimated phosphorus (i.e. use analysis(1) and analysis(3), respectively). Make sure that you run analysis.m from the hwk7 directory after you have created the sub-directories: hwk7\resAlongRiver, hwk7\resMonitoringStation, and hwk7\resValidation, otherwise you will get an error. The first time you run analysis.m it will take a long moment, but after that the estimation results are stored in the subdirectories, and subsequent runs of analysis will be rapid. Then using the plotStationTutorial.m and plotMapTutorial.m functions explore the time series and maps that you have calculated.

Inspiring yourself from the above analysis of Phosphorus, use a similar approach to improve the estimation mapping analysis of your project dataset. Provide a write up describing your project dataset analysis and the results you obtain, including several time-series and maps of the BME estimates. This write up should be an improvement over the previous homework for the mapping analysis section of your project report.