You are on page 1of 46

UGBS 301

Quantitative Methods for Business


Session 10: Introduction to Hypothesis Testing

Slide 1
Session Goals

After completing this section, you should be able to:


• Formulate null and alternative hypotheses for
applications involving a single population mean or
proportion
• Formulate a decision rule for testing a hypothesis
• Know how to use the test statistic, critical value, and p-
value approaches to test the null hypothesis
• Know what Type I and Type II errors are
• Compute the probability of a Type II error
Reading List

1. Read chapter 9 of Groebner, Shannon, Fry, and Smith


2. Read chapter 9 of Anderson, Sweeney, and Williams

Slide 3
What is a hypothesis

• A hypothesis is a claim (assumption) about a


population parameter:
Example: Your friend makes the following claims:
–population mean

The mean monthly cell phone bill of this city


is  = GHS42
–Population proportion
The proportion of adults in this city with cell
phones is p = .68
The Null Hypothesis, H0

• The null hypothesis is a statement about a population


parameter that will be assumed to be true during the conduct
of the hypothesis test.

• The null hypothesis is either rejected or accepted based on a


sample data
• Example: The average number of TV sets in a typical
Ghanaian home is at least 3

H0 : μ  3 H0 : x  3
The Null Hypothesis, H0

• The null hypothesis States the assumption (numerical) to


be tested.
• The test is always about the population parameter, not
about a sample statistic, although the test is proven using a
sample.
• Begin with the assumption that the null hypothesis is true
– Similar to the notion of innocent until proven guilty
• Refers to the status quo
• Always contains “=” , “≤” or “” sign
• May or may not be rejected
The Alternative Hypothesis, HA

• The alternative hypothesis is the opposite of the


null hypothesis
–e.g.: The average number of TV sets in Ghanaian
homes is less than 3 ( HA:  < 3 )
• Challenges the status quo
• Never contains the “=” , “≤” or “” sign
• May or may not be accepted
• Is generally the hypothesis that is believed (or
needs to be supported) by the researcher
Formulating a hypothesis

The packaging division of a rice factory would want to


know if bags of rice are filled according to the 5kg target
or significantly below or above the 5kg target.
The status quo is 𝜇 = 5𝑘𝑔. Therefore, the hypothesis test
is:
𝐻0 : 𝜇 = 5𝑘𝑔 (status quo)
𝐻𝐴 : 𝜇 ≠ 5𝑘𝑔
Formulating a hypothesis

Average waiting time at Ecobank Legon branch on Monday-Wednesday


is approximately 15 min which management would want to maintain or
improve upon. Therefore, occasionally, management randomly pick
customers and track the time spent between when the enter the bank
and when they are served.
The status quo is
𝐻0 : 𝜇 ≤ 15 𝑚𝑖𝑛
𝐻𝐴 : 𝜇 > 15𝑚𝑖𝑛
Only if the sample mean waiting time is ‘substantially’ greater than 15
min will Ecobank managers reject the null hypothesis and conclude they
should probably increase the number of staff to attend to customers.
Errors in Making Decisions

• Different samples would give different values, therefore


result based on samples could technically give results
quite different from the population mean.
• For example, the null hypothesis about the population
could be true but due to using result from a sample, it
could be rejected.
• Likewise, the alternative hypothesis could be rejected
although true.
• In such cases, we say, the researcher has made and ‘error’
Errors in Making Decisions

• Type I Error
–Reject a true null hypothesis
–Considered a serious type of error
The probability of Type I Error is 
• Called level of significance of the test
• Set by researcher in advance
Type II Error
–Fail to reject a false null hypothesis
The probability of Type II Error is β
Outcomes and Probabilities

Possible Hypothesis Test Outcomes

State of Nature
Decision H0 True H0 False
Do Not
No error Type II Error
Key: Reject
(1 -α) (β)
Outcome
(Probability) Reject Type I Error No Error
H () (1-β)
Level of Significance, 

• The level of significance is the probability of making a


Type I error when the null hypothesis is true as an
equality.
• Defines rejection region of the sampling distribution

• Is designated by  , (level of significance)


–Typical values are .01, .05, or .10
• Is selected by the researcher at the beginning

• Provides the critical value(s) of the test


Level of Significance, 
In a hypothesis test for say, a single population mean, 𝑥,ҧ is used to test the
hypothesis under consideration. However, note that even if 𝐻0 is true, it is
possible certain values of 𝑥ҧ will support 𝐻𝐴 due to sampling error. In other
words, there is room for error. Given the room for error therefore, what is
the probability of rejecting 𝐻0 ? This probability is referred to as the level of
significance, 𝛼.
In the example below, 𝐻0 : 𝜇 ≤ 25 𝑑𝑎𝑦𝑠 and 𝐻𝐴 : 𝜇 > 25 𝑑𝑎𝑦𝑠
If 𝑥ҧ happens to fall in the rejection region, one might conclude that 𝐻𝐴 is
true. However, what if this is false? That is, 𝐻0 is true but is rejected. The
chances of making such error is the significance level.
Level of Significance
and the Rejection Region

