Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

STAT 4198

Homework 5

Spring 2023

1.     A professor wants to know if her introductory statistics class has a good grasp of basic math. Six students are chosen at random from the class and given a math proficiency   test. The professor wants the class to be able to score above 70 on the test. The six students get scores of 92, 62, 95, 69, 82, and 75.

a)    Suppose that the math scores of her students have a Normal(µ, 102) distribution. Use the following uniform prior: define 41 hypotheses where u is 60, 61,  …, 100, and is    equally likely to be any of these values.

i)     Calculate the posterior distribution of u, and plot it.

ii)   What is the mean of the posterior?

iii)  Give a 95% credible interval for u.

iv)  What is the probability that u is greater than 70?

b)    Now suppose that the national average is 75 with standard deviation 15. Repeat part

a) using a Normal(75, 152) prior for u.

2.     Now suppose that the math scores of her students have a Normal(70, 2).  Use the same sample of data from Question 1.

a)    Use the following uniform prior: define 100 hypotheses where  is 1, 2,  …, 100, and is equally likely to be any of these values.

i)     What is the posterior distribution of ? Plot this posterior.

ii)   What is the mean of this posterior distribution?

iii)  Give a 95% credible interval for  .

iv)  What is the probability that  is greater than 10?

b)    Now suppose we put a Gamma(1, 100) prior on T = 1/2 . Repeat part a) using this prior.

3.     Suppose now that the math scores of her students have a Normal(, G 2 ), where both  and G are unknown. Suppose we use a Normal(75, 152) and a Gamma(1, 100) prior for  and T respectively. Use a Gibbs Sampling algorithm to estimate the posterior distributions of and G. For both parameters, use your posterior distributions to answer the following questions:

a)    Use your posterior distribution of to answer the following?

i)     Plot this posterior.

ii)   What is the mean of this posterior distribution?

iii)  Give a 95% credible interval for  .

iv)  What is the probability that  is greater than 70?

b)    Use your posterior distribution of G to answer the following?

i)     Plot this posterior.

ii)   What is the mean of this posterior distribution?

iii)  Give a 95% credible interval for G.

iv)  What is the probability that G is greater than 10?

c)    Use your Gibbs Sampling simulated values to plot the distribution of the class’ math scores. Calculate a 95% credible interval for the scores.