Advertisement
Guest User

Untitled

a guest
Nov 21st, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.81 KB | None | 0 0
  1. We perform the paired \(t\)-test comparing whether each person was arrested and whether contraband was found on each person:
  2. ```{r test}
  3. t.test(sqf2010$arstmade,
  4.        sqf2010$contrabn,
  5.        alternative = 'two.sided',
  6.        mu = 0,
  7.        paired = TRUE,
  8.        var.equal = TRUE,
  9.        conf.level = 0.95)
  10. ```
  11. 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