0% found this document useful (0 votes)
15 views43 pages

Slide PSMOD 6 Hypothesis Testing

Uploaded by

Subash Maharjan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views43 pages

Slide PSMOD 6 Hypothesis Testing

Uploaded by

Subash Maharjan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

AQ077-3-2-PSMOD & Probability & Statistical Modelling

Topic 6 – Hypothesis Testing

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 1


Topic & Structure of The Lesson

▪ Introduction to hypothesis testing


▪ Hypothesis testing on population mean
▪ Hypothesis testing on population proportion
▪ Test of Goodness-of-fit
▪ Test of Independency

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 2


TOPIC LEARNING OUTCOMES

At the end of this topic, you should be able to:


1. Explain the principles underlying hypothesis testing.
2. Structure a business decision situation about means or proportions into the form
of a test of a hypothesis.
3. Apply systematic testing procedures.
4. Interpret hypothesis test results and draw conclusions.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 3


Key Terms You Must Be Able To Use

If you have mastered this topic, you should be able to use the following terms
correctly in your assignments and exams:
(Prepare your own list )

➢Hypothesis statement
➢Significance level
➢Test statistic
➢Decision rule
➢Critical value

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 4


Hypothesis Testing
Introduction
➢ It is also called significance testing.
➢ It is used to test a belief or opinion by applying
statistical methods.
➢ In decision making, we make an assumption, called
hypothesis, then we collect some sample data,
produce sample statistics and use this information to
decide how likely it is that our hypothesized population
parameter is true.
➢ Commonly used for testing sample means and
proportion.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 5


Hypothesis Testing

Null Hypothesis (H0):


• Is our assumption about parameter of population.
• The hypothesis we wish to falsify.
• Assumed to be true until we can prove otherwise.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 6


Alternative Hypothesis (H1):
• The opposite of null hypothesis.
• If H0 is rejected, then we accept H1.

Null Hypothesis Alternative Hypothesis


(H0) (H1)
= ≠
≤ >
≥ <

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 7


Hypothesis Testing Common Phrases

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 8


Hypothesis Testing
Steps:
1. State the claim 𝐻0 and the alternative, 𝐻1 .
2. Choose a significance level 𝛼 or use the given one.
3. Draw the sampling distribution based on the
assumption that 𝐻0 is true, and shade the area of
interest.
4. Calculate the test statistic. Find the p-value.
5. If the p-value is less than the significance level (p-
value < 𝜶), reject the null hypothesis.
6. If the p-value is greater than the significance level
(p-value>𝜶), do not reject the null hypothesis.
7. Write a statement to interpret the decision in the
context of the original claim.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 9


One-Tailed vs Two-Tailed Test

Two-Tailed Test Left-Tailed Test Right-Tailed Test

H0 = ≥ ≤
H1 ≠ < >
Rejection Region In both tails Left tail Right tail

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 10


One-Tailed vs Two-Tailed Test
One-tailed Test
➢ Is a significance test in which the null hypothesis can be
upset by values well above or below the mean but not
both.

Two-tailed test
➢ Is a significance test in which it will reject the null hypothesis
if the sample mean is significantly higher or lower than
hypothesized population mean.(i.e. there are two rejection
region)

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 11


Quick Review Question

Determine whether the following is left-tailed, right-tailed,


or two tailed test.
1. To test whether or not a bank’s ATM is out of service for
an average of more than 8 hours per month.
2. To test if the mean length of experience of airport
security guards is different from 5 years.
3. To test if the mean length credit card debt of college
seniors is less than $1000.
4. To test if the mean amount of time spent per week
watching sports on television by all adult men is different
from 6 hours.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 12


Test Statistics
• When 𝜎 is given:
𝑥ҧ − 𝜇
𝑍=𝜎
ൗ 𝑛

• When 𝜎 is not given, 𝑛 ≥ 30:


𝑥ҧ − 𝜇
𝑍=𝑠
ൗ 𝑛

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 13


Test Statistics

• When 𝜎 is not given, 𝑛 < 30 :


𝑥ҧ − 𝜇
𝑡=𝑠
ൗ 𝑛

