You are on page 1of 7

Test of Hypothesis Part 1

A hypothesis is an educated guess. We have encountered this when we studied the Scientific
Method before during our elementary or high school. It is a guess of the outcome that can
happen from our experiment. We need to test whether our hypothesis is correct or not. In
statistics, we can do this using the topics we have learned previously in sampling distributions.
Hypothesis testing is a method that can be used to determine whether a statement about the
value of a population parameter should or should not be rejected.
Take note of the following:
1. We are going to work with population parameters and trying to estimate them.
2. In hypothesis testing, we are using sampling methods to estimate the population
parameter using the sample statistic.
3. Using this, we can determine whether the statement or “assumption” about the
population parameter is correct.
4. Lastly, we are using the notion of “should be rejected” or “should NOT be rejected”.
Note that we will never use the word “accept” in hypothesis testing.
Hypothesis testing can be analogous to the court of law. We will have a defendant which we
will “assume to be innocent” – the hypothesis. Our stance in performing this methodology is we
are the prosecuting lawyers – we want to prove the defendant as guilty. Hence, we will look for
“evidence” to support our side by using sample statistics.
To perform this, we will be following an eight (8) step process. This will be our guide in solving
problems on test of hypothesis. Also, in practice, this will also be what we will be doing as
statisticians in research.
Steps in Testing Hypothesis
1. Establish hypothesis: state the null and alternative hypothesis
2. Determine the appropriate statistical test and sampling distribution
3. Specify the Type I error rate or Level of Significance (α)
4. State the decision rule – calculate the critical values using α
5. Gather sample date – calculate point estimates – 𝑥̅ and s
6. Calculate the value of the test statistic – use the sample point estimates
7. State the statistical conclusion – reject or do not reject the null hypothesis – again
NEVER use the phrase “accept the null hypothesis”
8. Make a managerial decision – statistics provide us the mathematical decisions, but we
need to apply the context of the experiment. What is the purpose of the test?
Null vs Alternative Hypothesis
The null and alternative hypothesis are mutually exclusive. Meaning, only one of them can be
true. That is, if one is correct, the other is wrong.
The null hypothesis is denoted by 𝐻𝑜 and is a tentative assumption about a population
parameter. This is assumed to be true. Note that “assuming to be true” is just analogous to
“innocent until proven guilty”. It does not mean that it is ACTUALLY true. The logic behind null
hypothesis is this is what “THEY WANT”.
The alternative hypothesis is denoted by 𝐻𝑎 and is the opposite of what is stated in the null
hypothesis. The logic behind the alternative hypothesis is this is what “YOU WANT” as a
prosecuting lawyer. This is analogous to proving them guilty.
Example
A soft drink company is filling 12 oz. cans with cola. The company hopes that the cans are
averaging 12 ounces.
We want to develop the null and alternative hypothesis based on this situation. In this case, we
have a company filling soda cans. Remember that in hypothesis testing, we are acting as a 3 rd
party external prosecuting attorney and we ALWAYS want to prove them wrong. Hence, the
null hypothesis will be based on what THEY WANT – what the company wants → their soda
cans are averaging 12 ounces.
𝐻𝑜 : 𝜇 = 12 𝑜𝑧
For the alternative hypothesis, it has to be the opposite of the null hypothesis. Later we will be
talking about one-tailed and two-tailed tests. But for now, we will only get the direct opposite
of equals. Hence, the alternative hypothesis is
𝐻𝑎 : 𝜇 ≠ 12 𝑜𝑧
Why is it not equal to sign? Think. If you are a company producing these soda cans, would you
like to fill in your cans beyond the expected at 12 oz? No! This will equate to losses especially if
we produce tens of thousands of soda cans. On the flip side, we also do not want to fill cans
under 12 oz. This will result to bad quality products and the customers will feel bad about
getting less than what they paid for. Hence, it is absolutely crucial to stay exactly at 12 oz.
As prosecuting lawyers here, we are saying that “no, you are not producing an average of 12
oz”. We do not care whether they fill more or fill less. This is the reason why the alternative
hypothesis is as shown.
Again, in summary, the null and alternative hypothesis are as follows.
𝑯𝒐 : 𝝁 = 𝟏𝟐 𝒐𝒛
𝑯𝒂 : 𝝁 ≠ 𝟏𝟐 𝒐𝒛
Hypothesis testing is similar to a criminal trial. The hypotheses are:
𝑯𝒐 : 𝑻𝒉𝒆 𝒅𝒆𝒇𝒆𝒏𝒅𝒂𝒏𝒕 𝒊𝒔 𝒊𝒏𝒏𝒐𝒄𝒆𝒏𝒕
𝑯𝒂 : 𝑻𝒉𝒆 𝒅𝒆𝒇𝒆𝒏𝒅𝒂𝒏𝒕 𝒊𝒔 𝒈𝒖𝒊𝒍𝒕𝒚
However, always remember that we are a prosecuting lawyer here. Hence, we will NEVER side
with the defendant. In other words, when we do not have enough evidence to prove the
defendant guilty, it does not mean that they are automatically truly innocent. In the court of
law, you can always file another case against the defendant if new evidence arises. This is
exactly the reason why we are only able to say that “we fail to reject the null hypothesis”.
Because at this moment, we do not have enough evidence to prove otherwise. When we say
that “we accept the null hypothesis”, it is incorrect.

