In: Statistics and Probability
4. Questions A – D require a complete test of hypotheses. Your answer must include: i) null and alternative hypotheses; ii) statement of assumptions; iii) calculation of the test statistic; iv) calculation of the P-value; v) decision in terms of the null hypothesis; and vi) conclusion in the context of the problem.
a) A coffee shop claims that its fresh-brewed drinks have a mean caffeine content of 80 milligrams per five ounces. You work for a city health agency and are asked to test this claim. You find that a random sample of 42 five-ounce servings has a mean caffeine content of 83 milligrams and a standard deviation of 7.5 milligrams. At α = 0.02, do the evidence suggest that the mean caffeine content is in fact different than 80 milligrams per five ounces?
b) In order to study the amounts owed to the city, a city clerk takes a random sample of 16 files from a cabinet containing a large number of delinquent accounts and finds the average amount owed to the city to be $259 with a sample standard deviation of $36. It has been claimed that the true mean amount owed on accounts of this type is greater than $250. If it is appropriate to assume that the amount owed is a normally distributed random variable, test the claim at α = 0.01.
c) An environmental conservation agency recently claimed that more than 30% of Canadian consumers have stopped buying a certain product because the manufacturing of the product pollutes the environment. You want to test this claim. To do so, you randomly select 980 Canadian consumers and find that 314 have stopped buying this product because of pollution concerns. At α = 0.04, can you support the agency’s claim?
d) Refer to question C. Construct a confidence interval for the true proportion of Canadian consumers who have stopped buying the product at the following levels of confidence:
a. 90%
b. 95%
## a) A coffee shop claims that its fresh-brewed drinks have a mean caffeine content of 80 milligrams per five ounces. You work for a city health agency and are asked to test this claim. You find that a random sample of 42 five-ounce servings has a mean caffeine content of 83 milligrams and a standard deviation of 7.5 milligrams. At α = 0.02, do the evidence suggest that the mean caffeine content is in fact different than 80 milligrams per five ounces?
Answer : we have given :
n = sample size = 42
x̄ = sample mean =83
μ = population mean = 80
s = sample standard deviation = 7.5
α = 2 % = 0.02
Claim : do the evidence suggest that the mean caffeine content is in fact different than 80 milligrams per five ounces?
i) null and alternative hypotheses;
Ho : μ = 80 Vs H1 :μ ≠ 80
( it is two tailed test )
ii) statement of assumptions;
# variable follow normal distribution
# population variance is unknown
here we can use one sample t test .
iii) calculation of the test statistic;
t = ( x̄ - μ ) * √n / s
= ( 83 - 80 ) * √ 42 / 7.5
= 2.5922
iv) calculation of the P-value;
degree of freedom = n -1 = 42 -1 = 41
use statistical table : test is two tailed test :
p value = 2 * 0.006578
= 0.01315
v) decision in terms of the null hypothesis;
We reject Ho if p value is less than α value here p value is less than α value ie 0.01315 < 0.02
here we reject Ho
vi) conclusion in the context of the problem.
There is sufficient evidence to conclude that the mean caffeine content is in fact different than 80 milligrams per five ounces .
#### b) In order to study the amounts owed to the city, a city clerk takes a random sample of 16 files from a cabinet containing a large number of delinquent accounts and finds the average amount owed to the city to be $259 with a sample standard deviation of $36. It has been claimed that the true mean amount owed on accounts of this type is greater than $250. If it is appropriate to assume that the amount owed is a normally distributed random variable, test the claim at α = 0.01.
Answer : we have given :
n = sample size = 16
x̄ = sample mean = 259
μ = population mean = 250
s = sample standard deviation = 36
α = 1 % = 0.01
Claim : It has been claimed that the true mean amount owed on accounts of this type is greater than $250.
i) null and alternative hypotheses;
Ho : μ = 250 Vs H1 :μ > 250
( it is one tailed , right tailed test )
ii) statement of assumptions;
# variable follow normal distribution
# population variance is unknown
here we can use one sample t test .
iii) calculation of the test statistic;
t = ( x̄ - μ ) * √n / s
= ( 259 - 250 ) * √ 16 / 36
= 36 / 36 = 1
iv) calculation of the P-value;
degree of freedom = n -1 = 16 -1 = 15
use statistical table : test is one tailed test :
p value = 0.1665
= 0.1665
v) decision in terms of the null hypothesis;
We reject Ho if p value is less than α value here p value is greater than α value ie 0.1665 > 0.01
here we fail to reject Ho
vi) conclusion in the context of the problem.
There is Insufficient evidence to conclude that the true mean amount owed on accounts of this type is greater than $250
( ie true mean amount owed on accounts of this type is equal to $250 )
### c) An environmental conservation agency recently claimed that more than 30% of Canadian consumers have stopped buying a certain product because the manufacturing of the product pollutes the environment. You want to test this claim. To do so, you randomly select 980 Canadian consumers and find that 314 have stopped buying this product because of pollution concerns. At α = 0.04, can you support the agency’s claim?
Answer : we have given :
n = sample size = 980
x = 314 have stopped buying this product
phat = sample proportion = x / n = ( 314 / 980 ) = 0.3204
p = population proportion = 30 % = 0.30
α = 4 % = 0.04
Claim : An environmental conservation agency recently claimed that more than 30% of Canadian consumers have stopped buying a certain product because the manufacturing of the product pollutes the environment
i) null and alternative hypotheses;
Ho : p = 0.30 Vs H1 : p > 0.30
( it is one tailed test , right tailed test )
ii) statement of assumptions;
# variable follow normal distribution
# sample size is too large
here we can use one sample proportion z test .
iii) calculation of the test statistic;
z = ( phat - p ) / √ ( p * (1 - p) / n )
= ( 0.3204 - 0.30 ) / √ ( 0.30 * (1 - 0.30) / 980 )
= 1.3935
iv) calculation of the P-value;
use statistical table : test is two tailed test :
p value = 0.08173
= 0.08173
v) decision in terms of the null hypothesis;
We reject Ho if p value is less than α value here p value is greater than α value ie 0.08173 < 0.04
here we fail to reject Ho
vi) conclusion in the context of the problem.
There is Insufficient evidence to conclude that the more than 30% of Canadian consumers have stopped buying a certain product because the manufacturing of the product pollutes the environment .
### d) Refer to question C. Construct a confidence interval for the true proportion of Canadian consumers who have stopped buying the product at the following levels of confidence:
a. 90%
b. 95%
Answer : here we have to construct confidence interval for the true proportion
for 90 %
p = [ phat ± z critical value * √ (( phat * (1 - phat) / n) ]
here z critical value = ± 1.65 ( from table )
= [ 0.3204 ± 1.65 * √ ((0.3204 * (1 - 0.3204) / 980) ]
= [ 0.3204 ± 1.65 * 0.01490 ]
= [ 0.3204 ± 0.02459 ]
lower limit = 0.3204 - 0.02459 = 0.2958
upper limit = 0.3204 + 0.02459 = 0.3449
We can say 90 % confident that popolation proportion is lies within 0.2958 to 0.3449.
now b ) 95 %
p = [ phat ± z critical value * √ (( phat * (1 - phat) / n) ]
here z critical value = ± 1.96 ( from table )
= [ 0.3204 ± 1.96 * √ ((0.3204 * (1 - 0.3204) / 980) ]
= [ 0.3204 ± 1.96 * 0.01490 ]
= [ 0.3204 ± 0.02920 ]
lower limit = 0.3204 - 0.02920 = 0.2911
upper limit = 0.3204 + 0.02920 = 0.3496
We can say 95 % confident that popolation proportion is lies within 0.2911 to 0.3496.