• For proportion:
𝑝−𝜋
𝑍=
𝜋 1−𝜋
𝑛

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 14


Example

A researcher reports that the average


salary of assistant professors is $42,000. A
sample of 32 assistant professors has a
mean salary of $43, 260. At 𝛼 = 0.05, test
the claim that the average assistant
professors earn more than $42,000 a year.
The standard deviation of the population
is $5230.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 15


Quick Review Question
µ = Mean salary of assistant professors
Assumptions:
Ho :  = 42000 1. SRS

H A :   42000 2. Approx. Normal since n>30
3. Independent: 10(32)=320

x− Use a Z-Test since σ


z= Pval = P ( x  43260) = P ( z  1.36)
 is known
n Pval = 0.0869
43260 − 42000
z=
5230
32
z = 1.36 Fail to Reject the Ho since P-value (0.087)>α (0.05).
There is insufficient evidence to support the claim that
the mean salary of assistant professors is more than
$42000.
AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 16
Quick Review Question

The director of admissions at a large university advises parents of incoming


students about the cost of textbooks during a typical semester. A sample of
100 students enrolled in the university indicated a sample mean cost of
$315.40 with a sample standard deviation of $43.20. Using the 0.01 level of
significance, is there evidence that the population mean is above $300?

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 17


Quick Review Question

The TIV Telephone Company provides long-distance telephone service in an area.


According to the company’s records, the average length of all long-distance calls placed
was 12.44 minutes. A sample of 150 such calls placed through this company produced a
mean length of 13.71 minutes. The standard deviation of all such calls is 2.65 minutes.
Using the 2% significance level, can you conclude that the mean length of all current
long-distance calls is different from 12.44 minutes?

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 18


Quick Review Question

A waterworks officer insists that the average daily household water use in a
certain country is at least 400 gallons on average. To check this claim, a
random sample of 25 households was checked. The average of those
sampled was 380 with a standard deviation of 62. Is this consistent with
the officer’s claim? Test at 2.5% significance level.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 19


Quick Review Question

A car manufacturer claims that at least 10.2% of their new cars will be
returned back to them due to some technical problem. A random sample of
125 cars was selected and 10 of them are considered default. Using 5%
significance level, would you agree with the manufacturer’s claim?

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 20


Non-parametric Tests
Introduction
➢ The significance tests covered so far depend, to greater or
less extent, on the assumption, or presence of the normal
distribution
➢ They are also concerned with the parameters of the
distribution e.g. mean, proportion. Hence given the mean
of parametric tests.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 21


Non-parametric Tests
However, non-parametric or distribution free tests may be
used for the following cases:
1. the data are not normal, or
2. contain extreme values or
3. not enough is known to be able to make any
assumption about the type of distribution.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 22


Advantages of Non-Parametric
Tests
➢ No assumptions need to be made about
the underlying distribution.
➢ They can be used on data ranked in
some order.
➢ Mathematic concepts are simpler than
for parametric tests.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 23


Disadvantages of Non-
Parametric Tests

➢ They are less discriminating than


parametric tests. I.e. they are more
prone to error and less powerful.
➢ Although simple, the arithmetic may
take a long time

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 24


Chi-square (2) Distribution
➢ Is used when it is wished to compare an actual, observed
distribution with a hypothesized, or expected distribution.
➢ Often referred to as a ‘goodness of fit’ test.
➢ Chi Square:
(O − E)
2

 =

where E
O = the observed frequency of any value
E = the expected frequency of any value

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 25


Chi-square (2) Distribution

• Our question of interest is “Are the two


variables independent?”
• This question is set up using the following
hypothesis statements:
• Null Hypothesis: The two categorical variables
are independent.
• Alternative Hypothesis: The two categorical
variables are dependent.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 26


Chi-square (2) Distribution

➢ The obtained value from the formula is


compared with the value from 2 table for a
given significance level and the number of
degrees of freedom.

Degrees of freedom, df = (Rows - 1)(Columns – 1)

➢ If 2 (calculated) is more than 2 (table), the null


hypothesis is rejected.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 27


How to read Chi-square table?