Determining the Appropriate Statistical Test and Sampling Distribution


We already discussed the four (4) cases in sampling distributions. Try to recall them.
1. Large samples (n > 30) → Z-test → Normal Distribution
2. Small samples (n < 30) → t-test → Student Distribution
3. Proportions → Z-test for proportions → Normal Distribution
4. Variances → Chi-square test → Chi-square Distribution.
This will still be our basis for determining step 2 in our test of hypothesis.

Specifying Type I Error Rate or Level of Significance (α)


If you can recall, the level of significance ties closely with the confidence level which we use for
determining the confidence intervals.
Usually, it should be noted in the problem what level of significance we will be working with.
However, in practice, we generally do not know directly this. A good rule of thumb is to
assume α = 0.05 or 5% level of significance when it is not given explicitly. This should be
sufficient for a majority of applications. For medical applications or situations that require very
sensitive results, we can actually use α = 0.01 or even less.

Stating the Decision Rule


This step will be based on the set level of significance, α. Try to recall how we explained
confidence intervals in relation to the normal distribution.
The confidence interval gives us a range of values which includes a lower limit and an upper
limit which a given percentage of all values should fall in. If we say that we will have a 5% level
of significance, we immediately have a 95% level of confidence. Hence, the gray region in the
curve should correspond to 95%. Thus, the remaining blue region will be the 5%. Since there
are two blue sides, we can get 𝛼⁄2 for each blue side. Hence, if we have a 5% level of
significance, 𝛼⁄2 = 0.025. If you can recall, this 𝛼⁄2 is equivalent to P(Z) from which we can
determine the standardized statistic 𝑍𝑐𝑟𝑖𝑡 . This will be our “decision rules” Again, we have to
determine 𝑍𝑐𝑟𝑖𝑡 from our level of significance to create a decision rule how to reject or fail to
reject the null hypothesis.

Differentiating Type I and Type II Errors


In criminal trials, there is a small chance that there would be errors in decisions. This can also
happen in tests of hypothesis. Of course, we want to minimize these and avoid them as much
as we can. However, it would be good to discuss the two types of errors that could arise.
1. Type I Error
This occurs when we reject a true null hypothesis.
That is, the assumption about the population parameter is actually correct. However,
our evidence from the sample we obtain shows otherwise. This is analogous to jailing an
innocent person.
The probability of committing a Type I error is called α, the level of significance.
2. Type II Error
This occurs when we fail to reject a false null hypothesis
That is, the assumption about the population parameter is actually wrong. However, our
evidence from the sample we obtain shows otherwise. This is analogous to freeing a
criminal
The probability of committing a Type II error is called β.
Just know that (1 − 𝛽) is called Power of the Test. This will be outside of our scope and
will not be discussed further.

