0% found this document useful (0 votes)
49 views50 pages

Mod 5 Hypo1fin

This document provides an overview of hypothesis testing including: - The objectives are to formulate null and alternative hypotheses, correctly formulate a decision rule, use test statistics and critical values to test hypotheses, and perform one-sample t-tests in Excel. - Key terms are defined like the null hypothesis (H0), alternative hypothesis (H1), level of significance, test statistic, critical region, and critical value. - Examples of forming null and alternative hypotheses for different scenarios are provided. - The types of one-tailed and two-tailed hypothesis tests are explained.
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)
49 views50 pages

Mod 5 Hypo1fin

This document provides an overview of hypothesis testing including: - The objectives are to formulate null and alternative hypotheses, correctly formulate a decision rule, use test statistics and critical values to test hypotheses, and perform one-sample t-tests in Excel. - Key terms are defined like the null hypothesis (H0), alternative hypothesis (H1), level of significance, test statistic, critical region, and critical value. - Examples of forming null and alternative hypotheses for different scenarios are provided. - The types of one-tailed and two-tailed hypothesis tests are explained.
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/ 50

Module 5

Hypothesis Testing
Xavier-
Ateneo
Mathematics
Department
Lesson Objectives

LO1 LO3
Formulate null and alternative hypotheses for use the test statistic, and critical value
applications involving a single population approaches to test the null hypothesis.
mean;

LO2 LO4
Correctly formulate a decision rule for Perform one-sample t-test using MS Excel
testing a null hypothesis.
01
Introduction
Hypothesis Testing
Introduction

● In this chapter we will explore


➢ hypothesis testing, which involves
making educated guesses about a
population based on a sample drawn
from the population.
Goal of Hypothesis Testing
● The general goal of a
hypothesis test is to
rule out chance
(sampling error) as a
plausible explanation
for the results from a
research study
“When we are testing our hypothesis
➢ we will run a statistical procedure to
determine if there is a significant
relationship.
Statistically significant means the difference in
the results did not occur by random
chance.
Important Terms
It is sometimes referred to as the
Null hypothesis hypothesis of no difference .It always
contain the ‘=’ sign (either ).
The null hypothesis,
H0, is a statement that Is always about a population
specifies a particular parameter, not about a sample
value (or values) for the statistic
parameter being studied.
It is the hypothesis that is being H0 : X = 3
tested. H0 : μ = 3
Example In the 1970s, 20–29 year old men in
the Philippines had a mean μ body
weight of 170 pounds. Standard
deviation σ was 40 pounds. We test
whether mean body weight in the
population now differs.

Null hypothesis

H0: μ = 170 (“no difference”)


Important Terms
Alternative Hypothesis
The alternative hypothesis, It is an assertion that holds if the null
H1, specifies those values hypothesis is false.
of the parameter that
❖Never contains the “=” , “≤” or “” sign
represent an important
change from the null ❖May or may not be proven
hypothesis. It opposes
the null hypothesis. ❖Is generally the hypothesis that the
researcher is trying to prove
Example In the 1970s, 20–29 year old men in
the Philippines had a mean μ body
weight of 170 pounds. Standard
deviation σ was 40 pounds. We test
whether mean body weight in the
population now differs.

The alternative hypothesis can


be either

H1: μ > 170 (one-sided test) or


H1: μ ≠ 170 (two-sided test)
There are three possible choices for the set of null and alternative hypotheses
to be used for a given test. Described in terms of an (unknown) population
mean , they might be listed as shown below.

Null Hypothesis Alternative Hypothesis


𝜇 = 𝜇0 𝜇 ≠ 𝜇0

𝜇 ≤ 𝜇0 𝜇 > 𝜇0

𝜇 ≥ 𝜇0 𝜇 < 𝜇0
Example 1 Null Hypothesis
Our null hypothesis states that the
population has a mean equal to 14
milligrams. (H0: μ = 14 mg )

We have a medicine that is being


manufactured and each pill is Alternative Hypothesis
supposed to have 14 milligrams of
the active ingredient. What are our Our alternative hypothesis states
null and alternative hypotheses? that the population has a mean
that is different from 14
milligrams.
H1: μ ≠ 14 mg (two-sided test)
Example 2 Null Hypothesis
The mean number of hours worked by
the undergraduate students is at
most 20 per week
In today’s economy, university students
(H0: μ ≤ 20 hours )
often work many hours to help pay for
the high costs of a college education.
Suppose a university in a certain city is Alternative Hypothesis
considering changing its class schedule
to accommodate students working The mean number of hours worked by
long hours. The registrar has stated a the undergraduate students is more
change is needed because the mean than 20 per week
number of hours worked by (H0: μ > 20 hours )
undergraduate students at the university
is more than 20 per week.
Example 3 Null Hypothesis
Our null hypothesis states that the
mean call time is at least 540
The Qwest Company operates service
seconds
centers in various cities where customers
can call to get answers to questions about (H0: μ ≥ 540 sec )
their bills. Previous studies indicate that
the distribution of time required for each Alternative Hypothesis
call is normally distributed, with a mean
equal to 540 seconds. Company officials Our alternative hypothesis states
have selected a random sample of 16 calls that the mean call time is less
and wish to determine whether the mean than 540 seconds
call time is now fewer than 540 seconds
after a training program given to call center H1: μ < 540 sec
employees.
Types of Hypothesis Test

