Before it closed, Ron Swanson was a frequent patron of Charles Mulligan’s Steakhouse in Indianapolis, Indiana. Ron enjoyed the experience so much, during each visit he took a picture with his steak.
Ron also weighed each steak he consumed. He has a record of eating six “22 ounce” Charles Mulligan’s porterhouse steaks. Ron found that these six steaks weighed
22.4 oz, 20.8 oz, 21.6 oz, 20.2 oz, 21.4 oz, 22.0 oz
Suppose that “22 ounce” Charles Mulligan’s porterhouse steaks follow a N(μ,σ2) distribution and that Ron’s six steaks were a random sample.
(a) Compute the sample standard deviation, s, of these six steaks. Do not use a computer. You may only use +, −, ×, ÷, and √ on a calculator. Show all work.
Solution:
xi | xi−ˉx | (xi−ˉx)2 |
---|---|---|
22.4 | 1.0 | 1.00 |
20.8 | -0.6 | 0.36 |
21.6 | 0.2 | 0.04 |
20.2 | -1.2 | 1.44 |
21.4 | 0 | 0.00 |
22.0 | 0.6 | 0.36 |
So, we have
n∑i=nxi=128.4
Thus
ˉx=1nn∑i=nxi=16(128.4)=21.4
Note that,
n∑i=n(xi−ˉx)=0.
More importantly,
n∑i=n(xi−ˉx)2=3.2
Thus,
s2=1n−1n∑i=n(xi−ˉx)2=15(3.2)=0.64
Then finally,
s=√s2=√0.64=0.8
x = c(22.4, 20.8, 21.6, 20.2, 21.4, 22.0)
mean(x)
## [1] 21.4
var(x)
## [1] 0.64
sd(x)
## [1] 0.8
(b) Construct a 95% two-sided confidence interval for the true mean weight of a “22 ounce” Charles Mulligan’s porterhouse steak, μ.
Solution:
Here σ is unknown and n is small, so we use t.
ˉx±tα/2(n−1)s√n
We have,
21.4±2.5710.8√6
21.4±0.8397
(20.5603,22.2397)
n = length(x)
est = mean(x)
s = sd(x)
alpha = 0.05
crit = qt(alpha / 2, df = n - 1, lower.tail = FALSE)
se = s / sqrt(n)
margin = crit * se
lower = est - margin
upper = est + margin
c(lower, upper) # above answer contains some rounding, hence the difference
## [1] 20.56045 22.23955
t.test(x, level = 0.95)$conf.int
## [1] 20.56045 22.23955
## attr(,"conf.level")
## [1] 0.95
(c) Construct a 95% confidence lower bound for the true mean weight of a “22 ounce” Charles Mulligan’s porterhouse steak, μ.
Solution:
[ˉx−tα(n−1)s√n,∞)
We have,
21.4−2.01500.8√6=20.7419
[20.7419,∞)
n = length(x)
est = mean(x)
s = sd(x)
alpha = 0.05
crit = qt(alpha, df = n - 1, lower.tail = FALSE)
se = s / sqrt(n)
margin = crit * se
(lower = est - margin)
## [1] 20.74189
(d) Construct a 90% two-sided confidence interval for the true standard deviation of the weight of a “22 ounce” Charles Mulligan’s porterhouse steak, σ.
Solution:
(√(n−1)⋅s2χ2α/2(n−1),√(n−1)⋅s2χ21−α/2(n−1))
(√(6−1)⋅0.8211.07,√(6−1)⋅0.821.145)
(0.5377,1.6718)
n = 6
s = 0.8
alpha = 0.10
crit_lower = qchisq(alpha / 2, df = n - 1, lower.tail = FALSE)
crit_upper = qchisq(1 - alpha / 2, df = n - 1, lower.tail = FALSE)
lower = sqrt((n - 1) * s ^ 2 / crit_lower)
upper = sqrt((n - 1) * s ^ 2 / crit_upper)
c(lower, upper)
## [1] 0.5376398 1.6714060
(e) Construct a 90% confidence upper bound for the true standard deviation of the weight of a “22 ounce” Charles Mulligan’s porterhouse steak, σ.
Solution:
(0,√(n−1)⋅s2χ21−α(n−1))
(0,√(6−1)⋅0.821.610)
(0,1.4098)
n = 6
s = 0.8
alpha = 0.10
crit_upper = qchisq(1 - alpha, df = n - 1, lower.tail = FALSE)
upper = sqrt((n - 1) * s ^ 2 / crit_upper)
c(0, upper)
## [1] 0.00000 1.40968
Last year, ballots in Champaign-Urbana contained the following question to assess public opinion on an issue:
“Should the State of Illinois legalize and regulate the sale and use of marijuana in a similar fashion as the State of Colorado?”
Suppose that we would like to understand Champaign-Urbana’s 2017 opinion on marijuana legalization. To satisfy our curiosity, we obtain a random sample of 120 Champaign-Urbanians and find that 87 support marijuana legalization.
(a) Construct a 99% confidence interval for p, the true proportion of Champaign-Urbanians that support marijuana legalization.
Solution:
ˆp=xn=87120=0.725
ˆp±zα/2√ˆp⋅(1−ˆp)n
0.725±2.576√0.725⋅0.275120
0.725±0.1050
(0.62,0.83)
(b) Suppose that a pollster wants to estimate the true proportion of Champaign-Urbanians that support marijuana legalization to within 0.04, with 95% confidence. How many Champaign-Urbanians should this pollster poll? Assume the pollster has no prior knowledge about the proportion.
Solution:
n=⌈(zα/2ϵ)2⋅ˆp(1−ˆp)⌉=⌈(1.9600.04)2⋅0.50⋅0.50⌉=601
(c) Now assume the pollster believes that support for legalization is somewhere between 65% and 85% and they would like to estimate the true proportion of Champaign-Urbanians that support marijuana legalization to within 0.04, with 90% confidence. How many Champaign-Urbanians should this pollster poll?
Solution:
n=⌈(zα/2ϵ)2⋅˜p(1−˜p)⌉=⌈(1.6450.04)2⋅0.65⋅0.35⌉=385
Suppose students in a Statistics class are interested in the average score of an exam, but the instructor has only graded (a random sample of) 13 of the (many) exams. The instructor states that a 90% confidence interval for the true mean is given by (79.14,82.86) and that you can assume the grades follow a normal distribution.
Using only this information, calculate ˉx, s, and finally, a 95% confidence interval for μ, the true mean of the exam.
Solution:
First, since the interval is symmetric about the sample mean
ˉx=79.14+82.862=81
We can also obtain the margin of error, which is half the length of the interval,
ϵ=82.86−79.142=1.86
The critical value of an 90% confidence interval with 13 observations is
t0.05(12)=1.782
Then solving
1.86=1.782⋅s√13
we find that
s=3.7634.
The critical value of an 95% confidence interval with 13 observations is
t0.025(12)=2.1788
ˉx±tα/2(n−1)s√n
Then a 95% confidence interval is given by
81±2.17883.7634√13
81±2.2742
(78.7258,83.2742)
Suppose that 10 students visit the Stars Hollow Apple Orchard and each pick (a random sample of) 15 Fuji apples, weigh them, then create a 90% confidence interval for the true mean weight of a Fuji apple at the Stars Hollow Apple Orchard. What is the probably that at most 2 of these intervals do not contain the true mean weight of a Fuji apple at the Stars Hollow Apple Orchard?
Since we haven’t actually seen any of the intervals, and assuming they are created with the correct procedure, each has a 90% of containing the true mean, thus they have a 10% chance to not contain the true mean.
Define X to be the number of intervals that do not contain the true mean. Then,
X∼binom(n=10,p=0.10)
So finally we want
P(X≤2)=P(X=0)+P(X=1)+P(X=2)=0.3486784+0.3874205+0.1937102=0.9298092
dbinom(c(0, 1, 2), size = 10, prob = 0.10)
## [1] 0.3486784 0.3874205 0.1937102
sum(dbinom(c(0, 1, 2), size = 10, prob = 0.10))
## [1] 0.9298092
pbinom(2, size = 10, prob = 0.10)
## [1] 0.9298092