# Confidence Interval Hypothesis Testing for proportion

Question: 75% of population are in favor of a bill. The news reporter is not convinced that the data is accurate. The reporter conducts a field survey and notes that out of 15 people 12 supported the bill. What is the range of the number of supporters in the 15 interviewees that would bolster the reporter's claim at 8% significance level?

Attempt: I am not sure what does the question means by "range of the supporters" that would support the reporter's claim. I did a confidence interval for the proportion $p=0.8$ which you get by $\frac{12}{15}$ at 0.08 significance level. Using Z- value, I got the confidence interval as (0.62, 0.98). Since this is the proportion interval, that amounts to the range of supporters to be (9.3, 14.7). Is this correct?

Let $X$ denote the number of supporters we observe.

A $100(1-\alpha)$% confidence interval for $p$ is given by

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

which gives $(0.5543,0.9457)$ when $\hat{p}=0.75$ and $n=15$

> .75+qnorm(1-.08/2)*sqrt(.75*.25/15)
[1] 0.9457327
> .75+-qnorm(1-.08/2)*sqrt(.75*.25/15)
[1] 0.5542673


Then multiplying by $15$ we get a $(100-\alpha)$% for $X$ as $(8.31,14.19)$ but of course we cannot get $8.31$ supporters so we get a confidence interval of $[8,15]$.

> (.75+qnorm(1-.08/2)*sqrt(.75*.25/15))*15
[1] 14.18599
> (.75-qnorm(1-.08/2)*sqrt(.75*.25/15))*15
[1] 8.31401


We would only reject if $X\leq 7$

However, if we were given a number of supporters $x$, we could use a binomial test to test the null hypothesis, which is more accurate. Given $X\sim \text{binom}(15,0.75)$ we would calculate $P(X=x)$ and add the probabilities for more extreme values (lower probabilities of occurring).

Suppose we observe $8$ supporters. In R statistics software

> binom.test(8,15,.75,alternative="two.sided")

Exact binomial test

data:  8 and 15
number of successes = 8, number of trials = 15, p-value = 0.06998
alternative hypothesis: true probability of success is not equal to 0.75
95 percent confidence interval:
0.2658613 0.7873333
sample estimates:
probability of success
0.5333333


so we would reject if we observed $8$ supporters since the outputted p-value is less than $0.08$

• Why are you taking P_hat = 0.75? Shouldn't you take that to be 0.8 since the reporter does not believe in the 0.75 value and we are looking for the range that supports the reporter's claim? – Dom Apr 3 '18 at 14:22