Search the whole station

统计计算方法代写 R语言代写 统计作业代写 Bayesian代写

HW 10

统计计算方法代写 Question (7 pts) Recall the Beta distribution, which is defined for θ ∈ (0, 1) with parameters α and β, has a density proportional to:

Question (7 pts) 统计计算方法代写

Recall the Beta distribution, which is defined for θ (0, 1) with parameters α and β, has a density proportional to:

θα1 (1 θ)β1 

The Dirichlet distribution generalizes the the Beta distribution for k such θi values such that P ki=1 θk = 1.

Suppose that X1 counts the number observations of type 1, X2 counts the numbers of observations of type 2, and X3 counts the number of observations of type 3 in a sample (e.g., red, blue, and green cars observed on the highway). We will treat n = X1 + X2 + X3 as fixed, so that our data have a multinomial distribution, which generalizes the binomial distribution. As with the binomial distribution, we can notice that X3 = n X1 X2, and so is redundant.

The probability mass function for a multinomial distribution is proportional to

统计计算方法代写
统计计算方法代写

Part (a) (2 pts)

Consider the Bayesian model:

(θ1, θ2) Dirichlet(δ1, δ2, δ3)

(X1, X2) Multinomial(n, θ1, θ2)

Show that the posterior distribution π(θ1, θ2 | x1, x2) has a Dirichlet distribution with parameters (x1 + δ1, x2 + δ2, n x1 x2 + δ3). (Hint: find something that is proportional to the posterior distribution and argue that the only possible normalizing constant must lead to a Dirichlet distribution with the given parameters.)

Proof:

The posterior distribution of π(θ1, θ2 | x1, x2) can be expressed by:

统计计算方法代写
统计计算方法代写

Therefore the conditional distribution is still a Dirichlet distribution for θ1, θ2 and the parameter is (x1 + δ1, x2 + δ2, n x1 x2 + δ3)

Part (b) (2 pts)

Find the full conditional posteriors (up to a normalizing constant) for θ1 and θ2. Argue that

θ1 | θ2, x1, x2 (1 θ2) Beta(x1 + δ1, n x1 x2 + δ3)

and

θ2 | θ1, x1, x2 (1 θ1) Beta(x2 + δ2, n x1 x2 + δ3)

Hints:

• If X = aY , a > 0, and Y has density f(y), then X has density f(x/a)/a

• As we saw in class, be ruthless in dropping terms that don’t pertain to the main parameter as long as you can maintain proportionality. E.g.

统计计算方法代写
统计计算方法代写

So we can see that this is a scaled Beta distribution:

θ1 | θ2, x1, x2 (1 θ2) Beta(x1 + δ1, n x1 x2 + δ3)

Similarly for θ2, we have:

θ2 | θ1, x1, x2 (1 θ1) Beta(x2 + δ2, n x1 x2 + δ3)

### Part (c) (3 pts)

A recent poll by Morning Consult/Politico asked voters their opinion on whether the Unite States Congress should raise the federal minimum wage.

x_1 <- 806 # Congress should raise to $15/hr 
x_2 <- 435 # Congress should not raise the minium wage 
x_3 <- 586 # Congress should raise to $11/hr 
n <- x_1 + x_2 + x_3

(I have excluded the 8% of the sample with no opinion) 统计计算方法代写

Modeling these results as multinomial, we will investigate the proportions of registered voters holding opinions about the federal minimum wage.

Use the result from part (b) to implement a Gibbs sampler for (θ1, θ2 θ3| x1, x2). Let δ1 = δ2 = δ3 = 1.

Create a chain of length 5000. Using the last 2000 iterations from the chain give estimates of θ1, θ2 and θ3. Also provide 95% credible intervals for each of the parameters (quantiles of the posterior marginal distributions).

Estimate the probability that the $15/hour wage is twice as popular no increase at all (i.e., P(θ12 > 2)).

Question 2 (3 pt) 统计计算方法代写

Read the paper “Less than 2 degree C warming by 2100 unlikely.” Briefly summarize the results (question, data, analysis). Carefully, read the section “Methods: Model Estimation”. Explain how they used their posterior distribution to generate the predictions they used in the paper.

更多代写:CS加拿大网课代上  pte代考靠谱吗  英国宏观经济代上网课  留学研究生英文论文代写  留学生英文 presentation代写  report writing格式

合作平台:essay代写 论文代写 写手招聘 英国留学生代写

The prev: The next:

Related recommendations

1
您有新消息,点击联系!