0
$\begingroup$

So I have two samples, and it is currently assumed that sample 1 has a higher failure rate than sample 2. I received the data below from experiments:

p1=0.6364, n1=11, p2=0.4444, n2=18

So I constructed a confidence interval using a 5% significance level which yielded -0.114 to 0.498.

So based on this confidence interval, can I conclude that p1 > p2 ?

Is there a better way to verify this claim with the data that I have, I was going to try a one tailed hypothesis test, but I've never done one where the null hypothesis is not p1-p2=0?

Thanks in advance for any help or advice you can provide!

  • 1
    The confidence interval is -0.114 to 0.498. And yes, I tried that, my issue is that my null hypothesis is that p1-p2 > 0 not p1-p2 = 0.2017-02-23
  • 0
    Found the source of my confusion. In the hypothesis test for test statistic Z, in the numerator is (p_hat1 - p_hat2) - (p1-p2) but the second part is often omitted since it is typically zero, but in my case, it will no be zero.2017-02-23
  • 0
    maybe this helps: http://epitools.ausvet.com.au/content.php?page=z-test-2&p1=0.6364&p2=0.4444&n1=11&n2=18&Conf=0.05&tails=1&samples=22017-02-23
  • 0
    This explains how to do what I was trying to do: http://asq.org/quality-progress/2007/02/statistics-roundtable/superiority-equivalence-and-non-inferiority.html2017-02-24

1 Answers 1

0

From Sample 1, you have $X_1 = 7$ failures among $n_1 = 11$ items, and from Sample 2, you have $X_2 = 8$ failures among $n_2 = 18$ items. You wish to test the null hypothesis $H_0: p_1 = p_2$ against the one-sided alternative $H_a: p_1 > p_2$ at the 5% level of significance.

While it is true that estimated failure fraction $\hat p_1 = X_1/n_1 = 0.6364$ from the first sample is greater than the the estimated failure fraction $\hat p_2 = 0.4444$ from the second sample, your question is whether the first estimate is significantly larger in a statistical sense.

Because you are doing a one-sided test, this might be decided by looking at a one-sided 95% confidence interval, but not directly by looking at a two-sided confidence interval. Maybe it is better for you to do a one-sided test.

The test statistic is $$Z = \frac{\hat p_1 - \hat p_2}{\sqrt{\hat p(1- \hat p)/n}},$$ were $n = n_1 + n_2$ and $\hat p = (X_1 + X_2)/n.$ You will reject $H_0$ at the 5% level, if $Z > 1.645.$ [You can find this formula in statistics texts and online at in the NIST Engineering Handbook.]

Here is printout from Minitab 17 statistical software that shows the computation, and provides some additional information.

Test for Two Proportions 

Sample  X   N  Sample p
1       7  11  0.636364
2       8  18  0.444444

Difference = p (1) - p (2)
Estimate for difference:  0.191919
Test for difference = 0 (vs > 0):  Z = 1.00  P-Value = 0.158

Notice that $Z = 1.00 < 1.645,$ so you do not reject $H_0.$ Your data are consistent with equal failure proportions in the two populations. The P-value is $P(Z > 1.00) = 0.158.$ You could have rejected $H_0$ if the P-value were smaller than 5%.

This test uses a normal approximation to the binomial, which may not be exactly accurate for sample sizes as small as $n_1 = 11$ and $n_2 = 18.$ However, the result is nowhere near the 'borderline' between rejecting and not, so an error in the normal approximation is not likely to have made a difference in your decision not to reject.

  • 0
    So this is the hypothesis test that I was trying to avoid. I wanted to test the following: H0 : p1>p2 H1 : p1<=p2 EDIT: I do not think that I can do this hypothesis test without knowing by how much the samples differ for the null hypothesis2017-02-24
  • 0
    But hypothesis test is just what you need to answ your question. (Similar to claiming you'd like to swim, but want to 'avoid' get wet.) Also, you know $\hat p_1 - \hat p_2 \approx .2,$ which with so little data is not enough to claim $p_1 > p_2.$2017-02-24
  • 0
    My issue is that alpha is the probability of making a type one error, and that has to do with your null hypothesis, so your null hypothesis is important and the analysis does need to be different2017-02-26