Chapter 5
Chapter 5
CHAPTER FIVE
5. HYPOTHESIS TESTING
5.1. Basic Concepts
In the statistical world, a hypothesis is an assumption about a specific population parameter, such
as a mean, a proportion, or a standard deviation. Making an assumption about the value of a
population parameter, collect a sample from that population, measure the sample, and declare, in
a scholarly manner, whether the sample supports the original assumption. This, in a nutshell, is
what hypothesis testing is all about.
In general, a hypothesis is an assumption about a population parameter such as a mean or a
proportion.
Testing hypotheses about population characteristics (such as μ and σ) is another fundamental
aspect of statistical inference and statistical analysis. In testing a hypothesis, we start by making
an assumption with regard to an unknown population characteristic. We then take a random sample
from the population, and on the basis of the corresponding sample characteristic, we either accept
or reject the hypothesis with a particular degree of confidence.
5.1.1. Stating the hypothesis
Every hypothesis test has both a null hypothesis and an alternative hypothesis.
The null hypothesis, denoted by H0, represents the status quo and involves stating the belief that
the population parameter is ≤ (less than or equal to), =, or ≥ (greater than or equal to) a specific
value. The null hypothesis is believed to be true unless there is overwhelming evidence to the
contrary.
The alternative hypothesis, denoted by H1, represents the opposite of the null hypothesis
and is believed to be true if the null hypothesis is found to be false. The alternative hypothesis
always states that the population parameter is > (greater than), ≠ (not equal to), or
< (less than) a specific value.
Note that the alternative hypothesis was used to represent the claim that wants to prove statistically.
Because of this, the alternative hypothesis is also known as the research hypothesis. It represents
the position the researcher wants to establish.
The following table shows the three valid combinations of the null and alternative hypotheses
using the claim that we are testing from the Wall Street Journal article as an example.
Table 4.1. Valid Combinations for the Null and Alternative Hypotheses: Wall Street Journal
Example
A Type II error occurs when we fail to reject the null hypothesis when, in reality,
it is not true. The probability of making a Type II error is known as β. The type of error where we
do not reject H0 when, in reality, it’s false is known as a Type II error.
Table 4.2 summarizes the two types of hypothesis errors.
Decision rules for the two types of hypothesis test errors
The first thing to do when given a claim is to write the claim mathematically (if possible), and
decide whether the given claim is the null or alternative hypothesis. If the given claim contains
equality, or a statement of no change from the given or accepted condition, then it is the null
hypothesis, otherwise, if it represents change, it is the alternative hypothesis.
A Type I error is known as the producer’s risk because, when it occurs in quality
control settings, the producer is looking for a problem in its process that does not exist.
A Type II error is known as the consumer’s risk because, when it occurs in quality control
settings, the customer is getting a product from a process that is not performing properly.
5.4. Type of Tests: One tailed/two tailed hypothesis tests
This topic will explain how to determine if the test is a left tail, right tail, or two-tail test.
The type of test is determined by the Alternative Hypothesis (H1)
1. Left Tailed Test
H1: parameter < value
Notice the inequality points to the left
Decision Rule: Reject H0 if t.s. < c.v
All hypothesis testing is done under the assumption the null hypothesis is true!
The value for all population parameters in the test statistics come from the null hypothesis.
A. Population Standard Deviation Known
If the population standard deviation, sigma, is known, then the population mean has a normal
distribution, and you will be using the z-score formula for sample means. The test statistic is the
standard formula you've seen before.
The critical value is obtained from the normal table, or the bottom line from the t-table.
Example 1: A sugar is packed in 5 pound bags. An inspector feels that the bags may not contain
5 pounds, as stated. A sample of 50 bags produces a mean of 4.6 pounds. Assume that population
standard deviation is 0.7 pound. Test the claim at 𝛼 = 0.05 that the bags do not contain 5 pounds,
as stated.
Solution:
Step 1: Write the null and alternative hypothesis
H0: μ = 5
H1: μ ≠ 5
Step 2: Critical value, α = 0.05
Z_(α⁄2) = Z_0.025 = 1.96 or – 1.96
Step 3: Test statistic
4.6− 5.00
Z_cal = (x ̅- μ) / (σ⁄√n) = 0.7⁄ = -4.04
√50
The critical value is obtained from the t-table. The degree of freedom for this test is n-1.
Example 1: A firm wants to know with a 95% level of confidence if it can claim that the boxes of
detergent it sells contain more than 500g of detergent. From past experience the firm knows that
the amount of detergent in the boxes is normally distributed. The firm takes a random sample of
25 detergent with sample mean 520g and standard deviation 75g.
Solution:
Step 1: Write the null and alternative hypothesis
H0: 𝜇 = 500
H1: 𝜇 > 500
Step 2: Critical value, 𝛼 = 0.05
𝑡𝛼, 24 = 𝑡0.05, 24 = 1.711
Step 3: Test statistic
520− 500
tcal = (x ̅- μ)/(s⁄√n) = 75⁄ = 1.33
√25
All hypothesis testing is done under the assumption the null hypothesis is true!
I can't emphasize this enough. The value for all population parameters in the test statistics come
from the null hypothesis.
The population proportion has an approximately normal distribution if np and nq are both at least
5. Remember that we are approximating the binomial using the normal, and that the p we're talking
about is the probability of success on a single trial. The test statistic is shown in the box to the
right.
The critical value is found from the normal table, or from the bottom row of the t-table.
Alternatively, we can re write the formula for the z-Test Statistic for a Hypothesis Test for the
Proportion as:
Where,
zp = The z-test statistic for the proportion
p = The sample proportion
pH0 = The population proportion, which is assumed to be true in the null hypothesis
n = The sample size
The steps involved in the hypothesis testing remain the same. The only thing that changes is the
formula for calculating the test statistic and perhaps the distribution which is used.
You are testing p, you are not testing p ̂. If you knew the value of p, then there would be nothing
to test.
There are steps we follow when we test the population proportion are:
Step 1: Identify the null and alternative hypothesis
a) Ho: p = po b) Ho: p ≤ po c) Ho: p ≥ po
H1: p ≠po H1: p > po H1: p <po
Step 2: fix the level of significance (α)
Step 3: Calculate the test statistic that is Zcal, under Ho
𝑝̂ − 𝑝𝑜
𝑍𝑐𝑎𝑙 =
√𝑝̂ 𝑞̂
𝑛
Z cal is 1.3913 while Z(α⁄2) or Z (0.02/2) =Z (0.01) at 98% confidence level is 2.326. Therefore, we
Step 5: Conclusion
There is no enough evidence to reject the null hypothesis and we conclude that proportional of
left handed students in a university is 0.12 for α = 0.02.
End of Chapter Five!