Starting from:

$29.99

ISYE6420 MIDTERM EXAM Solution

ISyE6420
Please show necessary work to get full credit. The exam must be typed in word/latex/RMarkdown and submitted as a pdf file. Please include the WinBugs/R/Python/Matlab codes as separate files.
Name
Problem Quality control Waiting time Casting defects Total
Score /30 /30 /40 /100
1. Quality control. Suppose that 10 products were inspected for the purpose of quality control and none of them were rejected. Answer the following.
1. Find the posterior mean of the probability of rejecting a product (θ). Assume a U(0,1) prior distribution for θ.
2. Find an explicit expression for the (1 − α) equitailed credible interval for θ.
3. Find an explicit expression for the (1 − α) HPD credible interval for θ.
2. Waiting time. The waiting time for a bus at a given corner at a certain time of day is known to have a U(0,θ) distribution. It is desired to test H0 : 0 ≤ θ ≤ 15 versus H1 : θ > 15. From other similar routes, it is known that θ has a Pareto(5,3) distribution. If waiting times of 10,3,2,5, and 14 are observed at the given corner, calculate the posterior odds ratio and the Bayes factor. Which hypothesis would you favor?
Note: the density of a Pareto distribution with parameters (ξ,γ) is given by
.
3. Casting defects. The number of defects in an iron casting can be assumed to follow a Poisson distribution with mean θ. A quality engineer inspected nine castings and observed the following number of defects in them: 0,2,2,3,3,1,2,1,1. Assume that θ has a prior distribution Gamma(2,b), where the hyperparameter b is assumed to have a distribution Exp(1). Use Gibbs sampling to sample from the posterior distribution of θ (generate 100,000 samples and use 1,000 samples as burn-in) and answer the following:
1. Plot the posterior density of θ.
2. Find the posterior mean of θ.
3. Find 95% equitailed credible interval of θ.
Note: the density of a Gamma(a,b) is given by ba/Γ(a)xa−1e−bx and the density of Exp(λ) is given by λe−λx.
2

More products