https://docs.google.com/spreadsheets/d/11bxYVh9whx_Po-bJhp-yN5-K1X8jNqRfKQD3sNH7
ID: 3312116 • Letter: H
Question
https://docs.google.com/spreadsheets/d/11bxYVh9whx_Po-bJhp-yN5-K1X8jNqRfKQD3sNH73Do/edit?usp=sharing
Among our sample of police incidents, 20 occurred in 2015 in the Tenderloin district. Of these, 8 incidents went unresolved (Resolution = “None”):
1) Use either binom test or pbinom to compute a p-value for testing H0 : p = 0.25 vs. Ha : p > 0.25. What is the p-value? Answer to four significant figures.
2) Consider the times at which the above 20 incidents occurred, by resolution status:
Use the bootstrap with B = 500 to construct a 95% confidence interval for sd of time res
sd of time unres
So that our answers match, first run set.seed(101) to initialize R’s random number
generator.
What is the confidence interval?
i. [0.25,2.08]
ii. [0.91,1.02]
iii. [0.70,1.18]
iv. [0.39,2.37]
b) To test H0 : res = unres vs. Ha : res = unres, carry out a two-sample t-test assuming equal variances; you can use the t.test function with argument var.equal = TRUE. What is the p-value? Answer to four significant figure
c) Make QQ plots for time res and time unres. Based on the plots, which of the following is most reasonable?
i. Both variables are normally distributed.
ii. The time res variable is normally distributed, but time unres is not.
iii. The time unres variable is normally distributed, but time res is not.
iv. Neither variables are normally distributed.
Explanation / Answer
Solving Q1.
Using binom test:
> binom.test(x = 8, n = 20, p = 0.25, alternative = "greater", conf.level = 0.95)
Exact binomial test
data: 8 and 20
number of successes = 8, number of trials = 20, p-value = 0.1018
alternative hypothesis: true probability of success is greater than 0.25
95 percent confidence interval:
0.2170686 1.0000000
sample estimates:
probability of success
0.4
The p-value = 0.1018
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.