~Class Meeting  #21-Testing a claim about a proportion




~Note:  Assumptions:

1) the binomial distribution conditions are satisfied (i.e., we have a 2 category situation where there are a fixed number of independent trials with constant probabilities)

2)  np ≥5  and  nq ≥5  so we can use the normal distribution as an approximation to the binomial distribution. This property is based on the symmetry property of a binomial probability histogram.
(No approximation is necessary, if you use the TI-83 or appropiate software)

~Method #1: (Standard method) Checking if the test statistic falls in the rejection region.

1) State H0 and  H1 [i.e., H0: p=po and H1 would be one of the following:
p ≠po (2-tailed), p>po(1-tailed) or p<po(1-tailed)]

2) Decide on a significance level, a (usually .01 or .05) (this will define the rejection region).

3) Find the critical value (z score) for the rejection region used.

4) Compute the value of the test statistic (this is a z score based on your sample).

        Z = ( p cap - p0) / [sqr(p0 q0 / n)], where p cap is from our sample   (we assume that H0 is true)

5) Make your decision: If the value of the test statistic falls in the rejection region, reject H0; otherwise, do not reject H0.

6) State the conclusion in words: Either the sample does not provide sufficient evidence for us to reject or not reject H0. Use the specific words related to your problem by addressing the original claim.


~Method #2:  p-value method: (the TI-83 does all the work) The p-value is the smallest significance level at which we can reject H0.

~If the p-value is less than the significance level, alpha, we reject H0.

~TI-83:  STAT, TESTS, 1-PropZTest (5), enter, p0, x, n, choose H1, calculate. The display will give the p-value. If it is less than alpha, reject H0.

~The p-value is the probability that the z scores are greater than or equal to (or less than or equal to) the test statistic. When the test statistic is in the rejection region, the p value will be less than the significance level & the null hypothesis will be rejected.

~Note: the TI-83 gives the p-value automatically

~Example:  The manufacturer of a patent medicine claimed that it was 90% effective in relieving an allergy for a period of 8 hours.

In a sample of 200 people who had the allergy, the medicine provided relief for 160 people.

Determine whether the manufacturer’s claim is legitimate at the 0.01 level of significance.

~Method #1:  The standard method

1) Ho: p=0.9, the claim is correct
   H1: p< 0.9, the claim is false

2) alpha=0.01 (we choose a 1-tailed test since we have < in H1)

3) Find the critical value (z score) for 0.01 using  invnorm(0.01) = -2.333
                   
4) Compute the test statistic based on our sample:  
 z = ( p cap - p0) / sqr(p0 q0/n) = [(160/200) - .9] /sqr[(.90)(.1)/200]= -4.714

5) Since the test statistic, -4.714, is less than the critical value of -2.333,    
    therefore, it falls into the rejection region for H0.

6) The manufacturer’s claim that the medicine is 90% effective is rejected in favor of the alternate hypothesis.

(there is insufficient evidence to support the claim that the medicine is 90% effective) (best way to state the conclusion)

(there is sufficient evidence to warrant rejection of the claim that the medicine is 90% effective) (another way to state the conclusion)

~Method #2:  p-value method

~TI-83:   STAT, TESTS, 1-PropZTest(5), Enter, po: 0.9, x: 160, n: 200, choose < po, calculate, Enter.

Look for the p-value of .0000012, which is much less than .01, so we reject Ho.

~State the same as in step 6 above.

~Note:  the p-value is the probability that a z score is less than or equal to the test statistic of  -4.714.

~Example:  In a random sample of 125 cola drinkers, 68 said they preferred Coke over Pepsi. Test the claim that 50% of cola drinkers prefer Coke over Pepsi against the alternate hypothesis that more than 50% prefer Coke at the 0.05 level of significance.

~Use the TI-83:     STAT, TESTS, 1-PropZTest(5), Enter, po: 0.5, x: 68, n: 125, >po, Enter, calculate, Enter.                           

The p-value is .1626 which is not less than 0.05, so, there is not enough evidence to reject Ho, at the 0.05 level.

So, it would not be the case , based on our sample, that more than 50% of cola drinkers prefer Coke.

"there is insufficient evidence to conclude that more than 50% of cola drinkers prefer Coke".

~Interesting related example:

How large of a sample is needed for a sample proportion  p = 0.544 to be statistically significant at the 0.05 level for the above problem?

We want to choose n so that the p-value of the test statistic is < or = .05 We need to get the test statistic.

z = (.544 - 0.5)/sqr[(.5)(.5)/n] = .044/sqr(.25/n) = .044/[.5/sqr(n)] = .088sqr(n)

So, we want  P[ z > or =.088sqr(n)] < or = .05.  That will happen when  .088sqr(n) ≥ 1.645 [use Invnorm(.95)].

So, .088sqr(n) ≥ 1.645 gives sqr(n) = 1.645/.088 ≥ 18.69,  so, n ≥ 350 , so, the smallest sample size for a test proportion, p = 0.544 , to be statistically significant at the 0.05 level, is 350.

~beta and the power of a test : See Topics of Interest


.

1)  alpha=P(type I error) (RAT) (rejecting a true null hypothesis)

Using the Coke-Pepsi example above:  Concluding that more than 50% of cola drinkers prefer Pepsi when, in fact, only 50% do.

2)  beta=P(type II error) (AAF) ( accepting (not rejecting) a false null hypothesis)

Using the Coke-Pepsi example above: Concluding that 50% of cola drinkers prefer Pepsi when, in fact, more than 50% do.

3)  beta depends on the decision rule, which, in turn, depends on the sample size n and the significance level alpha.

4)  For a fixed sample size, the smaller the type I error probability, alpha, the larger the type II probability, beta.

5)  Increasing the sample size for a hypothesis test without changing the significance level, alpha, will lower beta.

6)  The Power of a hypothesis test is the probability of rejecting a false null hypothesis (the right decision) (Power=RAF) (i.e., Power=1-beta)

~How to find beta (see Topics of Interest)