Starting from:

$30

Bayesian-Homework 1 ABtesting Solved

Data
The data in ‘NFL_pos_spending_2022.csv’ represent positional spending (in millions of dollars) in 2022 based on player salaries in the National Football League (NFL) at various positional groups (e.g., total spending for quarterbacks, running backs / full backs, wide receivers, etc) per team.

For this homework assignment, we seek to infer whether mean spending is greater for the quarterback (QB) position than for the wide receiver (WR) position in the NFL. There is a conventional understanding that the quarterback position is the most important position in American football, but one measure of value is total spending on that position. Keep in mind that there are usually many more WR individuals on a team than QB individuals, thus total spending per position includes the salaries of all individuals who play at that position.

Questions
Prepare a written response to the following, using Overleaf. The assignment shouldn’t be longer than 10 (double-spaced, excluding title page, references, and appendices). Due Thurs., Feb. 3, at the beginning of the class period. Please submit the assignment as a PDF through CANVAS.

1.    Derive the full-conditional distribution for [σ2|y,µ] associated with the NormalNormal-Inverseχ2 model. You will need this for Gibbs sampling.

yi ∼ N(µ,σ2) ,i = 1,...,n , µ ∼ N(µ0,σ02) ,

 −ν/2 σ2 ∼ Inverse.

2.    Construct and use an MCMC algorithm to fit Normal-Normal-Inverseχ2 model to the differences between QB and WR spending to answer the question described in the “Data” section above. Briefly describe the procedure and include the R code as an appendix. Concisely describe the model, including prior specifications, the algorithm, the results (including the number of MCMC iterations, visual inspection of trace plot, burn-in period if necessary, and comment on mixing).

3.    Provide a graphic displaying the marginal posterior distributions for µ and σ2 resulting from the model fit to the data. Report the posterior mean and 95% equal-tailed credible interval for both µ and σ2 in a table.

4.    Use the MCMC output to calculate the posterior probability that the meandifference between QB and WR spending is greater than zero. What can you infer as a result of this analysis?

5.    Would it have been more or less appropriate to obtain our desired inference byfitting the same model to the spending data from each position separately and then comparing the resulting posterior distributions for µ to infer a difference? Why?

References
https://www.spotrac.com/nfl/positional/breakdown/

More products