Activity 08 – Linear Regression PyMC solved

$35.00

Category: You will receive a download link of the .ZIP file upon Payment

Description

5/5 - (1 vote)

0.1 Activity 09
The file Cepheids_DATA_errMVerrP.csv contains the data for a sample of Cepheids variable stars.
Specifically, the columns in the files are:
• MV: absolute magnitude in the V band
• MV_err: error on the absolute magnitude
• LogP: logarithm of the pulsations period
• LogP_err: error on the logarithm of the period
You want to use these data to estimate the best period-luminosity relation (with associated errorbars) that can then be used to calibrate distances in nearby galaxies.
Using an MCMC software of your choice, write two Bayesian linear regression models, one that
does not include errors and one that includes errors in both x and y. Make sure to organize the
analysis with the 6 steps discussed in class.
Plot the estimated posterior distributions of the parameters of the linear models (marginalizing over
the intrinsic dispersion), and summarize your results with your best estimate for the parameters
and their 95% credibility intervals.
Plot the data and overplot your best-fit line with the 95% credibility region on the data.
1