smoking: what about age
It is easier that you might think to fool yourself with data. It is quantified so there is less bias right? This series of videos shows you an analysis using pandas that demonstrates why this might not be true.
It seems that age indeed matters.
(clean_df .assign(r=1) .assign(age=lambda d: np.round(d['age'] / 5) * 5) .groupby(['age']) .agg(p_alive=('alive', np.mean), p_smokes=('smokes', np.mean)) .plot());
Feedback? See an issue? Something unclear? Feel free to mention it here.
If you want to be kept up to date, consider signing up for the newsletter.