Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

USING THE DATA ABOVE Problem 7. PENDULUM Consider the \"pendulum\" data of the p

ID: 3249413 • Letter: U

Question

USING THE DATA ABOVE

Problem 7. PENDULUM Consider the "pendulum" data of the periods T (in seconds) of pendulums of length L (n meters) at 74 different locations with acceleration of gravity g (in meters per second square). A link to the data is located at: Find the posterior probabilities of three competing models for explaining T as a function of L and g. Modelo is TN1, i.e. it models Tas a constant independent of Land g. Modell is TN 0 sqrt (L/g) (no intercept) and Model is TNSqrt(L/g). gress) for Modelo,Modell and 1 in The posterior probabilities (with prior B0 Model 2 are: O A. 7.3e 09, 3.4e 02, 5.0e 02 O B. 5.9e 04, 9.6e 01, 3.4e 02 O C. 7.1e 03, 9.4e 01, 9.7e- 01 O D. 7.3e 09, 3.4e 02, 9.7e 01 O E. 7.1e 05, 3.3e 01, 6.6e 01 Answer:

Explanation / Answer

R code

X<-read.csv("a.csv",header = TRUE)


posterior1 <- MCMCregress(TimeSec~1, B0 = 1, data=X,marginal.likelihood="Chib95",mcmc = 100000)
plot(posterior1)
raftery.diag(posterior1)
summary(posterior1)

posterior2 <- MCMCregress(TimeSec~0+sqrt(LengthMt/GravityA),B0 = 1, data=X,marginal.likelihood="Chib95",mcmc = 100000)
plot(posterior2)
raftery.diag(posterior2)
summary(posterior2)
posterior2


posterior3 <- MCMCregress(TimeSec~sqrt(LengthMt/GravityA),B0 = 1, data=X,marginal.likelihood="Chib95",mcmc = 100000)
plot(posterior3)
raftery.diag(posterior3)
summary(posterior3)

  


BF<-BayesFactor(posterior1,posterior2,posterior3)
mod.probs <- PostProbMod(BF)
print(mod.probs)

Answer (A) C

Answer (B) D