In: Statistics and Probability
p = 30% = 0.3, n = 61
(a) Hypothesis test:
Data:
n = 61
p = 0.3
p' = 16/61 = 0.262295082
Hypotheses:
Ho: p = 0.3
Ha: p ≠ 0.3
Decision Rule:
α = 0.05
Lower Critical z- score = -1.9600
Upper Critical z- score = 1.9600
Reject Ho if |z| > 1.9600
Test Statistic:
SE = √{p (1 - p)/n} = √(0.3 * (1 - 0.3)/61) = 0.0587
z = (p'- p)/SE = (0.262295081967213 - 0.3)/0.0586738694038468 = -0.6426
p- value = 0.5205
Decision (in terms of the hypotheses):
Since 0.6426 < 1.9600 we fail to reject Ho
Conclusion (in terms of the problem):
There is no sufficient evidence that the proportion of brown candies is different from 30%
(b) Confidence interval:
n = 61
p = 16/61 = 0.262295082
% = 95
Standard Error, SE = √{p(1 - p)/n} = √(0.262295081967213(1 - 0.262295081967213))/61 = 0.056321148
z- score = 1.959963985
Width of the confidence interval = z * SE = 1.95996398454005 * 0.0563211476374297 = 0.11038742
Lower Limit of the confidence interval = P - width = 0.262295081967213 - 0.110387420937325 = 0.15190766
Upper Limit of the confidence interval = P + width = 0.262295081967213 + 0.110387420937325 = 0.3726825
The confidence interval is [0.152, 0.373]