Level of significance =  Represents


critical value
H0: μ ≥ 3 
HA: μ < 3 Rejection
Lower tail test 0 region is
shaded
H0: μ ≤ 3 
HA: μ > 3
Upper tail test 0

H0: μ = 3 /2 /2


HA: μ ≠ 3
Two tailed test 0
Chap 8-15
Critical Value
Approach to Testing
• Convert sample statistic to test statistic ( Z or t
statistic )

• Determine the critical value(s) for a specified


level of significance  from a table or computer

• If the test statistic falls in the rejection region, reject


H0 ; otherwise do not reject H0
One Tailed Test: Lower Tail
H0: μ ≥ 3
◼ The cutoff value -zα, is HA: μ < 3
called a critical value

Reject H0 Do not reject H0


-zα 0

Reject 𝐻0 if 𝑍 ≤ −𝑍𝛼
One Tailed Test: Upper Tail

H0: μ ≤ 3
◼ The cutoff value zα, is
called a critical value HA: μ > 3

Do not reject H0 Reject H0


0 zα

Reject 𝐻0 if 𝑍 ≥ 𝑍𝛼
Two Tailed Tests

◼ There are two cutoff H0: μ = 3


values (critical values): HA: μ  3

± zα/2
/2 /2

Reject H0 Do not reject H0 Reject H0


-zα/2 0 zα/2

Reject 𝐻0 if 𝑍 ≥ 𝑍𝛼/2 or if 𝑍 ≤ −𝑍𝛼/2


Critical Value
Approach to Testing

• Convert sample statistic ( x ) to a test statistic


( Z or t statistic )
Hypothesis
Tests for 

 Known  Unknown

Large Small
Samples Samples
Calculating the Test Statistic

Hypothesis
Tests for μ

 Known  Unknown

The test statistic is:


Large Small
x −μ
z = Samples Samples
σ
n
Calculating the Test Statistic

Hypothesis
Tests for 

 Known  Unknown

The test statistic is:


But is sometimes
approximated Large Small
x −μ using a z:
t n−1 = x −μ
Samples Samples
s z =
σ
n n
Calculating the Test Statistic

Hypothesis
Tests for 

 Known  Unknown

The test statistic is:


Large Small
x −μ
t n−1 = Samples Samples
s
n (The population must be
approximately normal)
Calculating the Test Statistic

• 1. Specify the population value of interest


• 2. Formulate the appropriate null and alternative
hypotheses
• 3. Specify the desired level of significance
• 4. Determine the rejection region
• 5. Obtain sample evidence and compute the test
statistic
• 6. Reach a decision and interpret the result
Hypothesis Testing Example

Test the claim that the true mean # of TV sets in


Ghanaian homes is at least 3. Assume σ = 0.8 and that
a sample of 100 is taken and the sample mean is 2.84)
Note: The claim is a general belief out there, and the researcher wants to prove the truth thereof
◼ 1. Specify the population value of interest
◼ The mean number of TVs in Ghanaian homes

◼ 2. Formulate the appropriate null and alternative


hypotheses
◼ H0: μ  3 HA: μ < 3 (This is a lower tail test)
◼ 3. Specify the desired level of significance
◼ Suppose that  = .05 is chosen for this test
Chap 8-25
Hypothesis Testing Example
(continued)
• 4. Determine the rejection region

 = .05

Reject H0 Do not reject H0

-zα= -1.645 0

This is a one-tailed test with  = .05.


Since σ is known, the cutoff value is a z value:
Reject H0 if z < -z = -1.645 ; otherwise do not reject H0
Hypothesis Testing Example
• 5. Obtain sample evidence and compute the test
statistic
𝑛 = 100, 𝑥ҧ = 2.84, 𝜎 = 0.8 is assumed known.

Then the test statistic is:

x−μ 2.84 − 3 − .16


z = = = = −2.0
σ 0.8 .08
n 100
Hypothesis Testing Example
• 6. Reach a decision and interpret the result (continued)

 = .05

z
Reject H0 Do not reject H0

-1.645 0
-2.0
Since z = -2.0 < -1.645, we reject the null
hypothesis that the mean number of TVs in
Ghanaian homes is at least 3
p-Value Approach to Testing

• Convert Sample Statistic (e.g. 𝑥)ҧ to test Statistic ( Z


or t statistic).
• Obtain the p-value (from a table or computer ) that
matches with the test statistic.
• Compare the p-value with .
–If p-value <  , reject H0
–If p-value   , do not reject H0
p-Value Approach to Testing

• p-value: Probability of obtaining a test statistic


more extreme ( ≤ or  ) than the observed
sample value given H0 is true
–Also called observed level of significance

–Smallest value of  for which H0 can be rejected


p-value example

• Example: How likely is it to see a sample mean of 2.84 (or


something further below the mean) if the true mean is  = 3.0?

 = .05
P( x  2.84 | μ = 3.0)
p-value =.0228
 
 2.84 − 3.0 
= P z  
0.8 x
 
 100 
2.8684 3
= P(z  −2.0) = .0228
2.84
p-value example
(continued)
• Compare the p-value with 

