Welcome to a lesson
on how to conduct a hypothesis test
comparing two independent population proportions.
By conducting a hypothesis test
that compares two independent population proportions,
the following characteristics should be present.
Number one, the two independent samples
are simple random samples that are independent,
two, the number of successes is at least five
and the number of failures is at least five
for each of the samples.
Three, growing literature states that the population must be
at least 10 or 20 times the size of the sample.
This keeps each population from being over sampled
and causing incorrect results.
Comparing two proportions
like comparing two means is common.
If the two estimated proportions are different,
it may be due to a difference in the populations
or it may be due to chance.
A hypothesis test can help determine if a difference
in the estimated proportions reflects a difference
in the population proportions.
The difference of two proportions falls
in approximate normal distribution,
genuinely the null hypothesis states
that the two proportions are the same meaning p sub A
equals p sub B.
To conduct a test, we use a pooled proportion p sub C.
So on this screen, we have the formula
for the pool proportion.
Next, the difference of the proportions
has an approximate normal distribution.
The test statistic is a z-score
and we can calculate the z-score by hand
which we'll see later using this formula here.
Let's take a look at an example.
Two types of medications for hives are being tested
to determine if there is a difference
in the proportions of adult patient reactions.
20 out of a random sample of 200 adults given medication A
still had hives 30 minutes after taking the medication,
12 out of another random sample of 200 adults
giving medication B still add hives 30 minutes
after taking the medication.
Is there a difference in the proportions of adults
who did not react after 30 minutes.
Test at a 1% level of significance.
Let's first state the given information
because 20 out of a random sample of 200 adults
given medication A still had hive after 30 minutes
except A the number of successes is 20 and sub A
the sample size is 200 and therefore
the sample proportion P prime sub A
is equal to 20 divided by 200 or 0.1.
And then for medication B, x sub B is 12, n sub B is 200
and therefore P prime sub B is 0.06.
Because the level of significance is 1%,
alpha is equal to 0.01.
And that because we're testing to see
whether there's a difference in the proportions,
the alternative hypothesis is p sub of A
doesn't equal A p sub B.
And therefore the null hypothesis is the proportions
are equal p sub A equals p sub B.
We can also state the alternative hypothesis
as p sub A minus p sub B doesn't equal zero.
And the null hypothesis as p sub A
minus p sub of B equals zero.
Over here, let's calculate the pooled proportion
which is shown below the pooled portion is equal to 0.08
and one minus that pooled proportion is equal to 0.92.
Next we'll find the z-score and p-value using the TI-84.
So we won't need all the information shown here,
we will though when finding the z-score by hand.
So going to the TI-84,
we press Stat,
right arrow to tests,
select option six, 2 PropZTest,
I've already entered the information here.
X sub one is 20 down, n sub one is 200 down,
x sub two is 12 down, n sub two is 200 down,
we're testing to see whether p sub a
doesn't equal p sub of B.
We select doesn't equal
which I've already done arrow down to calculate,
press Enter.
We have a z-score of approximately 1.4744
and a p-value of approximately 0.1404.
Let's go ahead and record this information.
So look at the distribution shown below.
If the proportions are equal, the difference is zero
which is why we have zero
with the center of the distribution.
The difference of the sample proportions is 0.04
which is why we have 0.04 on the right
and negative 0.04 on the left
and therefore the p-value is the total area
of the shaded region to the right and left
and therefore each area is equal to half of the p-value
which we can see is approximately 0.0702.
So we can also say the p-value is equal to the probability
that the difference of the proportions
is less than or equal to negative 0.04
or greater than or equal to 0.04.
And now take a closer look at determining
the z-score by hand.
if we were going to conduct this test by hand,
we would take the value of alpha of 0.01,
recognize we have a two-tailed test
and determine the corresponding z-scores
which I've already done here.
Notice these scores are 2.58 and negative 2.58.
Next we calculate the z-score using the formula shown here
at the bottom which gives us a z-score
of approximately 1.4744
which matches the value from the TI-84
but notice how this z-score is not in the rejection region.
The z-score would be approximately here
because it's not in the rejection region,
we do not reject the null hypothesis,
but let's also draw the same conclusion
by comparing alpha and the p-value.
Notice how the p-value is high compared to alpha
and when the p-value is high the null must fly
or more formally because the p-value
is greater than alpha or because alpha
is less than the p-value
we do not reject the null hypothesis
which means in conclusion at a 1% level of significance
from the sample data,
there is not sufficient evidence to conclude
that there is a different in the proportions
of adult patients who did not react after 30 minutes
to medication A and medication B.
I hope you found this helpful.