

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Statistical Analysis; Subject: Statistics; University: University of Illinois - Urbana-Champaign; Term: Summer 2003;
Typology: Assignments
1 / 3
This page cannot be seen from the preview
Don't miss anything!


9.1 …Is this a fair die? Answer using a significance test with H 0 : pi = 1/6 for each i and HA: pi ≠ 1/6 for at least one i.
Solution
rolls <- c(13, 17, 9, 17, 18, 26) die.prob <- rep((1/6), 6) die.prob [1] 0.1666667 0.1666667 0.1666667 0.1666667 0.1666667 0. chisq.test(rolls, p=die.prob)
Chi-squared test for given probabilities
data: rolls X-squared = 9.68, df = 5, p-value = 0.
The p -value of .08483 is not significant. Therefore, we accept the null hypothesis and that we could not find sufficient evidence for the die being a biased die.
9.5 …Perform a chi-squared goodness-of-fit test to see whether the distibution of vowels appears to be from English.
Solution
count <- c(28, 39, 23, 22, 11) expected <- c(9, 12, 9, 8, 4) prob <- expected/sum(expected) chisq.test(count, p=prob)
Chi-squared test for given probabilities
data: count X-squared = 1.084, df = 4, p-value = 0.
The p -value suggests that we do not reject the null hypothesis and that the paragraph came from the English language.
9.7 The number of murders by day of week in New Jersey during 2003 is shown in Table 9.4.
Solution
H 0 : pi = 1/7 for each i vs. HA: pi ≠ 1/7 for at least one i.
murders <- c(53, 42, 51, 45, 36, 37, 65) murder.prob <- rep((1/7), 7) chisq.test(murders, p=murder.prob)
Chi-squared test for given probabilities
data: murders X-squared = 13.3191, df = 6, p-value = 0.
The p -value of 0.03824 is significant. Therefore, we reject the null hypothesis and we are in favor of the alternative and that a murder is not equally likely to occur on any given day.
H 0 : pi = pj for each i and j such that they both come from the same group, i.e., weekday or weekend vs. HA: pi ≠ pj for at least one i and j such that they both come from the same group.
murders <- c(53, 42, 51, 45, 36, 37, 65) murder.prob2 <- c((murders[1]+murders[7])/(2sum(murders)), rep(sum(murders[2:6])/(5sum(murders)), 5), (murders[1]+murders[7])/(2*sum(murders))) murder.prob [1] 0.1793313 0.1282675 0.1282675 0.1282675 0.1282675 0.1282675 0. sum(murder.prob2) [1] 1 chisq.test(murders, p=murder.prob2)
Chi-squared test for given probabilities
data: murders X-squared = 4.7938, df = 6, p-value = 0.
The p -value is 0.5705, which is not significant. Therefore we accept the null hypothesis and that murders happen on each weekday with equal probability; similarly on the weekends.
9.11 …Do a chi-squared hypothesis test of independence for the two variables.
Solution