关键词 > MATH3871/MATH5960
MATH3871/MATH5960 Assignment 2
发布时间:2022-11-11
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
MATH3871/MATH5960
Assignment 2
Questions
1. Archaeology provides a rich source of complex, non-standard problems, where if the prior is available, it needs careful elicitation. Here we look at a data study of the technique of corbelling, a method of roofing spaces with blocks of stone, widely used in prehistory.
For many decades, archaeologists and historians have been fascinated by the ability of prehistoric communities to develop sufficient skills to allow them to construct these domes, some of which have survived for over 4,000 years. These speculations have led to applied mathematical models being developed as an aid to understanding why the domes stand up and how they were constructed.
Consider the simplest of these models
yi = α北i(β)
where y denotes the radius of the dome at which measurements were taken, and 北 is the depth from the apex of the dome to the point at which measurements were taken. It is easier to work with the log linear model
ln yi = ln α + β ln 北i + ei
where ei ~ N (0, σ2 ) are iid error terms.
Below are 24 measurements from the late Minoan tholos dome at Stylos, of Crete in Greece.
北 (depth) 0.04 0.24 0.44 0.64 0.84 1.04 1.24 1.44 1.64 1.84 2.04 2.24 y (radius) 0.40 0.53 0.70 0.90 1.06 1.16 1.26 1.36 1.47 1.62 1.67 1.68 北 (depth) 2.44 2.64 2.84 3.04 3.24 3.44 3.64 3.84 4.04 4.24 4.44 4.64
y (radius) 1.77 1.82 1.89 1.96 2.00 2.05 2.10 2.10 2.14 2.13 2.15 2.14
Table 1: Measurements for the late Minoan tholos at Stylos.
Use the Metropolis-Hastings (M-H) algorithm to compute posterior estimates for the parameters ln(α), β and σ 2 . Code your M-H sampler from scratch in R rather than using in-built packages. In your answer, provide:
(a) specific settings of your M-H algorithm (e.g. chosen proposal q)
(b) The priors chosen, and their justification. Carry out a prior sensitivity analysis (i.e.
assess the sensitivity of your posterior distribution to moderate changes in your prior specification).
(c) The likelihood function.
(d) Results of convergence assessments
(e) Traceplots, density plots of the posterior samples, and a suitable point estimate for
each posterior parameter.
(f) The R code developed (not included in page count)
2. Benford’s law, also called the first-digit law, states that in lists of numbers from many (but not all) real-life sources of data, the leading digit 1 occurs much more often than the others (about 30% of the time). Furthermore, the larger the digit, the less likely it is to occur as the leading digit of a number. The approximate distribution of leading digits (which exclude 0 by definition) is given by:
Probability
4 5 6
Leading Digit 0.301 0.176 0.125 0.097 0.079 0.067 0.058 0.051 0.046
See http://en .wikipedia .org/wiki/Benford%27s law for more information on this phenomenon.
Benford’s law can be used to expose cheating in tax and elections (among other things). Below are counts of the number of polling stations (out of 192) that recorded each leading digit for the number of pro-Hugo Chavez votes cast in a past Venezuelan election.
Number of Voting Stations
1 2 3 4 5 6 7 8
Leading Digit 31 32 29 20 18 18 21 13 10
(a) Assuming a multinomial likelihood and dirichlet prior with parameter vector α = (a1 , . . . , a9 )T , show that the Bayes factor for testing the conjecture that observed counts η = (n1 , . . . , n9 )T are consistent with Benford’s law is given by
B01 =
p0(n)j(←)
where p0 = (p01 , . . . , p09 )T are Benford’s hypothesised proportions and
B(α) = B(a1 , . . . , a9 ) = j(9)=1 Γ(aj )
Γ( j(9)=1 aj ) .
(b) Derive a similar expression for the fractional Bayes factor with training fraction b,
and produce a plot of 0 < b < 1 versus Bayes factor.
(c) Assess the adherance of the Venezuelation election counts to Benford’s law by eval- uating both standard and fractional Bayes factors, and drawing appropriate conclu- sions.
3. Let x1 , . . . , xn be independent binary observations. Under model 1, Pr(xi = 1) = θ with improper prior distribution π(θ) = c1 θ 一1 (1 _ θ)一1 for 0 < θ < 1, while under model 2, Pr(xi = 1) = θ0 , a fixed value. Let r = xi be the number of ones in the data, and suppose that 0 < r < n.
(a) Show that all minimal training samples produce the same partial Bayes factor, and hence that both arithmetic (B12(A)) and geometric (B12(G)) intrinsic Bayes factors take the value
B 12(A) = B 12(G) = B(T, n _ T)θ0(1) 一r (1 _ θ0 )1一n+r ,
where B(p, q) = Γ(p)Γ(q)/Γ(p + q) is the beta function.
(b) Derive the fractional Bayes factor B 12(F) .
(c) Contrast B12(G) and B12(F) in the case θ0 = 0 and T = 1 by evaluating which models each
Bayes factor supports. Are these consistent with each other? Which is correct?