In this video, I will be showing examples of how to conduct hypothesis tests for a population
proportion p (or pi).
I will be discussing one-tailed and 2 -tailed tests
using the p-value approach.
Here’s an example of how we state the null and alternative hypothesis for a 2-tailed
test.
H_0 is the null hypothesis which always includes equality and
Ha or H_1 is the alternative hypothesis which never has the equality sign.
The alternative hypothesis includes the not-equal-to sign, which indicates that the proportion
could be greater than or less than 0.4.
Hence the 2-tails.
0.4 here is called the hypothesized value which is often represented as p¬_0.
For one-tailed tests, we could have p “less than” in one case
and p “greater than” in another case This is an example of a lower or left-tailed
test because the alternative has the less-than sign.
And this is for a right tailed test because the alternative hypothesis has the greater
than sign.
For one-tailed tests, some authors write the null hypotheses with pure equality sign just
like the null while others use a sign in the opposite direction
of the alternative along with an equal sign.
That is, for the left-tailed test, the null hypothesis will be written with a greater
or equal sign.
And for the right-tailed test, the null will be written with a less than or equal sign.
So, double-check to see which of these two conventions your course adopts.
We will be using this Z-statistic: where p-hat is the sample proportion,
defined by number of successes x divided by the sample size n.
The denominator is the standard deviation of the sample proportion;
it is also called the standard error of the sample proportion.
In our example here, investors in New IT have a historical success rate of 65%.
In essence, we have a population proportion p, of 0.65.
In a recent poll, a random sample of 250 investors showed that
only 180 were successful.
That means we have a sample size n of 250 and the number of successes x of 180.
The sample proportion, p-hat will thus be 180/250, which gives 0.72.
At α = 0.04, we want to test if there is enough evidence to conclude that the success
rate has changed.
That is, changed or different from 65%.
Therefore, the alternative hypothesis will be p “not equal to” 0.65.
And the null hypothesis is p = 0.65.
Next we can calculate the test statistic by substituting the values into the formula.
And that gives 2.32.
Now then, we can calculate the p-value of this test by finding the area in the tail
beyond this test statistic value under the normal curve.
The p-value is the probability of finding a sample statistic as extreme as we obtained,
given the null hypothesis is true.
Using the “less than” normal probability table,
the area corresponding to 2.3 under 0.02 is 0.9898.
The upper tail area is thus 1 minus 0.9898 which gives 0.0102.
Now, since this is a 2-tailed test, the p-value is obtained by multiplying the
one-tail area by 2.
That is, adding the corresponding lower tail area.
Therefore, we have p-value of 0.0204.
So, what does this tell us?
It tells us that there is only about a 2% chance of obtaining a sample result as extreme
as 180 out of 250 successes, given the true success rate is 65%.
The p-value rule requires us to reject the null hypothesis if the calculated p-value
is less than the significance level alpha.
Since this p-value is less than our alpha of 0.04,
we will reject the null hypothesis and we have enough evidence to conclude that
the population proportion now differs from 0.65
or that the success rate has changed.
Now, suppose instead, we want to test if the success rate has increased, from 65%.
Then the alternative hypothesis becomes p > 0.65.
“Greater” because of the keyword “increased.”
The test statistic will not change, but we now have a one-tailed test.
In particular, a right (or upper) tailed test, and thus, the p-value will be the area to
the right of the test statistic, which is 0.0102.
Now if alpha = 0.04, we will again reject the null hypothesis since this p-value is
less than alpha, and we will conclude that the success rate
has increased.
But if alpha were 0.01, we would fail to reject the null hypothesis
since this p-value will be greater than alpha.
That is, at alpha = 0.01, there is not enough evidence to conclude that the true proportion
is greater than 0.65.
Now, suppose we were to test if the success rate has significantly decreased from historical
values.
Then the alternative hypothesis will be p “<” 0.65 because of the keyword “decreased.”
This will be a left-tailed test.
Therefore, the p-value will be the area to the left of the test statistic, which is 0.9898.
This p-value is much larger than our conventional alpha levels so the null hypothesis will not
be rejected.
It means if H_0 is true, that is the success rate is indeed 65%,
then there’s about 99% chance that we will find less than 180 successes in a sample of
250 investors.
Note however that the typical left-tailed test results more often in a negative test
statistic.
Otherwise, a hypothesis test may not be necessary.
A typical left-tailed example could be the case with
149 successes out of 250, and we want to test if the success rate has
decreased from 65%.
The sample proportion is now 0.596.
Plugging in the values, the test statistic is -1.79
and the less than area is found to be 0.0367.
Since this is a left-tailed test, the P-value is 0.0367,
which is less than the specified alpha of 0.05.
As a result, we will reject the null hypothesis and conclude that the success rate has decreased.
But if alpha were 0.02, P-value will be greater than alpha.
We will not reject the null hypothesis.
We will have insufficient evidence to conclude that the success rate has decreased.
And that’s it.
Thanks for watching.