Hypothesis tests are formulated


as either one-tailed tests or two-
tailed tests depending on how the
null and alternative hypotheses A test is said to be one- tailed if
are presented. the alternative hypothesis is any
of the following

Left -tailed Right -tailed


Types of Hypothesis Test

Hypothesis tests are formulated


as either one-tailed tests or two- A test is said to be two - tailed if
tailed tests depending on how the the alternative hypothesis is
null and alternative hypotheses stated as
are presented.
Exercise
A manufacturer of IT gadgets recently announced they
1 had developed a new battery for a tablet and claimed that
it has an average life of at least 24 hours. Which is the
appropriate null and alternative hypotheses?

A. Ho: 𝜇 = 24 , 𝐻1: 𝜇 ≥ 24
B. Ho: 𝜇 ≤ 24 , 𝐻1: 𝜇 > 24
C. Ho: 𝜇 < 24 , 𝐻1: 𝜇 ≥ 24
D. Ho: 𝜇 ≥ 24 , 𝐻1: 𝜇 < 24
Exercise
An electric company claims that an electric iron consumes 5
2 kilowatt per hour but a group of housewives believe that it is not
true. Which the correct alternative hypothesis?

A. The mean consumption of the electric iron is equal to 5 kilowatt per


hour.
B. The mean consumption of the electric iron is less than 5 kilowatt per
hour.
C. The mean consumption of the electric iron is greater than 5 kilowatt per
hour.
D. The mean consumption of the electric iron is not equal to 5 kilowatt per
hour.
Exercise
A retail store claims that the average weight per sack of rice
3 is 50 kilos but a group of customers believe that each sack
of rice is underfilled. What is the appropriate null and
alternative hypotheses for the test?

A. Ho: 𝜇 = 50 𝑘𝑔 , 𝐻1: 𝜇 > 50


B. Ho: 𝑥 ≥ 50 𝑘𝑔 , 𝐻1: 𝑥ҧ < 50 𝑘𝑔
C. Ho: 𝜇 ≥ 50 , 𝐻1: 𝜇 < 50
D. Ho: 𝑥ҧ ≤ 50 , 𝐻1: 𝑥ҧ > 50
Important Terms

Level of Significance Test Statistic


The probability of committing
a Type I error is the The test statistic is a
level of significance of statistic computed from
the test. It is the maximum the sample on which the
probability with which we decision to reject or not
are willing to commit a to reject H0 is based. If
Type I error. In practice, the computed test
usually set at 0.05 statistic falls in the
(*significant) or 0.01 (** rejection region, the H0
highly significant) is rejected
Important Terms
The Critical or Rejection Region(s)
The sampling distribution of the test
statistic is divided into two regions, ❖ The size of the critical region is
the rejection region determined by the alpha level.
(also known as critical region) and the Sample data that fall in the critical
nonrejection region. region will warrant the rejection of
The rejection region is a part of the set the null hypothesis.
of all possible values of a test
statistic for which H0 is rejected
Important Terms
Critical Value(s)
The critical value is the boundary
between the rejection region and
the nonrejection region

The critical value is a value from a


table (z-table or t-table) that
separates the critical region(or
rejection region) from the non-
rejection region
Critical(rejection) region for a Two-
Location of the Critical region(s) Tailed Test

Critical(rejection) region for a Left-Tailed Test

Critical(rejection) region for a right-


Tailed Test
1. Testing One Population Mean (Z test, t test)

The degrees of freedom relate to the number of observations that are free to vary.
Test of
Hypothesis
for Single
Population
Mean
Critical value(s) and critical regions(s) when using z-test

Note: z𝛼 is a value that is found in the z table


Critical Values when using z-test
Critical value(s) and critical regions(s) when using t-test

Note: t(df, 𝛼) is a value that is found in the z table


Z distribution – based on the Standard
Normal Distribution
Properties of a Normal Distribution
■ The normal curve is symmetrical
about the mean μ;
■ In a standard normal distribution, the
mean is zero.
■ The mean is at the middle and divides
the area into halves;
■ The total area under the curve is equal
to 1;
■ It is completely determined by its
mean and standard deviation σ (or
variance σ2)
t distribution
Properties of the t Distribution
 It is, like the Z distribution, a bell-shaped,
