Fitting a line to data with X and Y errors

less than 1 minute read

Published:

I wrote this post as a reference for myself and anyone else looking to determine how to fit a model to data with both x and y uncertainties. Commonly, in Astrophysics even when fitting data with Bayesian inference, x errors are commonly ignored and only y errors are included leading to a significant underestimation of model uncertainty. In this tutorial, I explore this problem with Bilby.

Jupyter notebook to run through the problem here.