You are on page 1of 38

Chapter Four (continued)

1/38
One Sample Tests For A Proportion

We now consider two tests for a population proportion.


The exact test is based on the binomial distribution while the
approximate test is based on the normal curve.

4.3 Hypothesis Testing (continued) 2/38


Hypotheses

Both tests can be used to test the null hypothesis


H 0 : π = π0
Against one of the following alternatives
H 0 : π < π0
H 0 : π > π0
H0 : π 6= π0
Where π is the proportion of observations in a population that meet
some specified criterion and π0 is the hypothesized proportion for the
same population.

4.3 Hypothesis Testing (continued) 3/38


The Exact Test

Generate the sampling distribution of p̂ by means of the binomial


equation (equation 4.5).1
Use this distribution to formulate p-values or critical values.
Use these values to conduct the test.

1
Or use commonly available tables.
4.3 Hypothesis Testing (continued) 4/38
Some Considerations

Because of the discrete nature of binomial distribution, it is usually


not possible to establish α at any desired level.
The method for calculating p-values for one-tailed tests is
straightforward and well recognized.
Establishing p-values for two-tailed tests is not straightforward and a
number of methods are used.

4.3 Hypothesis Testing (continued) 5/38


One-Tailed p-Values

The p-value for a one-tailed test with alternative of the form


HA : π > π0 is the probability of obtaining a value of p̂ that is greater
than or equal to the value actually observed.
The p-value for a one-tailed test with alternative of the form
HA : π < π0 is the probability of obtaining a value of p̂ that is less
than or equal to the value actually observed.

4.3 Hypothesis Testing (continued) 6/38


Two-Tailed p-Values

The p-value for a two-tailed test with alternative of the form


HA : π 6= π0 is obtained by doubling the one-tailed p-value with the
one-tailed p-value being defined as the smaller of the two tail
probabilities. That is, the smaller of the two probabilities obtained
when the summed probabilities of p̂ values that are less than or equal
to obtained p̂ are compared to those obtained from summing
probabilities of p̂ values that are greater than or equal to obtained p̂.

4.3 Hypothesis Testing (continued) 7/38


Example

Perform the following (exact) hypothesis test using the p-value versus
alpha method.
π = .50 p̂ = 1.0 n=5
π > .50 α = .05
What would the result be if α were set at .01?

4.3 Hypothesis Testing (continued) 8/38


Solution

Because the alternative hypothesis specifies an upper tail test, the


p-value is the probability of obtaining a value of p̂ that is greater than
or equal to the value actually observed.
Because p̂ = 1.0, the p-value is P (5) = .03125 which is less than
α = .05 so that the null hypothesis is rejected.
Had α been set to .01, the null hypothesis would not be rejected
because .03125 > .01.

4.3 Hypothesis Testing (continued) 9/38


Example

Use the binomial probabilities in the table on the next slide to


perform the following hypothesis test. Report results for the p-value
versus alpha method.
π = .50 p̂ = .875 n=8
π 6= .50 α = .10

4.3 Hypothesis Testing (continued) 10/38


Example (continued)

Table: Sampling distributions of p̂ for n = 8 and π = .55.


Number of
Proportion Successes Probability
p̂ y P (y )
.000 0 .00168
.125 1 .01644
.250 2 .07033
.375 3 .17192
.500 4 .26266
.625 5 .25683
.750 6 .15695
.875 7 .05481
1.000 8 .00837

4.3 Hypothesis Testing (continued) 11/38


Solution

The two-tailed p-value is twice the one-tailed p-value or


2 (.00168) = .00336.
Because this is less than α = .05, the null hypothesis is rejected.

4.3 Hypothesis Testing (continued) 12/38


The Approximate Test

The normal curve can be used to approximate the sampling


distribution of p̂ provided the sample size is sufficiently large.
It follows that the normal curve can be used as the basis for
hypothesis tests.
These tests are conducted in a manner similar to that used for the
one mean Z test with the primary difference being that obtained Z is
calculated by
p̂ − π0
Z=q
π0 (1−π0 )
n

4.3 Hypothesis Testing (continued) 13/38


Example

Use the information provided below to perform an approximate test of


the stated null hypothesis.
H0 : π = .20 p̂ = .217 n = 350
HA : π > .20 α = .01
Justify your decision regarding the null hypothesis on the basis of both
the p-value versus alpha and obtained Z versus critical Z methods.

4.3 Hypothesis Testing (continued) 14/38


Solution

Obtained Z is
p̂ − π0 .217 − .200
Z=q = q = .80.
π0 (1−π0 ) (.20)(.80)
n 350