symmetrical, continuous distribution.
 There is not one t distribution but rather a
“family” of t distributions. All have the
same mean (center) of zero, but their
standard deviations differ according to the
sample size n.
 The t distribution is more spread out and
flatter at the center than the Z distribution.
 However, as the sample size increases, the
t distribution approaches the standard
normal distribution.
Steps in Hypothesis Testing
Gather data and compute for
Decide on the level of the value of the test
significance. statistic using the sample
data.

Step 1 Step 2 Step 3 Step 4

State the null and Determine the appropriate


alternative statistical test.(z- test or t-
hypotheses test)( refer to the table )
Steps in Hypothesis Testing
Check if the test statistic falls in the region
of rejection. If yes, reject Ho.
Make the decision. ( Reject Ho or do not
reject Ho.) If we reject the null hypothesis
in favor of the alternative, we
conclude that there is enough
evidence to support the
Step 5 Step 6 Step 7
alternative hypothesis.

If we fail to reject the null


hypothesis we conclude that
Determine the State the there is not enough evidence to
critical region. conclusion support the alternative
hypothesis.

Note!!! Failing to reject the null hypothesis does not necessarily mean that it is true, only
that we do not have enough to reject it.
Solution
Example 1 Let 𝜇= mean lifetime of light bulbs in hours

Lighthouse Electrical Company


manufactures light bulbs that have a Null &Alternative Hypothesis
lifetime that is approximately normally
H0: The mean lifetime of light bulbs is 750
distributed with a mean of 750 hours. A
hours.
random sample 30 bulbs has been tested H1: The mean lifetime of light bulbs is
and showed a mean lifetime of 738 significantly different from 750 hours.
hours. It has been known that the (In symbols)
population standard deviation is 37.5 H0: μ = 750 hours
hours. At 0.05 level of significance, test
the hypothesis that the mean lifetime of H1: μ ≠ 750 hours
light bulbs is significantly different from
750 hours.
Solution
Example 1
Significance Level 𝛼 = 0.05
Lighthouse Electrical Company
manufactures light bulbs that have a Test Statistic
lifetime that is approximately normally Since 𝜎 is known and the distribution is
distributed with a mean of 750 hours. A approximately normally distributed, then the
random sample 30 bulbs has been tested appropriate test statistic is Z test where
and showed a mean lifetime of 738 𝑥lj − 𝜇
𝑍=𝜎
hours. It has been known that the ൗ 𝑛
population standard deviation is 37.5
hours. At 0.05 level of significance, test
the hypothesis that the mean lifetime of
light bulbs is significantly different from
750 hours.
Example 1 Based from the Z distribution table,
the critical value of the test is  1.96

Rejection region(s)
Since it is a two-tailed test based on
H1 :   750
hours, the rejection regions are in both tails
of the Z distribution, given by

Thus, H0 is rejected if
Z  −Z or Z  Z 
2 2 Z  −1.96 or Z  1.96
Z  − Z 0.025 or Z  Z 0.025

otherwise, H0 is not rejected.


Statistical decision
Example 1
Since Z = -1.75 is not in the rejection
region, H0 is not rejected.
Computation of the test statistic
(Note: Z = -1.75 is within the non-rejection
x− 738 − 750 region between -1.96 to 1.96)
Z= = = −1.75
 37.5
n 30 Conclusion
There is no sufficient evidence to claim that the
mean lifetime of the light bulbs is significantly
different from 750 hours.
Solution
Example 2 Let 𝜇= mean time to pack one dozen of
hotdog manually
A manager of a hotdog company claims
that mean time to pack one dozen of Null &Alternative Hypothesis
hotdog manually is 11 seconds. Suppose
H0: The mean length of time to pack one
a random sample of 20 workers spent a
dozen of hotdog manually is 11 seconds.
mean of 13 seconds with a standard H1: The mean length of time to pack one
deviation of 2.3 seconds to pack a dozen dozen of hotdog manually is more than 11
of hotdog. At 0.01 level of significance, seconds.
do the sample results provide sufficient H0: μ = 11 second
evidence to conclude that it takes more
than 11 seconds to pack one dozen of H1: μ > 11 seconds
hotdog manually? Assume that the length
of time is normally distributed.
Solution
Example 2
Significance Level 𝛼 = 0.01
A manager of a hotdog company claims
that mean time to pack one dozen of Test Statistic
hotdog manually is 11 seconds. Suppose
Since 𝜎 is unknown and the distribution of the
a random sample of 20 workers spent a length of time is normally distributed, and the
mean of 13 seconds with a standard sample size n = 20 (less than 30)
deviation of 2.3 seconds to pack a dozen
of hotdog. At 0.01 level of significance,
do the sample results provide sufficient lj
𝑥−𝜇
evidence to conclude that it takes more t= 𝑠
ൗ 𝑛
than 11 seconds to pack one dozen of
hotdog manually? Assume that the length
of time is normally distributed.
Example 2 Based from the distribution table, the
critical value of the test is +2.539

