rmcelreath / stat_rethinking_2022

Statistical Rethinking course winter 2022
4.11k stars 445 forks source link

Question about contrasts and correlation #11

Open rxg opened 2 years ago

rxg commented 2 years ago

Hi, thanks for being willing to help with my question from: https://twitter.com/rg9119/status/1487179286532349952

Here an attempt at Python code to generate a synthetic dataset of height,sex entries from correlated parameters (my impression is you know Python, so hope that's ok!). Based on p. 155 of the book (though partly inspired by Lecture 4 of this term's course.

I'm trying to understand the word of warning from: https://www.youtube.com/watch?v=QiHKdvAbYII&t=1752s

as regards computing contrasts (and plotting their density) when using categorical variables for sex.

I hope my confusion hasn't overcomplicated my question. abc.txt