class: center, middle, inverse, title-slide # Lab 05: Simpson’s Paradox ### 2018-02-15 --- ## Agenda 1. Reminder: Midterm 2. Lab 05: Simpson's Paradox 3. Getting started with lab --- ## Midterm - Midterm due tomorrow, Friday 2/17, at 11:59 p.m. - Late work not accepted for midterms - Can answer clarifying questions only after lab --- ## Lab 05: Simpson's Paradox - The paradox occurs when summary statistics appear to disagree with what is occuring at more fine-grained levels in the data - Particularly misleading in social scientific and medical contexts --- ### Example  --- ### Example Continued Is it possible that treatment A is the better treatment? --- ### Uneven Grouping <img src="img/05/breakdown.png" width="276" /> --- ### Frequencies by Groups  --- ## Lab 05 Do cigarettes improve life expectancy in Britain? --- ## Getting started with lab Start new project and set up git: - Go to the course GitHub organization and find the lab-05 repo that has your team name on it. - On GitHub, click on the green Clone or download button, select Use HTTPS (this might already be selected by default, and if it is, you’ll see the text Clone with HTTPS). Click on the clipboard icon to copy the repo URL. - Go to RStudio Cloud and into the course workspace. Create a New Project from Git Repo. You will need to click on the down arrow next to the New Project button to see this option. - Copy and paste the URL of your assignment repo into the dialog box and hit OK. - Follow the instructions to configure your git credentials. To double check, run the following commands and make sure your info is correct: ``` git config --global user.email git config --global user.name ``` - Install the `tidyverse` package and make sure it's being loaded in your Lab .Rmd.