1

I am trying to do a hypothesis test but I do not know if I am doing the correct steps for this.

I started to define the hypothesis for a binomial proportion $p$ as:

  • H0: A test suite cannot detect more than 0.60 of bugs, $p\leq{0.6}$.

  • H1: A test suite can detect more than 0.60 of bugs, $p>0.6$.

So $p_0= 0.60$ and the observed proportion is $\hat{p} = 0.64$ over $n=50$ trials.

Then I calculated the $Z=(0.64-0.60)/\sqrt{0.60(1-0.60)/50} = 0.577$.

Then, checking the $Z$ table this value corresponds to 0.717. To determine the value of the critical region I just subtract 0.717 to one and I get the p value of 0.282.

So with this results we cannot reject the null hypothesis for a confidence interval of 95%, because 0.282 is more than 0.10.

My doubt is about if the process is correct, because I am not understanding well. How do we check if it is a one tail or two tail test, and if it is the right or left tail?. For example in this case I assume that it was a one-sided right tail test because $H_1$ is $p>0.6$, but I do not know if it is just this that we need to have in consideration. I assume that because $H_!$ is more ($>$) that it should be a right test, and because we do not have the equal ($=$) it is a one-sided test.

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
Chen
  • 53
  • 1
  • 1
  • 5
  • Chen, can you explain your underlying model model more clearly? (You can use [MathJax](http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference), if it helps.) What is your statistic? (the thing that is $\leq{0.6}$ or $>0.6$) What are your observations? ($0.64$?) You know the variance under the null? ($0.6^2$?) There appear to be some missing symbols perhaps? – GeoMatt22 Dec 23 '16 at 02:06
  • Thanks for your answer. The p is 0.6 and phat is 0.64. The n is 50, the number of observations. I will try to put the formulas better. – Chen Dec 23 '16 at 02:08
  • Thank you. This situation is particularly tricky, because you have "p" representing two things: an unknown [binomial proportion](https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval) and *also* a hypothesis-test ["p value"](https://en.wikipedia.org/wiki/P-value). – GeoMatt22 Dec 23 '16 at 02:21
  • Thanks, yes, it is a binomial scenario, a bug is detected or not detected, so I use the formula that is for bionmial distributions. And the phat is the proportion of bugs detected in a experiment, its not a mean. – Chen Dec 23 '16 at 02:33
  • 1
    You have a stray minus sign in the numeric $z$ value (should be $+0.577$), but your [$\Phi$](https://en.wikipedia.org/wiki/Standard_normal_table) value of $72\%$ is OK. So your number $\Pr[z>z_{\mathrm{obs}}\mid{H_0}]=28\%$ is the correct one-sided p-value. So your interpretation seems to be correct. (Did you try drawing a diagram as @Glen_b suggested [here](http://stats.stackexchange.com/a/252656/127790)?) – GeoMatt22 Dec 23 '16 at 02:42
  • 2
    Chen, now that I understand more your question, I lightly edited it. Please revert the edits if I have changed your meaning! – GeoMatt22 Dec 23 '16 at 02:55
  • I don't think things are pinned down enough yet. I think you mean 60% of the bugs.in a computer program. How is a suite of tests performed? What constitutes a success for your binomial sample (maybe a test getting more than 60% of the bugs)? How do you know the binomial is appropriate? If the binomial is appropriate you don't need to use a normal approximation. You can do an exact binomial test. For the normal approximation a continuity correction can be applied for greater accuracy.. – Michael R. Chernick Dec 24 '16 at 19:53
  • If this is a homework or test problem you probably are taking the right approach. But you then need to tag it as self study ad we cannot confirm whether or not you got the right answer. But if you made mistakes we can provide hints. – Michael R. Chernick Dec 24 '16 at 19:58

0 Answers0