• The chi-square distribution assumes nonnegative values only, and these are
denoted by the symbol X2 (read as chi-square).

• E.g. 1: Find the value of X2 for 7 degrees of freedom and an area of 0.10 in the chi-square
distribution.

• E.g. 2: Find the value of X2 for 12 degrees of freedom and an area of 0.05 in the chi-square
distribution.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 28


Chi-square (2) Distribution

• Expected frequency,

𝑡𝑜𝑡𝑎𝑙 𝑟𝑜𝑤 × (𝑡𝑜𝑡𝑎𝑙 𝑐𝑜𝑙𝑢𝑚𝑛)


𝐸=
𝑔𝑟𝑎𝑛𝑑 𝑡𝑜𝑡𝑎𝑙

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 29


Example
The following data concerning industrial
accidents and absentees classified
according to the types of employee.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 30


1. State the null and alternative hypothesis.
2. Find degree of freedom and 𝜒 2 (table) given the
significance level is 5%.
3. Find expected frequency and chi square.
4. Determine whether you reject or do not reject H0 if the
significance level is 5%.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 31


Example (Answer)

1. H0: The absent due to accidents is independent


from the types of employees.
H1: The absent due to accidents is dependent
from the types of employees.
2. Degree of freedom df = (3 - 1)(2 – 1) = 2.
𝜒 2 (table) = 5.991

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 32


3. Expected (E) =
Men Women Juveniles Total
Up to 1 month 26 16 8 50
(E=25) (E=15.625) (E=9.375)
1 month or longer 14 9 7 30
(E=15) (E=9.375) (E=5.625)
Total 40 25 15 80

Type of (𝑶 − 𝑬)𝟐
O E (O – E)2 𝑬
employee
Up to 1 month Men 26 25 1.000 0.040
Women 16 15.63 0.141 0.009
Juveniles 8 9.375 1.891 0.202
1 month or longer Men 14 15 1.000 0.067
Women 9 9.375 0.141 0.015
Juveniles 7 5.625 1.891 0.336

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 33


2

 =
( O − E)
= 0.668
E

4. Since 0.668 < 5.99, we fail to reject H0. Therefore the absent
due to accidents is independent from the types of employees.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 34


Quick Review Question

A random sample of 400 households is classified by two characteristics:

Whether they own a colour television and by what type of householders (ie:
owner-occupier, private tenant, council tenant). The results investigations
are:
Actual Frequencies
Owner Council Private TOTAL
occupier tenant tenant
Colour TV 150 60 20
No Colour TV 45 68 57
TOTAL

Test at 5% level of significance for the relationship between the two


classifications.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 35


Quick Review Question
A random sample of 400 households is classified by two
characteristics: Whether they own a colour television and by what
type of householders (ie: owner-occupier, private tenant, council
tenant). The results investigations are:
Actual Frequencies
Owner Council Private
occupier tenant tenant
Colour TV 150 60 20
No Colour TV 45 68 57

Test at 5% level of significance for the relationship between the


two classifications.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 36


Follow Up Assignment

▪Tutorial Questions

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 37


Summary of Main Teaching Points

➢ Hypothesis or significant testing is testing


a belief or opinion by statistical methods.
➢ Significance levels are complementary
concepts to confidence limits.
➢ The Null hypothesis usually assumes there
is no difference between observed and
believed values.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 38


➢ A one-tailed test is concerned with only one
tail of the distribution I.e. a difference in one
direction only.
➢ The Chi-squared (2) distribution is used for
comparing an actual distribution with an
expected distribution.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 39


➢ A shorthand way of expressing the level of
significance for a test is 20.05, i.e. a 2 test
using a 5% level of significance, t0.01 I.e. a t
test using a 1% level of significance and so
on.

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 40


Summary of Main Teaching
Points
➢ Hypothesis testing on population mean and proportion

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 41


Question and Answer Session

Q&A

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 42


What To Expect Next Week

In Class Preparation for Class


• Decision Making Techniques

AQ077-3-2-PSMOD & Probability & Statistical Modelling Hypothesis Testing SLIDE 43

You might also like