| tutorial-id |
none |
131-stops |
| name |
question |
Uma Ravat |
| email |
question |
uma.ravat.ucsb@gmail.com |
| introduction-1 |
question |
wisdom justice courage temperace |
| introduction-2 |
question |
done |
| introduction-3 |
question |
done |
| introduction-4 |
question |
done |
| introduction-5 |
question |
This data is from the Stanford Open Policing Project, which aims to improve police accountability and transparency by providing data on traffic stops across the United States. The New Orleans dataset includes detailed information about traffic stops conducted by the New Orleans Police Department. |
| introduction-6 |
question |
difference in two potential outcomes |
| introduction-7 |
question |
you can only observe one pot outcome |
| introduction-8 |
question |
arrested |
| introduction-9 |
question |
body_camera_on = 0 if police doesn't have body camera on during the traffic stop and 1 if yes |
| introduction-10 |
question |
two - yes or no 1 or 0. |
| introduction-11 |
question |
some one who is masked gets arrested (1) and the same person when unmasked doesn't get arrested(0) so the causal effect when wearing a mask as compared to not wearing is 1-0 = 1 |
| introduction-12 |
question |
sex |
| introduction-13 |
question |
black and white may have different number of arrests after stops. |
| introduction-14 |
question |
Is there any difference in number/proportion of arrests amongst different races in the stops dataset? |
| wisdom-1 |
question |
creating the data and preceptor table and verifying assumptions of validity. |
| wisdom-2 |
question |
is the minimal table such that if we had no missing information we could calcualte our quantity of interest. |
| wisdom-3 |
question |
units are people stopped. outcome is whether they were arrested and covariates are their race, age, gender, reason and location or time of day for the stop |
| wisdom-4 |
question |
people stopped |
| wisdom-5 |
question |
arrested |
| wisdom-6 |
question |
race |
| wisdom-7 |
question |
none |
| wisdom-8 |
question |
now |
| wisdom-9 |
question |
above |
| wisdom-10 |
question |
Is there a difference in rate of arrests amongst differnet races |
| wisdom-11 |
question |
Traffic stops often reveal important patterns about interactions between law enforcement and the public, especially regarding characteristics like race and arrest outcomes.
This analysis uses a dataset of nearly 400,000 traffic stops, which includes detailed information on age, race, sex, and arrest status, to explore potential disparities in arrest rates across different groups. |
| justice-1 |
question |
creating the population table and verifying assumptions |
| justice-2 |
question |
correspondence between columns of data and preceptor and that they mean the same thing |
| justice-3 |
question |
One reason the assumption of validity might not hold is if the arrested column contains errors or inconsistencies, such as misreported arrests or missing data, which could bias the analysis. Similarly, if columns like race or age are inaccurately recorded or incomplete, the results may not reliably reflect true patterns. |
| justice-4 |
question |
rows and columns of variables across time. data and preceptor are drawn from it. |
| justice-5 |
question |
stops at all intersections across time and other covariates |
| justice-6 |
question |
relationship between columns of data and population and preceptor are the same |
| justice-7 |
question |
One reason the assumption of stability might not hold is that the patterns in the arrested column or other covariate columns, like race or age, could change over time due to shifts in policing policies or social behavior during the data collection period. This means the relationships observed in the dataset might not be consistent across different time frames. |
| justice-8 |
question |
rows in data and preceptor are randomly drawn. |
| justice-9 |
question |
One reason the assumption of representativeness might not hold is if the stops recorded in the data disproportionately reflect certain zones, times, or demographic groups, meaning the sample columns do not accurately capture the diversity of the overall population of all traffic stops. This could lead to biased conclusions that don’t generalize well beyond the observed data. |
| justice-10 |
question |
One reason the assumption of representativeness might not hold is if the Preceptor Table does not accurately reflect the population because it includes data from a limited time period, specific locations, or particular groups, causing its columns to capture only a subset of the broader population’s characteristics. This mismatch can lead to biased or incomplete inferences when generalizing from the population to the Preceptor Table. |
| justice-11 |
question |
assignment to treatment is independent of outcome and other covarites |
| justice-12 |
question |
done |
| justice-13 |
question |
done |
| justice-14 |
question |
x |
| justice-15 |
question |
x |
| courage-1 |
question |
creating the data generating mech |
| courage-2 |
exercise |
linear_reg(engine = "lm") |
| courage-3 |
exercise |
linear_reg(engine = "lm") |> fit(arrested ~ sex, data = x)
x |
| courage-4 |
exercise |
linear_reg(engine = "lm") |> fit(arrested ~ sex, data = x)|>tidy(conf.int = TRUE) |
| courage-5 |
exercise |
linear_reg(engine = "lm") |> fit(arrested ~ race, data = x)|>tidy(conf.int = TRUE) |
| courage-6 |
exercise |
linear_reg(engine = "lm") |> fit(arrested ~ race, data = x)|>tidy(conf.int = TRUE) |
| courage-7 |
exercise |
linear_reg(engine = "lm") |> fit(arrested ~ sex + race, data = x)|>tidy(conf.int = TRUE) |
| courage-8 |
exercise |
linear_reg(engine = "lm") |> fit(arrested ~ sex + race*zone, data = x)|>tidy(conf.int = TRUE)
table(x$race) |
| courage-9 |
exercise |
fit_stops |
| courage-10 |
question |
x |
| courage-11 |
question |
x |
| courage-12 |
question |
x |
| courage-13 |
question |
x |
| courage-14 |
question |
x |
| courage-15 |
question |
x |
| courage-16 |
exercise |
tidy(fit_stops, conf.int = TRUE) |
| courage-17 |
question |
x |
| courage-18 |
question |
x |
| minutes |
question |
35 |