Exercise 1

Consider a random sample $$X_1, X_2, \ldots X_n$$ from a normal distribution with mean $$\mu$$ and variance $$\sigma^2$$.

(a) Calculate a 95% confidence interval if

• $$n = 6$$
• $$\bar{x} = 21.4$$
• $$s^2 = 0.64$$

Solution:

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

$\bar{x} \pm t_{\alpha / 2, n - 1}\frac{s}{\sqrt{n}}$

We have,

• $$n = 6$$,
• $$\bar{x} = 21.4$$,
• $$s = 0.8$$,
• $$1 - \alpha = 0.95$$, so $$\alpha / 2 = 0.025$$,
• $$t_{\alpha / 2, n - 1} = t_{0.025, 5} = 2.571$$.

$21.4 \pm 2.571 \frac{0.8}{\sqrt{6}}$

$\boxed{\bf 21.4 \pm 0.8397}$

$\boxed{\bf (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

• $$n = 12$$
• $$\bar{x} = 5.7$$
• $$s^2 = 9$$

Solution:

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

$\bar{x} \pm t_{\alpha / 2, n - 1}\frac{s}{\sqrt{n}}$

We have,

• $$n = 12$$,
• $$\bar{x} = 5.7$$,
• $$s = 3$$,
• $$1 - \alpha = 0.99$$, so $$\alpha / 2 = 0.005$$,
• $$t_{\alpha / 2}(n - 1) = t_{0.005, 11} = 3.106$$.

$5.7 \pm 3.106 \frac{3}{\sqrt{12}}$

$\boxed{\bf 5.7 \pm 2.690}$

$\boxed{\bf (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

• $$n = 15$$
• $$\bar{x} = 42.1$$
• $$s = 11$$

Solution:

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

$\bar{x} \pm t_{\alpha / 2, n - 1}\frac{s}{\sqrt{n}}$

We have,

• $$n = 15$$,
• $$\bar{x} = 42.1$$,
• $$s = 11$$,
• $$1 - \alpha = 0.90$$, so $$\alpha / 2 = 0.05$$,
• $$t_{\alpha / 2}(n - 1) = t_{0.05, 14} = 1.761$$.

$42.1 \pm 1.761 \frac{11}{\sqrt{15}}$

$\boxed{\bf 42.1 \pm 5.002}$

$\boxed{\bf (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

• $$n = 42$$
• $$\bar{x} = 17.2$$
• $$s = 8$$

Solution:

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

$\bar{x} \pm z_{\alpha / 2}\frac{s}{\sqrt{n}}$

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

We have,

• $$n = 42$$,
• $$\bar{x} = 17.2$$,
• $$s = 8$$,
• $$1 - \alpha = 0.90$$, so $$\alpha / 2 = 0.05$$,
• $$z_{\alpha / 2} = z_{0.05} = 1.645$$.

$17.2 \pm 1.645 \frac{8}{\sqrt{42}}$

$\boxed{\bf 17.2 \pm 2.792}$

$\boxed{\bf (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$$, $$\sigma$$ unknown, and a sample from a normal distribution, so we use the confidence interval

$\bar{x} \pm z_{\alpha / 2}\frac{s}{\sqrt{n}}$

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

We have,

• $$n = 196$$,
• $$\bar{x} = 16.07$$,
• $$s = 0.21$$,
• $$1 - \alpha = 0.95$$, so $$\alpha / 2 = 0.025$$,
• $$z_{\alpha / 2} = z_{0.025} = 1.960$$.

$16.07 \pm 1.960 \frac{0.21}{\sqrt{196}}$

$\boxed{\bf 16.07 \pm 0.02940}$

$\boxed{\bf (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$$, $$\sigma$$ unkown, and a sample from a normal distribution, so we use the confidence interval

$\bar{x} \pm t_{\alpha / 2, n - 1}\frac{s}{\sqrt{n}}$

We have,

• $$n = 25$$,
• $$\bar{x} = 56$$,
• $$s = 8$$,
• $$1 - \alpha = 0.99$$, so $$\alpha / 2 = 0.005$$,
• $$t_{\alpha / 2, n - 1} = t_{0.005, 24} = 2.797$$.

$56 \pm 2.797 \frac{8}{\sqrt{25}}$

$\boxed{\bf 56 \pm 4.475}$

$\boxed{\bf (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 $$\mu$$ and unknown variance $$\sigma^2$$:

$x_1 = 16, \ x_2 = 12, \ x_3 = 18, \ x_4 = 13, \ x_5 = 21, \ x_6 = 15, \ x_7 = 8, \ x_8 = 17$

(a) Construct a 95% confidence interval for $$\mu$$.

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_{\alpha / 2, n - 1} = t_{0.025, 7} = 2.365$

$15 \pm 2.365 \frac{4}{\sqrt{8}}$

$\boxed{15 \pm 3.3446} \text{ or } \boxed{(11.6554, 18.3446)}$

(b) Construct a 90% confidence interval for $$\mu$$.

Solution:

$t_{\alpha / 2, n - 1} = t_{0.05, 7} = 1.895$

$15 \pm 1.895 \frac{4}{\sqrt{8}}$

$\boxed{15 \pm 2.68} \text{ or } \boxed{(12.32 , 17.68)}$

(c) Construct a 99% confidence lower bound for $$\mu$$.

Solution:

$t_{\alpha / 2, n - 1} = t_{0.01, 7} = 2.998$

$15 - 2.998 \frac{4}{\sqrt{8}}$

$\boxed{(10.76 , \infty)}$

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:

$\hat{p} = \frac{x}{n} = \frac{397}{749} = 0.53$

$z_{\alpha/2} = z_{0.05} = 1.645$

$\hat{p} \pm z_{\alpha/2} \sqrt{\frac{\hat{p}(1 - \hat{p})}{n}}$

$0.53 \pm 1.645 \sqrt{\frac{0.53(1 - 0.53)}{749}}$

$\boxed{0.53 \pm 0.03} \text{ or } \boxed{(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:

$\hat{p} = 0.75, \ n = 460$

$z_{\alpha/2} = z_{0.025} = 1.960$

$\hat{p} \pm z_{\alpha/2} \sqrt{\frac{\hat{p}(1 - \hat{p})}{n}}$

$0.75 \pm 1.960 \sqrt{\frac{0.75(1 - 0.75)}{460}}$

$\boxed{0.75 \pm 0.04} \text{ or } \boxed{(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,

$\epsilon= 0.02 \\ z_{\alpha/2} = z_{0.05} = 1.645$

Since we have no prior information, use

$p^{\star} = 0.50$

Then we have

$n = \left\lceil \left( \frac{z_{\alpha/2}}{\epsilon} \right)^2 \cdot p^{\star} \cdot (1 - p^{\star}) \right\rceil = \left\lceil \left( \frac{1.645}{0.02} \right)^2 \cdot 0.50 \cdot (1 - 0.50) \right\rceil = \left\lceil 1691.266 \right\rceil = \boxed{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,

$\epsilon= 0.03 \\ z_{\alpha/2} = z_{0.025} = 1.960$

Since we have no prior information, use

$p^{\star} = 0.50$

Then we have

$n = \left\lceil \left( \frac{z_{\alpha/2}}{\epsilon} \right)^2 \cdot p^{\star} \cdot (1 - p^{\star}) \right\rceil = \left\lceil \left( \frac{1.960}{0.03} \right)^2 \cdot 0.50 \cdot (1 - 0.50) \right\rceil = \left\lceil 1067.1111 \right\rceil = \boxed{1068}$

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

Solution:

Here we have,

$\epsilon= 0.03 \\ z_{\alpha/2} = z_{0.025} = 1.960$

Given the prior information, the worst case scenario is

$p^{\star} = 0.30$

Then we have

$n = \left\lceil \left( \frac{z_{\alpha/2}}{\epsilon} \right)^2 \cdot p^{\star} \cdot (1 - p^{\star}) \right\rceil = \left\lceil \left( \frac{1.960}{0.03} \right)^2 \cdot 0.30 \cdot (1 - 0.30) \right\rceil = \left\lceil 896.3733 \right\rceil = \boxed{897}$

Exercise 9

Consider the following random sample which was obtained from a normal distribution with some unknown mean $$\mu$$ and unknown variance $$\sigma^2$$:

$x_1 = 16, \ x_2 = 12, \ x_3 = 18, \ x_4 = 13, \ x_5 = 21, \ x_6 = 15, \ x_7 = 8, \ x_8 = 17$

(a) Construct a 95% confidence interval for $$\sigma$$.

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

$\left(\sqrt{\frac{(n - 1) \cdot s^2}{\chi_{\alpha / 2, n - 1}^2}}, \sqrt{\frac{(n - 1) \cdot s^2}{\chi_{1 - \alpha / 2, n - 1}^2}} \right)$

• $$n = 8$$,
• $$s = 4$$,
• $$1 - \alpha = 0.95$$, so $$\alpha/2 = 0.025$$, and $$1 - \alpha/2 = 0.975$$
• $$\chi_{\alpha / 2, n - 1}^2 = \chi_{0.025, 7}^2 = 16.01$$.
• $$\chi_{1 - \alpha / 2, n - 1}^2 = \chi_{0.975, 7}^2 = 1.690$$.

$\left( \sqrt{\frac{(8 - 1) \cdot 4^2}{16.01}} , \sqrt{\frac{(8 - 1) \cdot 4^2}{1.690}} \right)$

$\boxed{(2.645, 8.141)}$

(b) Construct a 95% confidence lower bound for $$\sigma$$.

Solution:

$\left(\sqrt{\frac{(n - 1) \cdot s^2}{\chi_{\alpha, n - 1}^2}}, \infty \right)$

• $$n = 8$$,
• $$s = 4$$,
• $$1 - \alpha = 0.95$$, so $$\alpha = 0.05$$
• $$\chi_{\alpha, n - 1}^2 = \chi_{0.05, 7}^2 = 14.07$$.

$\left( \sqrt{\frac{(8 - 1) \cdot 4^2}{14.07}} , \infty \right)$

$\boxed{(2.82, \infty)}$

(c) Construct a 95% confidence upper bound for $$\sigma$$.

Solution:

$\left(0, \sqrt{\frac{(n - 1) \cdot s^2}{\chi_{1 - \alpha, n - 1}^2}} \right)$

• $$n = 8$$,
• $$s = 4$$,
• $$1 - \alpha = 0.95$$, so $$1 - \alpha = 0.95$$
• $$\chi_{1 - \alpha, n - 1}^2 = \chi_{0.95, 7}^2 = 2.167$$.

$\left( 0, \sqrt{\frac{(8 - 1) \cdot 4^2}{2.167}} \right)$

$\boxed{(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.74 - 0.65) \pm 1.96 \sqrt{\frac{(0.74)(1 - 0.74)}{150} + \frac{(0.65)(1 - 0.65)}{120}}$

$\boxed{0.09 \pm 0.11} \text{ or } \boxed{(-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:

$s_p = \sqrt{s_p^2} = \sqrt{\frac{(14 - 1) \cdot 780^2 + (11 - 1) \cdot 750^2}{14 + 11 - 2}} = \sqrt{588,443.47826} = 767.1$

$(\bar{x} - \bar{y}) \pm t_{\alpha / 2, n - 1} \cdot s_p \sqrt{\frac{1}{n_1} + \frac{1}{n_2}}$

$df = 14 + 11 - 2 = 23$

$1 - \alpha = 0.95, \ \alpha/2 = 0.025$

$t_{\alpha / 2, n - 1} = t_{0.025, 23} = 2.069$

$(48530 - 47620) \pm 2.069 \cdot 767.1 \sqrt{\frac{1}{14} + \frac{1}{11}}$

$\boxed{910 \pm 639.47} \text{ or } \boxed{(270.53, 1549.47)}$