# Two ways to test a hypothesized proportion against data

I would like to conduct a test whether my hypothesised proportion P (a estimated parameter) is greater or equal to the sample proportion $P_{0}$. The hypothesis is as follows:

\begin{align} H_{0}\!: P \ge P_{0} \\ H_{1}\!: P < P_{0} \end{align}

I believe this is a right-tailed, one-sided hypothesis test, given $H_{0}$. Namely, we are looking whether the result of the test is greater or equal to 95% or 99% ($\alpha = 5\%$ and/or $1\%$).

Let's suppose that my parameter estimate $P$ is 0.15, hence 15% of population fails. The sample has 1000 obs and failures of 16% (160 failures and 840 successes). I could solve it two ways:

1. Build confidence interval around the predicted value $P$ and test whether the $P_{0} = 16\%$ is above the upper bound CI.

In this case the upper CI is, using R:

qbeta(.95, 0.15*1000, 1000-(0.15*1000))
# [1] 0.1689547


Since 16% < then 16.90% we fail to reject the $H_{0}$ hypothesis.

2. The second option is using the pbeta function:

1-pbeta(0.15, 160, 840)
# [1] 0.8045226


Here we have the right tail hypothesis test, where 0.15 is the $P$ estimated parameter (our forecast) and 160 is number of observed failures and 840 successes (1000obs - 160 failures).

With the result of 80.04% and fact that 80.04% < 95% we fail to reject the null hypothesis (hence accept $H_{0}$).

Are the formulations and solutions correct?

• The questio is vague and adds to the confusion. Try to be exact by explaoining after reading of text – Subhash C. Davar Mar 12 '17 at 15:35
• I'm not sure which part of the question is vague or unclear. I have provided formulation and solution, and I would like to have opinion whether its correct or wrong. – Maximilian Mar 12 '17 at 17:12
• I am not sure whether we can postulate a null hypothesis more than or equal tto in the third paragraph. – Subhash C. Davar Mar 12 '17 at 17:51
• well, the hypothesis as it is has been set and fixed by someone else in fact. So I have to find a solution around this hypothesis. – Maximilian Mar 12 '17 at 18:05
• I don't see what is unclear about this question (although it could be cleaned up a bit). Voting to leave open. – Stephan Kolassa May 10 '17 at 8:26