Gathering Sample Data


You might be wondering, we did so much already prior and only now is the appropriate time to
gather the data and perform the experiments? The answer is YES! This is the correct way to set
up a scientific experiment. By setting our hypothesis first and understanding what we have to
do to test it, we will minimize our biases in testing. Also, we should not change our decision
rules, level of significance, etc. after the fact. This is bad practice of applying statistics in
research and experimentation.
During this step, we will have raw data obtained from measurements during experimentation.
This is a sample we obtain to estimate the population parameter as claimed by the null
hypothesis. Hence, we need to calculate the sample statistic and other point estimates such as
sample mean, sample standard deviation. We will use these values for the next step in our test
of hypothesis.
Calculating the Test Statistic
This will depend on what test we are performing – based on the four (4) cases for large sample,
small sample, proportions, and variances.
For Case 1: Large Samples and Normal Distribution
𝑥̅ − 𝜇
𝑧𝑠𝑡𝑎𝑡 = 𝜎
⁄ 𝑛

For Case 2: Small Samples and Student Distribution
𝑥̅ − 𝜇
𝑡𝑠𝑡𝑎𝑡 = 𝑠
⁄ 𝑛

For Case 3: Large Samples and Normal Distribution


𝑝̂ − 𝑝
𝑧𝑠𝑡𝑎𝑡 =
√𝑝𝑞⁄
√𝑛

For Case 4: Large Samples and Normal Distribution

2
(𝑛 − 1)𝑠 2
𝜒 𝑠𝑡𝑎𝑡
=
𝜎2

State the Statistical Conclusion


This is where we decide if whether we will reject or not reject the null hypothesis. To do this,
we need to compare our critical values with our test statistic.
So how do we decide?
Look at the diagram above. The blue arrow indicates the position of your critical value, which
was based on your level of significance, α.
Your test statistic can either fall along the area of the green arrow OR red arrow. Hence, we can
see the following.
𝐶𝑟𝑖𝑡𝑖𝑐𝑎𝑙 𝑉𝑎𝑙𝑢𝑒 > 𝑇𝑒𝑠𝑡 𝑆𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐
𝐶𝑟𝑖𝑡𝑖𝑐𝑎𝑙 𝑉𝑎𝑙𝑢𝑒 < 𝑇𝑒𝑠𝑡 𝑆𝑡𝑎𝑡𝑖𝑠𝑡𝑖𝑐
If the critical value is greater than the test statistic, we have the blue and green arrows. If we
observe the diagram, our test statistic (green arrow) falls within the non-rejection region.
Hence, if this is the case, we cannot reject the null hypothesis – fail to reject the null
hypothesis.
On the other hand, if the critical value is less than the test statistic, we have the blue and red
arrows. If we observe the diagram, our test statistic (red arrow) falls within the rejection region.
Hence, if this is the case, we can reject the null hypothesis.

Make a Managerial Decision


Test of hypothesis is a statistical tool which helps us make an objective decision about a
population parameter. However, in practice, this is just statistics jargon. Hence, it will not make
sense in real world contexts. This is why we also need to make a managerial decision based on
our statistical conclusion. This will always be based on the context in which we performed the
test of hypothesis.
Looking back at our soda filling example above. The null and alternative hypothesis were as
follows.
𝑯𝒐 : 𝝁 = 𝟏𝟐 𝒐𝒛
𝑯𝒂 : 𝝁 ≠ 𝟏𝟐 𝒐𝒛
If say we reject the null hypothesis after following the process, what does it imply? Well, we can
say that our company facility is NOT filling exactly at 12 oz. In context, this is a problem. Recall
what we have discussed when we fill more than 12 oz or less than 12 oz. In a manufacturing
sense, this means that our process is already out of control. It is not performing as what we
intend. So, our managerial decision should be to stop the operation and check the process for
improvements.
Notice how we used statistics to make a real world decision? This is exactly how test of
hypothesis should work.

You might also like