U2.T4 Session 3 Introduction To Hypothesis Testing SY2223

Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

Topic 4: Statistical Inference

HYPOTHESIS
TESTING
Expected learning Outcomes:

At the end of the session, you should have…


• defined hypothesis testing;
• stated a null hypothesis and an alternative
hypothesis;
• identified Type I and Type II errors and
interpreted the level of significance;
• knew whether to use one-tailed or two-tailed
statistical test; and
• made and interpreted decision based on the
results of a statistical test.
Flow of session

Steps in Processing of
Definition Example Hypothesis Previous Synthesis
Testing Activity
Definition: Hypothesis Testing

It is a process that uses sample


statistics to test a claim about the
value of a population parameter.

https://medium.com/@thecodingcookie/hypothesis-testing-92b7270976de
Definition: Hypothesis Testing

Sample data used to choose


https://medium.com/@thecodingcookie/hypothesis-testing-92b7270976de between two choices i.e.
hypotheses or statements about
a population
Non-statistical Hypothesis Testing:
Criminal Trial

In a trial a judge must decide between two


hypotheses:
𝑯𝟎 : The accused is not guilty (innocent)
𝑯𝒂 : The accused is guilty

The jury does not know which hypothesis is


true. They must make a decision on the
basis of evidence presented.
Non-statistical Hypothesis Testing:
Criminal Trial

What decisions are being made?

What errors could be committed?


What decisions were made?

What errors were committed?


Non-statistical Hypothesis Testing:
Criminal Trial
In a trial a judge must decide between two hypotheses:
𝐻0: The accused is not guilty.
𝐻𝑎 : The accused is guilty.

𝛼 or level of Truth about defendant


significance
𝑰𝒏𝒏𝒐𝒄𝒆𝒏𝒕 𝑮𝒖𝒊𝒍𝒕𝒚 𝛽 or 1-power
Test

ERROR
𝑮𝒖𝒊𝒍𝒕𝒚 Justice
Verdict

(Type I)
ERROR
𝑵𝒐𝒕 𝒈𝒖𝒊𝒍𝒕𝒚 Justice
(Type II)
Miracle in cell No. 7; 2013
Hypothesis Testing: ERRORS

• Type I error (𝜶 or level of significance) - maximum chance


of incorrectly rejecting the null hypothesis

• Type II error (𝜷) – quantity (1 − 𝛽) is a power test, the


probability of observing an effect in the sample (if one), of
a specified effect size or greater exists in the population

• The conventional range for alpha is between 0.01 and


0.10; and for beta, between 0.05 and 0.20.
STEPS in Hypothesis Testing:

1. Identify the null and alternative hypotheses.

2. Specify the level of significance.

3. Find the critical value(s).


4. Calculate the test statistic and its corresponding standardized test statistic.

5. Find the P-value.

6. Make the decision (reject or not reject the null hypothesis).


7. Write a statement to interpret the decision in the context of the original claim.
STEPS in Hypothesis Testing:
(1) Identify hypotheses

A statistical hypothesis that states that


Null Hypothesis, Ho there is no difference between a
parameter and a particular value

Hypothesis Test

A statistical hypothesis that states that


Alternative
a parameter and a particular value
Hypothesis, Ha has a difference.
STEPS in Hypothesis Testing:
(1) Identify hypotheses
Given the population mean 𝜇 and a particular value, say 𝐾, we can write our Null and
Alternative Hypothesis as follows:

Two-tailed test Right-tailed test Left-tailed test


𝐻0 : 𝜇 = 𝐾 𝐻0 : 𝜇 = 𝐾 𝐻0 : 𝜇 = 𝐾
𝐻𝑎 : 𝜇 ≠ 𝐾 𝐻𝑎 : 𝜇 > 𝐾 𝐻𝑎 : 𝜇 < 𝐾
STEPS in Hypothesis Testing:
(2) Identify level of significance

𝛼 The probability of rejecting the true null


hypothesis.

Typical values for alpha are:


0.01, 𝟎. 𝟎𝟓, 0.1
STEPS in Hypothesis Testing:
(3) Find the critical values
STEPS in Hypothesis Testing:
(4) Calculate the test statistic

Test Statistic Formula:

ഥ−𝝁
𝒙
𝒛= 𝝈
𝒏 Standardized Normal Variable or z-score
STEPS in Hypothesis Testing:
(5) Find the P-value or rejection region

Two basic types of decision rules for deciding whether to reject or not to
reject the 𝐻0 :

𝑹𝒆𝒋𝒆𝒄𝒕𝒊𝒐𝒏 𝑹𝒆𝒈𝒊𝒐𝒏 𝑷 − 𝒗𝒂𝒍𝒖𝒆


STEPS in Hypothesis Testing:
(5) Find the P-value or rejection region

𝑹𝒆𝒋𝒆𝒄𝒕𝒊𝒐𝒏 𝑹𝒆𝒈𝒊𝒐𝒏
STEPS in Hypothesis Testing:
(5) Find the P-value or rejection region

𝑷 − 𝒗𝒂𝒍𝒖𝒆
STEPS in Hypothesis Testing:
(6) Make decisions

The two possible decisions that can be made:

Conclude that there is enough evidence Conclude that there is not enough
to support the null hypothesis. evidence to support the null hypothesis.

(also stated as: failing to reject the null (also stated as: reject the null hypothesis)
hypothesis)
EXAMPLE in Hypothesis Testing:

Consider the average or mean demand for computers during assembly