Column three of Appendix A shows that the area above Z = .80 is


.2119. Because this value is greater than α = .01, the null hypothesis
is not rejected.
Column three of the normal curve table also shows that the closest
value to .01 is .0099 which has an associated Z value of 2.33. Thus,
critical Z is 2.33. Because obtained Z of .80 is less than critical Z of
2.33, the null hypothesis is not rejected.

4.3 Hypothesis Testing (continued) 15/38


Assumptions

Exact Test
Success/failure observations are independent.
The exact test is generally not robust against this violation.
Approximate Test
Success/failure observations are independent. (Generally not robust
against violations of this assumption.)
Normality (always violated)
Sample size must be large enough so that the central limit theorem will
act to bring about an approximately normal sampling distribution.

4.3 Hypothesis Testing (continued) 16/38


Equivalence Tests

Equivalence testing is a method of testing rather than a specific


statistical procedure.
Equivalence tests may deal with means, proportions or other
parameters.
Standard hypothesis tests are designed to show what is not ture. For
example, the mean of a population is not 80.
Equivalence tests are designed to show what is true. For example, the
mean of the population is 80 (or approximiately so).

4.3 Hypothesis Testing (continued) 17/38


The Equivalence Interval

The first step in equivalence testing is to define an equivalence


interval (EI ).
The EI is a set of values around µ0 that are sufficiently near µ0 so as
to produce essentially the same result as would be achieved if the
mean were µ0 .
For example, experts might decide that a drug that produces a mean
value between 77.4 and 83.4 would produce essentially the same
medical result as would be obtained if the mean were exactly 80.4.

4.3 Hypothesis Testing (continued) 18/38


Hypotheses For A Two-Tailed Equivalence Test

If we let EIU represent the upper end of EI and EIL the lower end, the
equivalence null hypothesis for the (one mean) two-tailed equivalence
test is
H0E : µ ≤ EIL or µ ≥ EIU
The alternative is
HAE : EIL < µ < EIU
Notice that the null hypothesis states that the population mean is not
in EI while the alternative states that the population mean is in EI .
The null hypothesis, then, is an assertion of non-equivalence while the
alternative asserts equivalence.

4.3 Hypothesis Testing (continued) 19/38


Testing The Equivalence Null Hypothesis

Testing the null hypothesis for a two-tailed equivalence test requires


that two one-tailed tests be conducted.
The null and alternative hypotheses for the two one-tailed tests for
means are as follows
Test One Test Two
H01 : µ = EIU H02 : µ = EIL
HA1 : µ < EIU HA2 : µ > EIL
Both of these tests must be significant in order to reject the
equivalence null hypothesis.

4.3 Hypothesis Testing (continued) 20/38


Example

Use one mean Z tests and the information provided to conduct a


two-tailed equivalence test of the null hypothesis that µ is not in the
EI 77.4 to 83.4. Report results for the p-value versus α method.
x̄ = 82.2 n = 30
σ=8 α = .05

4.3 Hypothesis Testing (continued) 21/38


Solution

The equivalence test is carried out by conducting both of the following


tests.
Test One Test Two
H01 : µ = 83.4 H02 : µ = 77.4
HA1 : µ < 83.4 HA2 : µ > 77.4

4.3 Hypothesis Testing (continued) 22/38


Solution (continued)

For Test One


82.2 − 83.4
Z1 = = −.82
√8
30

For Test Two


82.2 − 77.4
Z2 = = 3.29.
√8
30

Reference to column three of Appendix A shows the respective


p-values to be .2061 and .0005. Because the larger of these is greater
than α = .05, the equivalence null hypothesis is not rejected.

4.3 Hypothesis Testing (continued) 23/38


Hypotheses For A One-Tailed Equivalence Test2 .

If we let EIU represent the upper end of EI and EIL the lower end, the
equivalence null and alternative hypotheses for the (one mean)
one-tailed equivalence test are
H0E : µ ≥ EIU
HAE : µ < EIU
or
H0E : µ ≤ EIL
HAE : µ > EIL
Note that for a one-tailed equivalence test only one of the two null
hypotheses is tested, not both.
Notice that the first null hypothesis maintains that the population
mean is greater than or equal to EIU while the second states that
mean is less than or equal to EIL .
2
One-tailed equivalence tests are more commonly referred to as noninferiority tests
4.3 Hypothesis Testing (continued) 24/38
Testing The One-Tailed Equivalence Null Hypothesis

Testing the null hypothesis for a one-tailed equivalence test requires


that one of the two following one-tailed tests be conducted.
Test One Test Two
H01 : µ = EIU H02 : µ = EIL
HA1 : µ < EIU HA2 : µ > EIL
The test to be conducted depends on the research question addressed
by analysis.

