Processing math: 100%

Exercise 1

Consider a random sample X1,X2,Xn from a normal distribution with mean μ and variance σ2.

(a) Calculate a 95% confidence interval if

Solution:

Here, we have a “small” n, σ unkown, and a sample from a normal distribution, so we use the confidence interval

ˉx±tα/2,n1sn

We have,

21.4±2.5710.86

21.4±0.8397

(20.5603,22.2397)

n = 6
est = 21.4
s = sqrt(0.64)
conf_level = 0.95
alpha = 1 - conf_level
(crit = qt(p = alpha / 2, df = n - 1, lower.tail = FALSE))
## [1] 2.570582
se = s / sqrt(n)
margin = crit * se
# above answer contains some rounding from the t table, hence the difference
c(est = est, margin = margin)
##        est     margin 
## 21.4000000  0.8395485
c(lower = est - margin, upper = est + margin) 
##    lower    upper 
## 20.56045 22.23955

(b) Calculate a 99% confidence interval if

Solution:

Here, we have a “small” n, σ unkown, and a sample from a normal distribution, so we use the confidence interval

ˉx±tα/2,n1sn

We have,

5.7±3.106312

5.7±2.690

(3.010,8.390)

n = 12
est = 5.7
s = sqrt(9)
conf_level = 0.99
alpha = 1 - conf_level
(crit = qt(p = alpha / 2, df = n - 1, lower.tail = FALSE))
## [1] 3.105807
se = s / sqrt(n)
margin = crit * se
# above answer contains some rounding from the t table, hence the difference
c(est = est, margin = margin)
##      est   margin 
## 5.700000 2.689707
c(lower = est - margin, upper = est + margin) 
##    lower    upper 
## 3.010293 8.389707

(c) Calculate a 90% confidence interval if

Solution:

Here, we have a “small” n, σ unkown, and a sample from a normal distribution, so we use the confidence interval

ˉx±tα/2,n1sn

We have,

42.1±1.7611115

42.1±5.002

(37.10,47.10)

n = 15
est = 42.1
s = 11
conf_level = 0.90
alpha = 1 - conf_level
(crit = qt(p = alpha / 2, df = n - 1, lower.tail = FALSE))
## [1] 1.76131
se = s / sqrt(n)
margin = crit * se
# above answer contains some rounding from the t table, hence the difference
c(est = est, margin = margin)
##       est    margin 
## 42.100000  5.002452
c(lower = est - margin, upper = est + margin) 
##    lower    upper 
## 37.09755 47.10245

(d) Calculate a 90% confidence interval if

Solution:

Here, we have a “large” n, σ unkown, and a sample from a normal distribution, so we use the confidence interval

ˉx±zα/2sn

since for “large” n normal is a good approximation of t. (And the availible t table is limited.)

We have,

17.2±1.645842

17.2±2.792

(14.41,19.99)

n = 42
est = 17.2
s = 11
conf_level = 0.90
alpha = 1 - conf_level
(crit = qnorm(p = alpha / 2, lower.tail = FALSE))
## [1] 1.644854
se = s / sqrt(n)
margin = crit * se
# above answer contains some rounding from the t table, hence the difference
c(est = est, margin = margin)
##       est    margin 
## 17.200000  2.791871
c(lower = est - margin, upper = est + margin) 
##    lower    upper 
## 14.40813 19.99187

Exercise 2

Suppose that the amount of cereal dispensed into a box is normally distributed. If the mean amount dispensed in a box is “too small,” then the proportion of “underfilled” boxes (boxes with less than 16 ounces of cereal in them) is too large. However, if the mean is “too large,” then the company loses money “overfilling” the boxes. The CEO of the company that makes Captain Crisp cereal, Mr. Statman, is concerned that the machines that dispense cereal into boxes do not have the proper (“optimal”) setting for the mean amount dispensed. A random sample of 196 boxes was obtained, the sample mean amount of cereal in these 196 boxes was 16.07 ounces, the sample standard deviation was 0.21 ounces.

Construct a 95% confidence interval for the current mean amount of cereal dispensed into a box.

Solution:

Here, we have a “large” n, σ unknown, and a sample from a normal distribution, so we use the confidence interval

ˉx±zα/2sn

since for “large” n normal is a good approximation of t. (And the availible t table is limited.)

We have,

16.07±1.9600.21196

16.07±0.02940

(16.0406,16.0994)

n = 196
est = 16.07
s = 0.21
conf_level = 0.95
alpha = 1 - conf_level
(crit = qnorm(p = alpha / 2, lower.tail = FALSE))
## [1] 1.959964
se = s / sqrt(n)
margin = crit * se
# above answer contains some rounding from the t table, hence the difference
c(est = est, margin = margin)
##         est      margin 
## 16.07000000  0.02939946
c(lower = est - margin, upper = est + margin) 
##   lower   upper 
## 16.0406 16.0994

Exercise 3

In a random sample of 25 direct flights from New York to Boston by Hawk & Hummingbird Airline, the sample mean flight time was 56 minutes and the sample standard deviation was 8 minutes. (Assume the flight times are approximately normally distributed.)

Construct a 99% confidence interval for the overall mean flight time on this route.

Solution:

Here, we have a “small” n, σ unkown, and a sample from a normal distribution, so we use the confidence interval

ˉx±tα/2,n1sn

We have,

56±2.797825

56±4.475

(51.52,60.48)

