Question: In this problem, we numerically calculate a posterior distribution. Suppose the stimulus distribution ps ( s ) is Gaussian with mean 2 0 and standard
In this problem, we numerically calculate a posterior distribution. Suppose the stimulus distribution pss is Gaussian with mean and standard deviation The measurement distribution pxsxs is Gaussian with standard deviation sigma A Bayesian observer infers s from an observed measurement Xobs We are now going to calculate the posterior probability density using numerical methods.
We expand on the previous problem by varying the stimulus distribution. Start with the code from the previous problem. Suppose the stimulus distribution pss is uniform on the interval and outside this interval. The measurement distribution pxsxs is Gaussian with standard deviation sigma A Bayesian observer infers s from an observed measurement xobs We are again going to calculate the posterior probability density numerically.
a What is the value of ps on the interval
b Define a vector of hypothesized stimulus values s:
c Compute the likelihood function and the prior on this vector of s values.
d Multiply the likelihood and the prior pointwise.
e Divide this product by its sum over all s normalization step
f Convert this posterior probability mass function into a probability density function by dividing
by the step size you used in your vector of s values eg
g Plot the likelihood, prior, and posterior in the same plot.c Is the posterior Gaussian?
h Numerically calculate the mean of the posterior.
i Numerically calculate the variance of the posterior
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