– If p-value <  , reject H0


– If p-value   , do not reject H0
 = .05
Here: p-value = .0228 p-value =.0228
 = .05
Since .0228 < .05, we reject
the null hypothesis
2.8684 3
2.84
Example: Upper Tail z Test
for Mean ( Known)

A phone industry manager thinks that customer monthly cell


phone bill have increased, and now average over GHS52 per
month. The company wishes to test this claim. (Assume  = 10
is known and that a sample of 64 is taken and the sample mean
is 53.1)

Form hypothesis test:


H0: μ ≤ 52 the average is not over GHS52 per month
HA: μ > 52 the average is greater than GHS52 per month
(i.e., sufficient evidence exists to support the
manager’s claim)
Example: Find Rejection Region
• Suppose that  = .10 is chosen for this test (continued)

Find the rejection region: Reject H0

 = .10

Do not reject H0 Reject H0


0 zα=1.28

Reject H0 if z > 1.28


Example: Test Statistic
(continued)
Obtain sample evidence and compute the test statistic
Suppose a sample is taken with the following results: n = 64, x = 53.1
(=10 was assumed known)

–Then the test statistic is:

x−μ 53.1 − 52
z = = = 0.88
σ 10
n 64
Example: Decision
Reach a decision and interpret the result:

Reject H0

 = .10

Do not reject H0 Reject H0


1.28
0
z = .88
Do not reject H0 since z = 0.88 ≤ 1.28
i.e.: there is not sufficient evidence that the
mean bill is over GHS52
p -Value Solution

Calculate the p-value and compare to 

p-value = .1894
P( x  53.1| μ = 52.0)
Reject H0
 = .10  
 53.1− 52.0 
= P z  
 10 
0  64 
Do not reject H0 Reject H0
1.28 = P(z  0.88) = .5 − .3106
z = .88 = .1894

Do not reject H0 since p-value = .1894 >  = .10


Example: Two-Tail Test
( Unknown)

The average cost of a hotel


room in New York is said to
be $168 per night. A
random sample of 25
hotels resulted in
𝑥ҧ = $172.50 and H0: μ = 168
s = $15.40. Test at the HA: μ  168
 = 0.05 level.
(Assume the population distribution is normal)
Example Solution: Two-Tail Test

H0: μ = 168 /2=.025 /2=.025


HA: μ  168

▪  = 0.05 Reject H0 Do not reject H0 Reject H0


tα/2
-tα/2 0
▪ n = 25 -2.0639 2.0639
1.46
▪  is unknown, so x −μ 172.50 − 168
t n −1 = = = 1.46
use a t statistic s 15.40
▪ Critical Value: n 25

t24 = ± 2.0639 Do not reject H0: not sufficient evidence that


true mean cost is different than $168
Hypothesis Tests for Proportions

• Involves categorical values


• Two possible outcomes
–“Success” (possesses a certain characteristic)
–“Failure” (does not possesses that characteristic)

• Fraction or proportion of population in the


“success” category is denoted by p
Proportions
• Sample proportion in the success category is denoted by p
x number of successes in sample
– p= =
n sample size

• When both np and n(1-p) are at least 5, p can be approximated by a


normal distribution with mean and standard deviation

μP = p p(1 − p)
σp =
n
Hypothesis Tests for Proportions

• The sampling
distribution of p is Hypothesis
normal, so the test Tests for p
statistic is a z value:

np  5 np < 5
p−p and or
z= n(1-p)  5 n(1-p) < 5
p(1 − p)
Not discussed
n in this chapter
Example: z Test for Proportion

A marketing company
claims that it receives 8%
responses from its mailing.
To test this claim, a random
sample of 500 were
surveyed with 25
responses. Test at the  = Check:

.05 significance level. n p = (500)(.08) = 40



n(1-p) = (500)(.92) = 460

Chap 8-43
Z Test for Proportion: Solution

H0: p = .08 Test Statistic:


HA: p  .08 p−p .05 − .08
z= = = −2.47
p(1 − p) .08(1− .08)
 = .05
n = 500, p = .05 n 500
Critical Values: ± 1.96 Decision:
Reject Reject Reject H0 at  = .05
Conclusion:
.025 .025 There is sufficient
z evidence to reject the
-1.96 0 1.96
company’s claim of 8%
-2.47
response rate.
Chap 8-44
p -Value Solution
(continued)
Calculate the p-value and compare to 
(For a two sided test the p-value is always two sided)

Do not reject H0
Reject H0 Reject H0 p-value = .0136:
/2 = .025 /2 = .025
P(z  −2.47) + P(x  2.47)
.0068 .0068 = 2(.5 − .4932)
= 2(.0068) = 0.0136
-1.96 0 1.96

z = -2.47 z = 2.47

Reject H0 since p-value = .0136 <  = .05


• Addressed hypothesis testing methodology
• Performed z Test for the mean (σ known)
• Discussed p–value approach to hypothesis
testing
• Performed one-tail and two-tail tests
• Performed t test for the mean (σ unknown)
• Performed z test for the proportion

You might also like