4.3 Hypothesis Testing (continued) 25/38


Example

Use a one mean Z test with the information provided below to


conduct a one-tailed equivalence test of the null hypothesis that µ is
greater than or equal to EIU = .20. Report results for the p-value
versus α.
x̄ = .11 n = 30
σ = .16 α = .05

4.3 Hypothesis Testing (continued) 26/38


Solution

The equivalence test is carried out by conducting Test One as follows.


Test One
H01 : µ = .20
HA1 : µ < 20
For this test
x̄ − µ0 .11 − .20
Z1 = = = −3.08.
√σ .16

n 30

Reference to column three of Appendix A shows the associated


p-value to be .0010. Because this value is less than α = .05, the null
hypothesis of non-equivalence is rejected in favor of the alternative of
equivalence.

4.3 Hypothesis Testing (continued) 27/38


Errors And Correct Decisions

Rejecting a true null hypothesis results in a Type I Error.


Failing to reject a true null hypothesis results in a Correct Decision.
Rejecting a false null hypothesis results in a Correct Decision.
Failing to reject a false null hypothesis results in a Type II Error.

4.3 Hypothesis Testing (continued) 28/38


Errors And Correct Decisions (continued)

The probability that a true null hypothesis will be rejected is termed


alpha and is symbolized by α.
The probability that a true null hypothesis will not be rejected is one
minus alpha or 1 − α.
The probability that a false null hypothesis will be rejected is termed
power and is symbolized by 1 − β.
The probability that a false null hypothesis will not be rejected is
termed beta and is symbolized by β.

4.3 Hypothesis Testing (continued) 29/38


Summary of: Errors And Correct Decisions

The table provided below summarizes the outcomes associated with


hypothesis testing.
The first entry in each cell gives the event while the second gives the
probability that the named event will occur.

Table: Outcomes associated with hypothesis testing.

Null Hypothesis
True False
Type I Error Correct Decision
Reject
(α) (Power)

Fail to Correct Decision Type II Error


Reject (1 − α) (β)

4.3 Hypothesis Testing (continued) 30/38


Probability Of A Type I Error And Correct Decision

Figure: Probability of a Type I error and correct decision for a one-tailed one
mean Z test.
Null Distribution

1−α α

µ0 = µ

4.3 Hypothesis Testing (continued) 31/38


Power And Beta

Figure: Power and beta for a one-tailed one mean Z test.


Null Alternative

beta power

µ0 µ
Fail to Reject H0
Reject H0

4.3 Hypothesis Testing (continued) 32/38


Factors That Determine Power And Beta

Level of significance of the test.


Sample Size (n).
Form of the alternative distribution, i.e. difference between µ and µ0 .

4.3 Hypothesis Testing (continued) 33/38


Sample Size Determination

How many subjects should I have in my study?


There may be practical limitations such as available finances or
number of people with the disease available for study.
The statistical answer for the one mean Z test depends on the
following factors:
The level of significance at which the test is to be conducted.
The desired power of the test.
The minimum difference between µ and µ0 the researcher wishes to
detect.
The variance of the population from which the sample is taken.

4.3 Hypothesis Testing (continued) 34/38


Sample Size Calculation

Calculation of sample size needed for a study is often complex


requiring special software or tables.
Calculation of sample size for the one mean Z test is fairly simple and
is useful for illustrative purposes as the logic carries over to more
complex tests.

4.3 Hypothesis Testing (continued) 35/38


Sample Size Calculation (continued)

Sample size for the one mean Z test is calculated by

σ 2 (Zβ − Zα )2
n=
(µ0 − µ)2

Here we designate critical Z as Zα and the Z score indicating the


distance between µ and the leading edge of the critical region as Zβ .
(See Panel B of Figure 4.25 on text page 134.)

4.3 Hypothesis Testing (continued) 36/38


Example

Calculate the sample size required to attain power of .8 to detect a


population mean of 8 for a two-tailed Z test of the null hypothesis
H0 : µ = 10 conducted at α = .01. Assume that σ = 4.

4.3 Hypothesis Testing (continued) 37/38


Solution

Twenty percent of the normal curve lies above, and 80 percent below,
a Z value of .84. (See Panel B of Figure 4.26 on text page 137.)
Substituting this value for Zβ , and −2.58 for Zα , 10 for µ0 , 8 for µ
and 16 for σ 2 gives the following.

16 (.84 − (−2.58))2
n= = 46.8
(10 − 8)2

4.3 Hypothesis Testing (continued) 38/38

You might also like