Rejection region(s)
Since it is a one-tailed test based on
𝐻1 : 𝜇 > 11 sec
, the rejection region is in the right tail of the
t distribution, given by

t  t Thus, H0 is rejected if

t  t 0.01 t > 2.539


otherwise, H0 is not rejected.
with degrees of freedom
df = n − 1 = 20 − 1 = 19
Statistical decision
Example 1
Since Z = 3.889 is in the rejection
region, H0 is rejected.
Computation of the test statistic
x −  13 − 11
t = = = 3.889
s 2.3
n 20
Conclusion
t = 3.889 There is sufficient evidence to claim that that
mean time to pack one dozen of hotdog
manually is more than 11 seconds.
Possible Errors in Hypothesis
Test Decision Making

Type I Error Type II Error


▪ Reject a true null hypothesis
▪ Considered a serious type of error ▪ Failure to reject false null
▪ The maximum probability of a Type I hypothesis
Error is  ▪ The probability of a Type II Error is
▪ Called level of significance of the test β
▪ Set by researcher in advance
p-value

Note: When A p-value is the probability of observing a


using test statistic value as extreme as the one
statistical computed from the sample data if the null
hypothesis is true.
software, it
gives a p-
value. As a rule of thumb, H0 is rejected if the p-
value is less than or equal to  (level of
significance).
Once you’ve calculated your test statistic,
you calculate the probability of that test
statistic occurring by chance (p-value).
The bigger the test statistic will be, and the
more unlikely it is to occur by chance.
One Sample t test in Excel
DOLE conducts a study on the mean age of call center agents in Cagayan de Oro
City. Test at  = 0.05 level of significance that the population mean age of
call center agents in CdeO is significantly greater than 20 given the following
ages:
36 28 21 25 31 17 22 18 18
29 21 26 17 18 30 19 19 28
Null and alternative hypotheses

Null and alternative hypotheses


H 0 :  = 20 yrs.old H1 :   20 yrs.old

Note: Check for normality of data before performing t-test.


One Sample t test in Excel
Note: t test for one sample is not available in Excel 2007 but we can trick a “fool
Excel” to do it :))

Steps:
1. Encode the AGE data in a column. Add a DUMMY data with at
least two zeroes.
2. Click Data – Data Analysis – t-test: Two Samples Assuming
Unequal Variances

H 0 :  = 20 yrs.old H 0 :  − 0 = 20 yrs.old
One Sample t test in Excel
Note: t test for one sample is not available in Excel 2007 but we can trick a “fool
Excel” to do it :))

Steps:
3.Enter the following:
Variable 1 Range: Highlight Age Data
Variable 2 Range: Highlight Dummy
Hypothesized Mean Difference: 20
Check Labels.
Alpha: 0.05
Output Range: select any cell where
you want to display the output

4. Click OK.
One Sample t test in Excel
Edited Table
t-Test: Two-Sample Assuming Unequal Variances t-Test: One-Sample

AGE Dummy AGE


Mean 23.5 0 Mean 23.5
Variance 33.2058824 0 Variance 33.2058824
Observations 18 2 Observations 18
Hypothesized Mean Difference 20 Hypothesized Mean 20
df 17 df 17
t Stat 2.57689537 t Stat 2.57689537
P(T<=t) one-tail 0.00979665 P(T<=t) one-tail 0.00979665
t Critical one-tail 1.73960673 t Critical one-tail 1.73960673
P(T<=t) two-tail 0.0195933 P(T<=t) two-tail 0.0195933
t Critical two-tail 2.10981558 t Critical two-tail 2.10981558
One Sample t test in Excel
Interpretation
Decision Rule (one-tailed test)
1. Based on critical value: Reject Ho in favor of H1 if t stat > t Critical one-tail
2. Based on p-value: Reject Ho in favor of H1 if P(T<=t) one-tail  0.05.
t-Test: One-Sample

AGE
Decision/Conclusion: Reject Ho. There is enough evidence to
Mean 23.5 infer that the mean age of call center agents in CdeO is
Variance 33.2058824 significantly greater than 20 years old.
Observations 18
Hypothesized Mean 20
df 17
t Stat 2.57689537 greater than t Critical One-tail 1.7396
P(T<=t) one-tail 0.00979665 p-value is less than 0.05
t Critical one-tail 1.73960673
P(T<=t) two-tail 0.0195933
t Critical two-tail 2.10981558
Seatwork F1
Thanks!
Do you have any questions?
[email protected]
09164853817

You might also like