Hypothesis Testing
Hypothesis Testing
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
OBJECTIVES
At the end of this, it is expected that the students will be able to:
1. Test hypotheses on the mean of a normal distribution using
either a Z-test or a t-test
2. Test hypotheses on the variance or standard deviation of a
normal distribution
3. Test hypotheses on a population proportion
4. Use the P-value approach for making decisions in hypothesis
tests
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
Simply is the claim or statement about the
population parameter
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
Example:
The average age of all college students in
Batangas State University is 19.
𝜇 = 19 Null Hypothesis : 𝐻0
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
For example:
Left-tailed
𝜇 < 19 Alternative Hypothesis : 𝐻𝑎 = 𝐻1
𝜇 ≥ 19 Null Hypothesis : 𝐻0
One-tailed
For example:
𝜇 > 19 Alternative Hypothesis : 𝐻𝑎 = 𝐻1
Right tailed
𝜇 ≤ 19 Null Hypothesis : 𝐻0
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
Example:
It is believed that a candy machine makes chocolate bars that are on
average 5g. A worker claims that the machine after maintenance no longer
makes 5g bars. Write the null hypothesis and alternative hypothesis.
𝐻0 : 𝜇 = 5𝑔
𝐻𝑎 : 𝜇 ≠ 5𝑔
Outcomes:
1. Reject Null Hypothesis
2. Fail to Reject Null Hypothesis
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
Example:
Outcomes:
1. Reject Null Hypothesis
2. Fail to Reject Null Hypothesis
Reject 𝐻0 Reject 𝐻0
Reject 𝐻0
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
Company XYZ manufactures calculators with an
average mass of 450g. An engineer believes that
average weight to be different and decides to
calculate the average mass of 50 calculators. State null
and alternative hypothesis:
Null: 𝐻𝑜 : 𝜇 = 450𝑔
Alternative: 𝐻1 : 𝜇 ≠ 450𝑔
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
ONE SAMPLE t-Test
• z-test – commonly done when the population
standard deviation is known.
• t-test - done when the population standard
deviation is unknown.
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
Example:
A factory has a machine that dispenses 80 mL of fluid into a
bottle. An employee believes the average amount of fluid is not
80 mL. Using samples, he measures the average amount
dispensed by the machine to be 78 mL with a standard deviation
of 2.5. (a) State the null and alternative hypotheses. (b) At a 95%
confidence level, is there enough evidence to support the idea
that the machine is not working properly?
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
Example:
A factory has a machine that dispenses 80 mL of fluid into a bottle. An employee believes the average amount of
fluid is not 80 mL. Using samples, he measures the average amount dispensed by the machine to be 78 mL with a
standard deviation of 2.5. (a) State the null and alternative hypotheses. (b) At a 95% confidence level, is there
enough evidence to support the idea that the machine is not working properly?
For ‘a’
𝐻0 : 𝜇 = 80 𝑚𝑙
-1.96 +1.96
𝐻𝑎 : 𝜇 ≠ 80 𝑚𝑙
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
Example:
For ‘b’
𝒙 = 𝟕𝟖 -1.96 +1.96
𝝈 = 𝟐. 𝟓
𝒏 = 𝟒𝟎
𝑥−𝜇
𝑧= 𝜎
𝑛
78 − 80
𝑧= = −5.05964
2.5
40
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
Example:
A company manufactures car batteries with an average life span
of 2 or more years. An engineer believes this value to be less.
Using 10 samples, he measures the average life span to be 1.8
years with a standard deviation of 0.15. (a) State the null and
alternative hypotheses. (b) At a 99% confidence level, is there
enough evidence to discard the null hypothesis?
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
Example:
A company manufactures car batteries with an average life span of 2 or more years. An engineer believes this
value to be less. Using 10 samples, he measures the average life span to be 1.8 years with a standard deviation of
0.15. (a) State the null and alternative hypotheses. (b) At a 99% confidence level, is there enough evidence to
discard the null hypothesis?
𝐻0 : 𝜇 ≥ 2
𝐻1 : 𝜇 < 2 0.99
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
Example:
For ‘b’ 0.01
𝒙 = 𝟏. 𝟖
𝝈 = 𝟎. 𝟏𝟓
0.99
𝒏 = 𝟏𝟎
𝑥−𝜇
𝑡= 𝜎
𝑛
1.8 − 2 t value = - 2.821
𝑡= = −4.216370
0.15
10
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
𝑑𝑓 = 𝑛 − 1
𝑑𝑓 = 9
2.821
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
HOMEWORK 3
1. In the Philippines, the average IQ is 100. A team of scientists wants to test a new medication
to see if it has either positive or negative effect on intelligence, or no effect at all. A sample 30
participants who have taken the medication has a mean of 140 with a standard deviation of 20.
Did the medication affect intelligence? Assume 95% confidence interval.
2. In recent years, the mean age of all college students in city X has been 23. A random sample of
42 students revealed a mean age of 23.8. Suppose their ages are normally distributed with a
population standard deviation of σ = 2.4. Can we infer at α = 0.05 that the population mean
age has changed?
3. A manufacturer of solar lamps claims that the mean useful life of their new product is 8
months with a standard deviation of 0.5 month. To test this claim, a random sample of 50 solar
lamps were tested and found to have a mean life of 7.8 months. Test the hypothesis that μ = 8
months against the alternative hypothesis that μ ≠ 8 months using a 1% level of significance.
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
STATISTICAL TOOLS
• t-Test = compares 2 means
• ANOVA = compares > means
• Chi-Squares = compares categorical
variable
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
Types of Errors
• Type 1 Error.
False Positive(alpha probability): Rejecting a
true null hypothesis.
• Type II Error
False Negative(Beta Probability): Failing to reject a
false null hypothesis
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.
HYPOTHESIS TESTING
Types of
Errors
MATH403: Engineering Data Analysis. Copyright 2024 Leonel C. Tingson. All rights reserved.
All trademarks, images and symbols belongs to it’s respective owners. Usage of any image
requires prior notification and consent.