Evaluate the posterior density on a two-dimensional grid

Assignment Help Advanced Statistics
Reference no: EM132245725

Question - One important application in remote sensor systems is the localization of a system node based on received signal strength indication (RSSI) measurements. Suppose m stationary nodes equipped with radio signal receivers are deployed in an environment, which is mathematically a region within R2. Suppose an additional mobile node to be localized is equipped with a radio signal transmitter. The strength of the signal (RSSI) received at each stationary node is inversely proportional to the distance between that node and the mobile node (that is, the transmission distance).

The Weibull density is often used to model survival times, and other positive random variables. Parameterizations vary, but it commonly incorporates a shape parameter κ > 0 and scale parameter μ > 0 as follows:

f(z; κ, μ) = κ/μ (z/μ)κ-1 e-(z/μ)κ,  z ≥ 0.

Then suppose Y is an RSSI measurement which is calibrated so that Z = 1/Y has a Weibull distribution where κ = 8.25 and μ is the transmission distance. There are m = 3 stationary nodes, labeled i = 1, 2, 3, located on the two-dimensional deployment region at coordinates (in miles):

(x1, y1) = (-0.50, 0.00)

(x2, y2) = (0.42, 2.00)

(x3, y3) = (1.50, 1.27).

Suppose θ = (θx, θy) is the current location of the mobile node. After transmitting a radio signal, three RSSI measurements (Y1, Y2, Y3) = (0.926, 0.943, 0.787) are collected from the respective stationary nodes. Assume the RSSI measurements are independent.

(a) The object is to construct a Bayesian model for the inference of θ = (θx, θy). For the prior density π(θ), use a uniform distribution over some large enough region containing all nodes. Then accept as the data the reciprocals Z = (Z1, Z2, Z3) = (1/Y1, 1/Y2, 1/Y3). Write explicitly the conditional density of Z given θ, say f(z1, z2, z3 | θ), and then give the posterior density of θ given Z = z, say π(θ | z1, z2, z3). Note that the posterior density need not be normalized.

(b) Evaluate the posterior density on a two-dimensional grid, with x and y coordinates defined as follows

xgrid = seq(-0.7,1.0,0.01)

ygrid = seq(-0.1,1.8,0.01)

That is, π(θ | z1, z2, z3) is evaluated in a rectangle θx ∈  [-0.7, 1.0] and θy ∈ [-0.1, 1.8], with spacing δ = 0.01 between grid points in each axis direction. Use the data given here for the values (z1, z2, z3). Use the persp function to create a 3-dimensional image of this density. Use options theta=0, phi=30.

HINT: In R, densities and distribution functions can usually be evaluated on a logarithmic scale, using the log = TRUE or log.p = TRUE option, as appropriate. This is far preferable for an application like this. A good strategy would be to write a function which evaluates and returns the density on a logarithmic scale, which can later be exponentiated if needed. Again, note that the posterior density need not be normalized.

(c) In this example, the maximum likelihood estimate θ^MLE will be the value of θ which maximizes π(θ|z1, z2, z3) (assuming there is only one global maximum). Why is this the case? Use the grid evaluation of Part (b) to obtain an approximation of θ^MLE. HINT: This can be done with the which function, using the arr.ind = TRUE option.

(d) Create a Hastings-Metropolis algorithm to simulate a sample from π(θ|z1, z2, z3). Implement the following features:

(i) Use as a proposal rule something like theta.new = theta.old + runif(2, -1/10, 1/10). This means the resulting state space is not discrete, but the algorithm will work in much the same way.

Under this proposal rule we can take 1 = Q(θ21)/Q(θ12) when calculating the acceptance probability.

(ii) Allow N = 100, 000 transitions. Capture in a single object all sampled values of θ. You can used θ = (0, 0) as the initial state. HINT: When constructing an MCMC algorithm, rather than calculate a ratio of densities, it is better to calculate a difference Δ in log-densities, and then calculate the exponential function of the difference, that is, eΔ. For this reason, the function constructed in Part (b) should return log-densities.

(e) The posterior density is defined on a two-dimensional plane. There are a number of R functions that can be used to visualize functions or densities defined on R2.

(i) Use the smoothScatter function to plot the sampled θ values (this function is part of the graphics library). Rather than draw a simple scatter plot, this function draws a heat map representation of the sample density. Essentially, a deeper color shade indicates a higher density of sampled points. Use options xlim = c(-1, 1.5),ylim=c(-0.5, 2.1). Include horizontal and vertical axes lines which pass through the origin (0, 0) (you can use the abline function for this). Also indicate the locations of the three stationary nodes (you can use the points function for this). Then indicate the location of θ^MLE, using a distinct symbol for clarity.

(ii) Superimpose on your plot a contour plot of the posterior density evaluated in Part (b). Use the contour function with the add = TRUE option.

(f) One advantage of the use of MCMC sampling to estimate posterior densities is that various forms of inference become easy to implement. For example, suppose there is interest in the distance of the mobile node from the origin (0, 0). Use the MCMC to estimate the posterior density of this distance. This can be done by first transforming the sampled values of θ, then constructing a histogram of these transformed values.

Reference no: EM132245725

Questions Cloud

Complicating factor in the analysis of processes : Which is a complicating factor in the analysis of processes?
Create a workforce that will effectively move : Develop recommendations for strategies to address these challenges and help the newly formed company meet its goals.
What health disparity is the article highlighting : For this assignment, you will select and critique one article from a popular media source (e.g., newspaper, magazine, news journal, etc.)
Discusses several leadership traits relevant to negotiation : Your book discusses several Leadership Traits relevant to negotiations and conflict resolution.
Evaluate the posterior density on a two-dimensional grid : Evaluate the posterior density on a two-dimensional grid, with x and y coordinates defined as follows xgrid = seq(-0.7,1.0,0.01)
Describe the criteria used to define fetal alcohol syndrome : List and briefly describe the four criteria used to define Fetal Alcohol syndrome (FAS). How is FAS related to FASD (Fetal Alcohol Spectrum Disorders).
What dictates international law : What dictates International law? How will globalization affect international law?
Work well after happening initial service failure : Give an example of a service recovery that do not work well after happening an initial service failure.
What is the response the student nurse should give : During Mrs. White's stay in the hospital, a student nurse prepares to provide perineal care. Mrs. White has a urinary catheter in place.

Reviews

Write a Review

Advanced Statistics Questions & Answers

  Relationship between speed, flow and geometry

Write a project proposal on relationship between speed, flow and geometry on single carriageway roads.

  Logistic regression model

Compute the log-odds ratio for each group in Logistic regression model.

  Logistic regression

Foundations of Logistic Regression

  Probability and statistics

The tubes produced by a machine are defective. If six tubes are inspected at random , determine the probability that.

  Solve the linear model

o This is a linear model. If your model needs a different engine, then you need to rethink your approach to the model. Remember, there are no IF, Max, or MIN statements in linear models.

  Plan the analysis

Plan the analysis

  Quantitative analysis

State the hypotheses that you are going to test.

  Modelise as a markov chain

modelise as a markov chain

  Correlation and regression

What are the degrees of freedom for regression

  Construct a frequency distribution for payment method

Construct a frequency distribution for Payment method

  Perform simple linear regression

Perform simple linear regression

  Quality control analysis

Determining the root causes

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd