Search the whole station

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

48

## HW 10

### 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.

The prev:

### Related recommendations

• #### 统计作业代写 Statistic代写 SPSS代写 Problem Sets代写

241

Statistics II: Problem Sets 1 and 2 统计作业代写 Dear Students, Given the current state of affairs, in which we are facing a worldwide pandemic, the traditional methods of evaluation and Ins...

View details
• #### 计量经济作业代写 ECON7310代写 R语言代写 计量经济代写

47

ECON7310: Elements of Econometrics 计量经济作业代写 Instruction Answer all questions following a similar format of the answers to your tutorial questions. When you use R to conduct empirical ...

View details
• #### R作业代写 R语言代写 函数作业代写 方程作业代写 作业代写

29

HW3 R作业代写 1.There is a raging debate among King’s undergraduate students about whether at the end of the first year. BSc Electronic Engineering (EE) students 1. There is a raging deba...

View details
• #### 数学统计作业代写 数学作业代写 统计作业代写 数学代写

37

Homework 3 数学统计作业代写 Instructions: Solve the problems in the spaces provided and save as a single PDF. Then upload the PDF to Canvas Assignments by the due date. Instructions: Solve t...

View details
1