Chapter 4
Chapter 4
HYPOTHESIS TESTING
ADVANCED STATISTICS
LESSON 1:
HYPOTHESIS TESTING
NULL AND ALTERNATIVE HYPOTHESIS
ONE-TAILED AND TWO-TAILED TEST
HYPOTHESIS TESTING
Hypothesis is a premise or claim that we want to test.
Hypothesis testing is a decision-making process for evaluating
claims about a population based on the characteristics of a
sample purportedly coming from that population. The decision
is whether the characteristic is acceptable or not.
HYPOTHESIS TESTING
HYPOTHESIS
H0: μ1 = 300
H1: μ1 < 300
State the Null and Alternative Hypotheses for each
statement.
3. The school record claims that the mean score in Math of the incoming Grade 11
student is 8.1. The teacher wishes to find out if the claim is true. She tests if there
is significant difference between the batch mean score and the mean score of the
students in her class
4. A social worker wants to test (at a = 0.05) whether the average body mass index
(BMI) of the pupils under feeding program is different from 8.2 kg.
4. A Teacher wants to know if listening to popular music affects the performance of pupils. The class of 50
grade 1 pupil was used in the experiment. The mean score was 83 and the standard deviation is 5. A
previous study revealed that μ=82 and the standard deviation σ=10
a. State the Null and the Alternative Hypotheses in words and in symbols
b. State whether the test is directional or non-directional
NULL AND ALTERNATIVE HYPOTHESES IN WORDS NULL AND ALTERNATIVE
HYPOTHESES IN SYMBOL
H1: μ1 ≠ μ2
SKETCHES OF DIRECTIONAL AND NON-
DIRECTIONAL TESTS
1. Maria insists that she is 30 years old when, in fact, she is 32 years old. What error is
Mary committing?
Solution:
Mary is rejecting the truth. She is committing a Type I error.
2. Stephen says that he is not bald. His hairline is just receding. Is he committing an
error? If so, what type of error?
Solution:
Yes. A receding hairline indicates balding. This is a Type I error. Stephen action
may be to find remedial measures to stop falling hair.
UNDERSTANDING ERRORS
A one population test is a test conducted on one sample purportedly coming from a
population with mean μ. It is sometimes called significance test for a single mean.
There are two cases to consider for testing the mean of a single population:
1. The sample is large (n ≥ 30). Thus, we can apply the Central Limit Theorem (CLT)
and we use the normal curve as a model
2. When the CLT is applied, the sample standard deviation s may be used as an
estimate of the population standard deviation σ when the value σ is unknown.
When the sample is large, that is, n ≥ 30, the test statistic is the z. The z statistic
measures the number of standard deviations between the observed value of and the
hypothesized value of μ.
LARGE SAMPLE TEST CONCERNING THE MEAN μ OF A
POPULATION
We consider two case when conducting a significance test for a single mean:
Case 1: The population mean μ and the population standard deviation σ are known
Z = where:
Case 2: The population mean is known but not the population standard deviation
Test Statistics Z = where:
Note that in the case 2 statistic, sample standard deviation s is used as an estimate for the
population standard deviation
LARGE SAMPLE TEST CONCERNING THE MEAN μ OF A
POPULATION
Example 1: Computing z
Given: = 90, =88, = 6, n = 100
Z = where:
Find the value of z
STEPS SOLUTION
WHY IS IT IMPORTANT TO LEARN BOTH? The traditional method has been used since
the hypothesis testing procedure was formulated. The P Value method has become
popular with easy access to computer software and high-powered statistical
calculators. However we should know how the probabilities are determined. For each
method, there is a corresponding decision rule that guide us in making conclusions and
interpretations
STEPS IN HYPOTHESIS TESTING
STEP 1 Describe the population parameter of interest (e.g., mean, proportion)
STEP 2 Formulate the hypotheses; the null hypothesis and the alternative hypothesis . That is, state a null
hypothesis, H0, in such a way that a type I error can be calculated.
STEP 3 Check the assumption.
* Is the sample size large enough to apply the Central Limit theorem (CLT)?
* Do small samples come from the normally distributed populations?
* Are the samples selected randomly?
STEP 4 Choose a significance level size for a. Make a small when the consequences of rejecting a true H0 is
severe.
* Is the test two tailed or one tailed?
* get the Critical values from the test statistic table
* Establish the critical regions.
(Optional: Draw a normal curve, draw vertical lines through the critical values, and shade the rejection
region)
STEP 7 Compare the computed test statistics and the critical value. Then based on the decision rule, decide
whether to reject or not to reject (accept) H0 . Interpret the result.
(Optional: take a course of action)
APPLYING HYPOTHESIS TESTING IN PROBLEM
SOLVING
4. Choose a significance level size for a. Make a small when the a = 1- 0.95 = 0.05
consequences of rejecting a true H0 is severe.
* Is the test two tailed or one tailed? Two tailed
* get the Critical values from the test statistic table
* Establish the critical regions. Z Critical Values: ±
DETERMINING THE
CRITICAL VALUES
Recall that the critical values are the z-values
associated with the probabilities at the tails of
the normal curve.
For a 95% Confidence Level
= 0.4750
6. State the decision rule Reject H0 if the computed test statistic ≤ negative critical value
or if the computed test statistic ≥ positive critical value.
Otherwise accept H0
A researcher used a developed problem solving test to test randomly select 50 grade 6 pupils.
In this sample, = 80 and s= 10. The mean μ and the standard deviation of the population used
in the standardization of the test were 75 and 15, respectively. Use the 95% confidence level to
the answer of the following questions
STEPS ANSWER
7. Compare the test statistic and the critical value. Decision making:
* based on the decision rule, decide whether to reject or 2.36 > 1.96
to accept H0 The null hypothesis is ________
rejected
* Interpret the result Interpretation:
* Take a course of action (optional) * There is enough evidence to reject the null hypothesis.
* There is a significant difference between the sample
mean and the population mean
In the graph of the normal curve, The computed z-value is located outside the acceptance region. So the
null hypothesis has to be rejected.
A researcher used a developed problem solving test to test randomly select 50 grade 6 pupils.
In this sample, = 80 and s= 10. The mean μ and the standard deviation of the population used
in the standardization of the test were 75 and 15, respectively. Use the 95% confidence level to
the answer of the following questions
In the graph of the normal curve, The computed z-value is located outside the acceptance region. So the
null hypothesis has to be rejected.
STEPS ANSWER
1. Describe the population parameter of interest The parameter of interest is the mean μ of the population
where the sample comes from.
2. Formulate the hypotheses; the null hypothesis and the
alternative hypothesis . That is, state a null hypothesis, H0, in H0: μ = 250
such a way that a type I error can be calculated. H1: μ < 250
3. Check the assumption. Since n =
* Is the sample size large enough to apply the Central 100, by the Central Limit Theorem, the distribution is
Limit theorem (CLT)? normally distributed
* Are the samples selected randomly? Yes
The owner of a factory that sells a particular bottled fruit juice claims that the average
capacity of their product is 250 ml. To test the claim, the consumer group gets a sample of
100 such bottles, calculate the capacity of each bottle, and then find the mean capacity to be
248 ml. The standard deviation s is 5 ml. Is the claim true?
STEPS ANSWER
Z=
Z=
z= -4
6. State the decision rule Reject H0 if the computed test statistic ≤ negative critical value or if the
computed test statistic ≥ positive critical value. Otherwise, accept H0
7. Compare the test statistic and the critical value. Decision making:
* based on the decision rule, decide whether -4 < -1.645
to reject or to accept H0 The null hypothesis is
* Interpret the result Interpretation:
* Take a course of action (optional) * There is enough evidence to warrant the rejection null hypothesis.
rejected
* There is a significant difference between the sample mean and the
population mean. Therefore, claim is not true
The owner of a factory that sells a particular bottled fruit juice claims that the average
capacity of their product is 250 ml. To test the claim, the consumer group gets a sample of
100 such bottles, calculate the capacity of each bottle, and then find the mean capacity to be
248 ml. The standard deviation s is 5 ml. Is the claim true?
-4 is way below -1.645. Clearly, the computed value of the z- statistics lies in the rejection region. We
can be 95% confident about our decision of rejecting the null hypothesis.
FORMATIVE:
Recall the risk of making Type I error is denoted by a. That is, P value (or p for short) =
probability of committing a Type I error
Or a = P (Type I error)
Meaning a = P ( Rejecting the H0 when in fact H0 is true)
In the process, we evaluate the null hypothesis by assuming it to be true and test the
reasonableness of this assumption by calculating the probability of getting the results
if chance alone is operating. The obtained probability is called the p-value. This
method of arriving at a decision is sometimes called the p-approach.
DEALING WITH PROBABILITY
DECISION RULE
If the obtained probability is less than or equal to a critical probability level, called the alpha (a)
level, then we reject the null hypothesis.
If the obtained probability level is greater than the alpha level, we do not reject H0 . In other
words, we do not reject (accept) H0.
Briefly, the decision rule is stated:
Decision Rule for the p-value approach:
Reject H0 if p ≤ a
Do not reject H0 if p > a
Step 4 Choose a significance level size for a. Make a small when the consequences of
rejecting a true H0 is severe.
* Is the test two tailed or one tailed?
Step 5 Select the appropriate test statistics
* Compute the test statistic
* Compute the probability value (p-value)
STEPS IN HYPOTHESIS TESTING: p-value METHOD
Step 6 State the decision rule for rejecting or not rejecting the null hypothesis.
* Reject H0 if the computed probability value ≤ a
* Do not reject (or accept) H0 if the computed probability value > a
Step 7 • Compare the computed probability value and a
• Based on the decision rule, decide whether to reject or not to reject H0.
• Interpret the result
• Take a course or action (optional)
P-VALUE INTERPRETATION
7. * Comparison between computed statistic and critical • Comparison between p-value and a
value/s • Decision
* Decision • Interpretation
* Interpretation
APPLYING THE P-VALUE METHOD
1. Bryan administered a Mathematics achievement test to a random
sample of 50 graduating pupils. In this sample, = 90 and s = 10. The
population parameters are μ = 82 and σ = 15.
1. Does the sample come from the average
population?
2. Is the performance of the sample above average
Use a = 0.05 and the p-value method.
Bryan administered a Mathematics achievement test to a random sample of 50
graduating pupils. In this sample, = 90 and s = 10. The population parameters are μ
= 82 and σ = 15.
STEPS SOLUTION
1. Describe the population parameter of interest The parameter of interest is the population mean μ, the
mean performance of all pupils in the test
2. Formulate the hypotheses; the null hypothesis and the H0: μ = 83
alternative hypothesis . State a null hypothesis, H0, in H1: μ ≠ 83
such a way that a type I error can be calculated.
3. Check the assumption. With n = 50, the Central Limit Theorem applies
* Is the sample size large enough for the Central
Limit theorem (CLT) to apply?
4. Choose a significance level size for a. Make a small A = 0.05
when the consequences of rejecting a true H0 is severe.
* Is the test two tailed or one tailed? Two tailed
Bryan administered a Mathematics achievement test to a random sample of 50
graduating pupils. In this sample, = 90 and s = 10. The population parameters are μ
= 82 and σ = 15.
STEPS SOLUTION
5. Select the appropriate test Z statistic, σ = 15
statistics Z==
* Compute the Z=
probability value (p-value) z= 3.30
P-value = P(z < negative computed z or the z > positive
computed z)
So, the p-value = P(z < -3.30) or P(z > 3.30)
The area between z = 0 and z = 3.30(or -3.30) is 0.4995
So, p-value = 0,5000 – 0.4995 = 0.0005
Final p-value = 2(0.0005) = 0.0010
1-a
P-Value P-Value
Reject H0 μ Reject
-3.30 3.30
Bryan administered a Mathematics achievement test to a random sample of 50
graduating pupils. In this sample, = 90 and s = 10. The population parameters are μ
= 82 and σ = 15.
STEPS SOLUTION
6. State the decision rule for rejecting or not rejecting * Reject H0 if the computed probability value ≤
the null hypothesis. 0.05
* Do not reject (or accept) H0 if the computed
probability value > 0.05
7. Compare the computed probability value and a We know that 0.0010 < 0.50
• Based on the decision rule, decide whether to reject Thus based on the evidence at hand, we reject the null
or not to reject H0. hypothesis
• Interpret the result (We reject that the sample comes from a population
• Take a course or action (optional) whose mean μ = 83)
There is a significant difference between the sample
mean and population mean.
Interpretation: The result implies that the sample
belongs to another population and that the population is
above the average
Bryan administered a Mathematics achievement test to a random sample of 50
graduating pupils. In this sample, = 90 and s = 10. The population parameters are μ
= 82 and σ = 15.
STEPS SOLUTION
6. State the decision rule for rejecting or not rejecting * Reject H0 if the computed probability value ≤
the null hypothesis. 0.05
* Do not reject (or accept) H0 if the computed
probability value > 0.05
7. Compare the computed probability value and a We know that 0.0020 < 0.50
• Based on the decision rule, decide whether to reject Thus based on the evidence at hand, we reject the null
or not to reject H0. hypothesis
• Interpret the result (We reject that the sample comes from a population
• Take a course or action (optional) whose mean μ = 83)
There is a significant difference between the sample
mean and population mean.
Interpretation: The result implies that the sample
belongs to another population and that the population is
above the average
Bryan administered a Mathematics achievement test to a random sample of 50
graduating pupils. In this sample, = 90 and s = 10. The population parameters are μ
= 82 and σ = 15.
STEPS SOLUTION
1. Describe the population parameter of interest The parameter of interest is the population mean μ, the
mean performance of all pupils in the test
2. Formulate the hypotheses; the null hypothesis and the H0: μ = 83
alternative hypothesis . State a null hypothesis, H0, in H1: μ > 83
such a way that a type I error can be calculated.
3. Check the assumption. With n = 50, the Central Limit Theorem applies.
* Is the sample size large enough for the Central
Limit theorem (CLT) to apply?
4. Choose a significance level size for a. Make a small A = 0.05
when the consequences of rejecting a true H0 is severe.
* Is the test two tailed or one tailed? One-Tailed
Bryan administered a Mathematics achievement test to a random sample of 50
graduating pupils. In this sample, = 90 and s = 10. The population parameters are μ
= 82 and σ = 15.
STEPS SOLUTION
5. Select the appropriate test Z statistic, σ = 15
statistics Z==
* Compute the Z=
probability value (p-value) z= 3.30
P-value = P(z < negative computed z or the z > positive
computed z)
So, the p-value = P(z < -3.30) or P(z > 3.30)
The area between z = 0 and z = 3.30(or -3.30) is 0.4995
So, p-value = 0,5000 – 0.4995 = 0.0005
Bryan administered a Mathematics achievement test to a random sample of 50
graduating pupils. In this sample, = 90 and s = 10. The population parameters are μ
= 82 and σ = 15.
STEPS SOLUTION
6. State the decision rule for rejecting or not rejecting * Reject H0 if the computed probability value ≤
the null hypothesis. 0.05
* Do not reject (or accept) H0 if the computed
probability value > 0.05
7. Compare the computed probability value and a We know that 0.0010 < 0.50
• Based on the decision rule, decide whether to reject Thus based on the evidence at hand, we reject the null
or not to reject H0. hypothesis
• Interpret the result (We reject that the sample comes from a population
whose mean μ = 83)
• Take a course or action (optional) There is a significant difference between the sample
mean and population mean.
Interpretation: The result implies that the sample
belongs to another population and that the population is
above the average
FORMATIVE:
Mr Sy asserts that fewer than 5% of the bulbs he sells are defective. Suppose 300 bulbs
are randomly selected, each are tested and 10 defective bulbs are found. Does this
provide sufficient evidence for Mr. Sy to conclude that the fraction of defective bulbs is
less than 0.05? Use a = 0.01 and the p-value approach.
In a test of H0: μ = 100 against H0: μ >100, the sample data yielded the sample statistic z
= 2.15. Find the p-value for the test.
1-a
Reject H0 μ Reject
-3.30 3.30