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

Consider the \"pendulum\" data of the periods T (in seconds) of pendulums of len

ID: 3250256 • Letter: C

Question


Consider the "pendulum" data of the periods T (in seconds) of pendulums of length L (in meters) at 74 different locations with acceleration of gravity g (in meters per second square) A link to the data is located at: http://omega. albary.edu:8008/ex4TLg.txt Find the posterior probabilities of three competing models for explaining T as a function of L and g. Model0 is T ~ 1, i e. it models T as a constant independent of L and g. Model1 is T ~ 0 + squareroot (L/g) (no intercept) and Model2 is T ~ squareroot (L/g) The posterior probabilities (with prior B0 = 1 in MCMCregress) for Model0, Model1 and Model2 are: A. 7.3e - 09, 3.4e - 02, 5.0e - 02 B. 5.9e - 04, 9.6e - 01, 3.4e - 02 C. 7.1e - 03, 9.4e - 01, 9.7e - 01 D. 7.3e - 09, 3.4e - 02, 9.7e - 01 E. 7.le - 05, 3.3e - 01, 6.6e - 01

Explanation / Answer

#Load Data into R
data<-read.csv("a.csv",head=T)
#Load package MCMCpack
#Create First Model T~1
Model1<-MCMCregress(data$TimeSec~1, sigma.mu = 0, sigma.var = 1,data = data, mcmc = 10000, b0 = 0, B0 = 1,marginal.likelihood = "Chib95")
#Create Second Model T~0+sqrt(L/g)
Model2<-MCMCregress(data$TimeSec~0+sqrt(data$LengthMt/data$GravityA),sigma.mu = 0, sigma.var = 1, data = data, mcmc = 10000, b0 = 0, B0 = 1,marginal.likelihood = "Chib95")
#Create Third Model T~sqrt(L/g)
Model3<-MCMCregress(data$TimeSec~sqrt(data$LengthMt/data$GravityA), sigma.mu = 0, sigma.var = 1,data = data, mcmc = 10000, b0 = 0, B0 = 1,marginal.likelihood = "Chib95")

BF <- BayesFactor(Model1, Model2, Model3)
mod.probs <- PostProbMod(BF)
mod.probs
  
Using the above R code we see the posterior probability same as given in option D.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote