Week 3 HW and Presentation Questions

Week 3 HW:

McElreath’s HW Link: https://github.com/rmcelreath/statrethinking_winter2019/blob/master/homework/week03.pdf


Q1. 5M1 - Invent your own example of a spurious correlation. An outcome variable should be correlated with both predictor variables. But when both predictors are entered in the same model, the correlation between the outcome and one of the predictors should mostly vanish (or at least be greatly reduced).
Q2. 5M2 - Invent your own example of a masked relationship. An outcome variable should be correlated with both predictor variables, but in opposite directions. And the two predictor variables should be correlated with one another.
Q3. HW1
Q4. HW2
Q5: HW3

Bonus (Varun will present)
Q6. 6H1: Use the Waffle House data, data(WaffleDivorce), to find the total causal influence of number of Waffle Houses on divorce rate. Justify your model or models with a causal graph.

Discussion order


So as I mentioned in class on Wednesday, we’re not assigning presentations anymore, instead I’ll pick people on the day. This week also doesn’t have any invented questions of mine and instead we’re sticking purely to the textbook.

So do the HW (I’ve edited the post), it’s 5 questions and we’ll present and discuss in class next week.

@sam low, can you PR your HW into my repo? It was pretty good and I think the plots are nice and it’s worth sharing!

Hi @Varun, I got permission denied when pushing my branch in the repo. How can I get access?

Hey Sam,

You’ve already forked so you’ve started well.
Follow these instructions: https://help.github.com/en/articles/changing-a-remotes-url

In particular
Run git remote -v and you should see git@github.com:SamLow/dsairethinking.git or https://github.com/SamLow/dsairethinking.git

If you see nayyarv where SamLow is, you can’t push (since it’s my repo)
You’ll want to run something like (ssh or http depends on your setup)

 git remote set-url origin https://github.com/SamLow/dsairethinking.git

Once you’ve pushed, head to https://github.com/SamLow/dsairethinking and then there should be an option to make a pull request to my repo.
This is what it should look like: https://github.com/nayyarv/dsairethinking/pull/1 when you’ve made the pull request.

Thanks a heap for sharing your code!

Thank you @Varun. That’s right, my remote was not configured correctly. I have created a pull request, please review.


1 Like