lead time. Rather than estimate the mean demand, our operations manager
wants to know whether the mean is different from 350 units. In other words,
someone is claiming that the mean time is 350 units and we want to check this
claim out to see if it appears reasonable.

𝐻0: 𝜇 = 350 𝑢𝑛𝑖𝑡𝑠


𝐻𝑎 : 𝜇 ≠ 350 𝑢𝑛𝑖𝑡𝑠

This will be a two-sided test.


The standard deviation 𝝈 is to be 75, the sample size 𝒏 is 25, and the
sample mean ഥ 𝒙 is 370.16.
EXAMPLE in Hypothesis Testing:

1. Identify the hypothesis.


𝑯𝟎: 𝝁 = 𝟑𝟓𝟎 𝒖𝒏𝒊𝒕𝒔
𝑯𝒂 : 𝝁 ≠ 𝟑𝟓𝟎 𝒖𝒏𝒊𝒕𝒔

2. Identify the level of significance. (𝜶 = 𝟎. 𝟎𝟓) two-tailed


3. Find the critical value(s).

ഥ−𝝁
𝒙
𝒛= 𝝈
𝒏

If the Z-Score for the sample mean 𝑥ҧ is greater than 1.96, we know that 𝑥ҧ will be in the rejection
region on the right side, or
If the Z-Score for the sample mean is less than -1.96, we know that 𝑥ҧ will be in the rejection region
on the left side.
EXAMPLE in Hypothesis Testing:

The z-score is in the 95%


region, so we fail to reject
the null hypotheses.
EXAMPLE in Hypothesis Testing:

1. Identify the hypothesis.


𝑯𝟎: ഥ 𝒙 = 𝟑𝟓𝟎 𝒖𝒏𝒊𝒕𝒔
𝑯𝒂 : ഥ 𝒙 ≠ 𝟑𝟓𝟎 𝒖𝒏𝒊𝒕𝒔

2. Identify the level of significance. (𝜶 = 𝟎. 𝟎𝟓) two-tailed


3. Find the critical value(s). 𝒛 = 𝟏. 𝟑𝟒𝟒
4. Make the decision. Fail to reject the null hypothesis.
5. Interpret the decision. There is no enough evidence to prove that the
mean for the demand of computer units during assembly lead time is
not 350 units.
EXAMPLE in Hypothesis Testing:
State the null hypothesis that should be used to test each of the following claims and determine the
tail(s) of the test.

1. A lecturer claims that his students scored an average of 55 marks in their Statistics test.
The subject supervisor wants to know whether the lecturer’s claim is acceptable or not.

Solution:
A lecturer claims that his students scored an average of 55 marks.
Null Hypothesis 𝐻0 : 𝜇 = 55 (Two-tailed test)
Alternative Hypothesis 𝐻𝑎 : 𝜇 ≠ 55
Hence, the rejection region are located at both tails of the distribution curve.
EXAMPLE in Hypothesis Testing:
State the null hypothesis that should be used to test each of the following claims and determine the
tail(s) of the test.

2. A car manufacturer claims that the mean selling price of all the cars manufactured
costs only Php80,000. A consumer agency wants to test whether the mean selling price
of all the cars manufactured exceed Php80,000.

Solution:
The mean selling price of all the cars manufactured exceed Php80,000.

Null Hypothesis 𝐻0 : 𝜇 = 80,000 (Right-tailed test)


Alternative Hypothesis 𝐻𝑎 : 𝜇 > 80,000

Hence, the rejection region is located at the right tail of the distribution curve.
EXAMPLE in Hypothesis Testing:
State the null hypothesis that should be used to test each of the following claims and determine the
tail(s) of the test.

3. A manufacturer of juices claims that all labeled 1.5-liter bottles contains an


average of 1.49 liters of soft drinks. A retailer wishes to test whether the mean amount of
juice in a labeled 1.5 liter is not more than 1.49 liters.

Solution:
The mean amount of juice in a labeled 1.5 liter is not more than 1.49 liters.

Null Hypothesis 𝐻0 : 𝜇 =1.49 (Left-tailed test)


Alternative Hypothesis 𝐻𝑎 : 𝜇 < 1.49

Hence, the rejection region is located at the left tail of the distribution curve.
EXAMPLE in Hypothesis Testing:
State the null hypothesis that should be used to test each of the following claims and determine the
tail(s) of the test.

4. A restaurant manager claims that the mean waiting time of all customers in his
restaurant before being served is at most one minute. A researcher wants to test the
manager’s claim.

Solution:
The mean mean waiting time of all customers in his restaurant before being served is
at most one minute.

Null Hypothesis 𝐻0 : 𝜇 =1 (Left-tailed test)


Alternative Hypothesis 𝐻𝑎 : 𝜇 ≤ 1

Hence, the rejection region is located at the left tail of the distribution curve.
REFERENCES

Aguilar, I., Chua, S., Dela Cruz, E., Rodriguez, A. (2016). Soaring 21st century mathematics: Statistics and
probability. Quezon City: Phoenix Publishing House, Inc.

Farber, B., Larson, R. (2012). Elementary statistics: Picturing the world (5th ed.). New York: Prentice
Education, Inc. Retrieved from:
https://www.gcsnc.com/cms/lib/NC01910393/Centricity/Domain/10320/Intro%20to%20Statis
tics%20Textbook.pdf

Fajardo-Lim, Y., Nocon, R., Nocon, E., Ruivivar, L. (2016). Math for engaged learning: Grade 11&12.
Quezon City: SibsPublishing House, Inc.
QUESTIONS?

You might also like