Fitting a model to data. Examples from Hogg, Bovy, Lang 2010
This tutorial works through (not yet) all of the examples in the excellent paper by Hogg, Bovy, and Lang (https://arxiv.org/abs/1008.4686) which describes how to properly fit your data to a model (answer: with Bayesian methods). Topics covered (so far) include the standard fit (weighted least squares), why that doesn't work well with outliers, generative models, mixture models, sampling and marginalising using MCMC, uncertainty estimation when the true error bars are unknown.