n = 25
est = 56
s = 8
conf_level = 0.99
alpha = 1 - conf_level
(crit = qt(p = alpha / 2, df = n - 1, lower.tail = FALSE))
## [1] 2.79694
se = s / sqrt(n)
margin = crit * se
# above answer contains some rounding from the t table, hence the difference
c(est = est, margin = margin)
##       est    margin 
## 56.000000  4.475103
c(lower = est - margin, upper = est + margin) 
##   lower   upper 
## 51.5249 60.4751

Exercise 4

Consider the following random sample which was obtained from a normal distribution with some unknown mean μ and unknown variance σ2:

x1=16, x2=12, x3=18, x4=13, x5=21, x6=15, x7=8, x8=17

(a) Construct a 95% confidence interval for μ.

Solution:

x = c(16, 12, 18, 13, 21, 15, 8, 17)
c(sample_mean = mean(x), sample_sd = sd(x))
## sample_mean   sample_sd 
##          15           4

tα/2,n1=t0.025,7=2.365

15±2.36548

15±3.3446 or (11.6554,18.3446)

(b) Construct a 90% confidence interval for μ.

Solution:

tα/2,n1=t0.05,7=1.895

15±1.89548

15±2.68 or (12.32,17.68)

(c) Construct a 99% confidence lower bound for μ.

Solution:

tα/2,n1=t0.01,7=2.998

152.99848

(10.76,)


Exercise 5

Just prior to an important election, in a random sample of 749 voters, 397 preferred Candidate Y over Candidate Z. Construct a 90% confidence interval for the overall proportion of voters who prefer Candidate Y over Candidate Z.

Solution:

ˆp=xn=397749=0.53

zα/2=z0.05=1.645

ˆp±zα/2ˆp(1ˆp)n

0.53±1.6450.53(10.53)749

0.53±0.03 or (0.50,0.56)


Exercise 6

An article on secretaries’ salaries in the Wall Street Journal reports: “Three-fourth of surveyed secretaries said they make less than $25,000 a year.” Suppose that the Journal based its results on a random sample of 460 secretaries drawn from every category of business. Give a 95% confidence interval for the proportion of secretaries earning less than $25,000 a year.

Solution:

ˆp=0.75, n=460

zα/2=z0.025=1.960

ˆp±zα/2ˆp(1ˆp)n

0.75±1.9600.75(10.75)460

0.75±0.04 or (0.71,0.79)


Exercise 7

Find the minimum sample size required for the overall proportion of voters who prefer Candidate Y over Candidate Z to within 2% with 90% confidence. (Assume that no guess as to what that proportion might be is available.)

Solution:

Here we have,

ϵ=0.02zα/2=z0.05=1.645

Since we have no prior information, use

p=0.50

Then we have

n=(zα/2ϵ)2p(1p)=(1.6450.02)20.50(10.50)=1691.266=1692


Exercise 8

A television station wants to estimate the proportion of the viewing audience in its area that watch its evening news. Find the minimum sample size required to estimate that proportion to within 3% with 95% confidence if…

(a) no guess as to the value of that proportion is available.

Solution:

Here we have,

ϵ=0.03zα/2=z0.025=1.960

Since we have no prior information, use

p=0.50

Then we have

n=(zα/2ϵ)2p(1p)=(1.9600.03)20.50(10.50)=1067.1111=1068

(b) it is known that the station’s evening news reaches at most 30% of the viewing audience.

Solution:

Here we have,

ϵ=0.03zα/2=z0.025=1.960

Given the prior information, the worst case scenario is

p=0.30

Then we have

n=(zα/2ϵ)2p(1p)=(1.9600.03)20.30(10.30)=896.3733=897


Exercise 9

Consider the following random sample which was obtained from a normal distribution with some unknown mean μ and unknown variance σ2:

x1=16, x2=12, x3=18, x4=13, x5=21, x6=15, x7=8, x8=17

(a) Construct a 95% confidence interval for σ.

Solution:

x = c(16, 12, 18, 13, 21, 15, 8, 17)
c(sample_mean = mean(x), sample_sd = sd(x))
## sample_mean   sample_sd 
##          15           4

((n1)s2χ2α/2,n1,(n1)s2χ21α/2,n1)

((81)4216.01,(81)421.690)

(2.645,8.141)

(b) Construct a 95% confidence lower bound for σ.

Solution:

((n1)s2χ2α,n1,)

((81)4214.07,)

(2.82,)

(c) Construct a 95% confidence upper bound for σ.

Solution:

(0,(n1)s2χ21α,n1)

(0,(81)422.167)

(0,7.19)


Exercise 10

In a comparative study of two new drugs, A and B, 120 patients were treated with drug A and 150 patients with drug B, and the following results were obtained.

Solution:

(0.740.65)±1.96(0.74)(10.74)150+(0.65)(10.65)120

0.09±0.11 or (0.02,0.20)


Exercise 11

A national equal employment opportunities committee is conducting an investigation to determine if female employees are as well paid as their male counterparts in comparable jobs. Random samples of 14 males and 11 females in junior academic positions are selected, and the following calculations are obtained from their salary data.

Male Female
Sample Mean $48,530 $47,620
Sample Standard Deviation $780 $750

Assume that the populations are normally distributed with equal variances.

Solution:

sp=s2p=(141)7802+(111)750214+112=588,443.47826=767.1

(ˉxˉy)±tα/2,n1sp1n1+1n2

df=14+112=23

1α=0.95, α/2=0.025

tα/2,n1=t0.025,23=2.069

(4853047620)±2.069767.1114+111

910±639.47 or (270.53,1549.47)