Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- We perform the paired \(t\)-test comparing whether each person was arrested and whether contraband was found on each person:
- ```{r test}
- t.test(sqf2010$arstmade,
- sqf2010$contrabn,
- alternative = 'two.sided',
- mu = 0,
- paired = TRUE,
- var.equal = TRUE,
- conf.level = 0.95)
- ```
- The results of the test show that the difference in mean *arrest made* and *contraband* variables is around \(0.04884\), with a \(C=95\%\) margin of error around \(0.0006\). As such, the \(P\)-value of the test \(P = 2.2 \times 10^{-16}\) is much smaller than a chosen significance level \(\alpha = 0.05\), and we thus reject the null hypothesis. The data provide strong evidence that there is a clear difference between whether each person is arrested and whether contraband was found on each person.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement