Вы находитесь на странице: 1из 2

Soud Khalifa - CIs and hypothesis testing

Confidence Intervals

1. A species of fish has weights distributed according to a normal distribution with standard deviation 50
grams. 25 fish were caught, and the sample mean was found to be 184 grams. Find a 95% confidence
interval for the mean weight of the population. What is the class interval width?

Solution:
For 95% CI, we have = 0.05, and /2 = 0.025. We can use R to find z/2 :
qnorm(0.025, lower.tail = FALSE)
## [1] 1.959964
so 1.96

X
1.96) = 0.95 = P (1.96
P (1.96 /
n
= P (164.4 203.6)

The 95% confidence interval width is


sample above.

2z/2

184
10

1.96) = P (184 1.96 10 184 + 1.96 10)

= 39.2 (Note: this is the same as (203.6 164.4) from the

2. In a survey conducted among 100 students in a university, 67 feel that parking is a problem. Find a 95%
confidence interval of the true proportion of students who feel that parking is a problem.

Solution:
The true proportion of students can be modelled as binomial variable X, with p = 0.67, n = 100.
E[X] = np and V ar[X] = np(1 p). Since n is large, CLT is valid and so the distribution of X is
approximately normal, with mean and variance given by E[X/n] = 1/nE[X] = p and V ar[X/n] =
1/nV ar[X] = p(1 p). For the 95% CI centered around 67%, we use z 2 = 1.96, and the interval is
q
given by p z 2 p(1p)
= (0.67 0.092, 0.67 + 0.092) = (58%, 76%)
n

3. Assume that the sample mean is 5, the sample standard deviation is 2, and the sample size is 20.
Compute the interval for a 95% confidence level.

Solution:
Since the sample size is small, we employ the T-distribution. The 95% confidence interval is given by
x
t/2,n1 sn . Using R, We can calculate the t-statistic as:
n <- 20
tstat <- qt(0.025, lower.tail=FALSE, df=n-1)
tstat
## [1] 2.093024
Therefore, the interval is 5

2.092

20

= (5 0.93, 5 + 0.93) = (4.07, 5.93)

Soud Khalifa - CIs and hypothesis testing

Hypothesis testing

1. Dr. Ruth claims that the average time working mothers spend talking to their children is 11 minutes per
day. Suppose you suspect that that working mothers actually spend more time talking to their children
than that. (a) Set up the null and alternative hypothesis.
Suppose, to investigate the claim, you determine that in a sample of 100 working mothers, the average
time spent talking to their children is 11.5 minutes, and the standard deviation is 2.3 minutes.
(b) Determine the p-value. Would you reject the null hypothesis at a 0.05 significance level?
2. Suppose Cavifree claims their toothpaste is recommended by 4 out of 5 dentists. You suspect the
proportion of recommendations is actually less than their claim. You conduct a survey and determine
that out of the 200 dentists who responded to the survey, 150 recommend Cavifree. At a confidence level
of 0.05, do you have enough evidence to reject their claim?
3. You want to compare the absorbency of two brands of paper towels (call them A and B). You can make
this comparison by measuring the average number of ounces of water each brand absorbs before being
saturated. You select a random sample of 50 towels from each brand, and measure the absorbency. For
brand A, the average number of ounces of water is 3, with a standard deviation of 0.9. For brand B, the
average number of ounces of water is 3.5, with a standard deviation of 1.2 ounces. Can you conclude
that the two brands are equally effective at absorbing liquid or not?

Page 2

Вам также может понравиться