You are on page 1of 35

Hypotheses Testing

1
Introduction
• The purpose of hypothesis testing is to determine
whether there is enough statistical evidence in favor of
a certain belief about a parameter.
• Examples
– Is there statistical evidence in a random sample of potential
customers, that support the hypothesis that more than 10% of the
potential customers will purchase a new products?
– Is a new drug effective in curing a certain disease? A sample of
patients is randomly selected. Half of them are given the drug
while the other half are given a placebo. The improvement in the
patients conditions is then measured and compared.
2
Concepts of Hypothesis Testing

• The critical concepts of hypothesis testing.


– Example:
• An operation manager needs to determine if the mean
demand during lead time is greater than 350.
• If so, changes in the ordering policy are needed.
– There are two hypotheses about a population mean:
• H0: The null hypothesis m = 350
• H1: The alternative hypothesis m > 350

3
Types of Errors
• Two types of errors may occur when deciding whether
to reject H0 based on the statistic value.
– Type I error: Reject H0 when it is true.
– Type II error: DO NOT REJECT H0 , failure to reject it
when in real. it is False.
• Example continued
– Type I error: Reject H0 (m = 350) in favor of H1 (m >
350) when the real value of m is 350.
– Type II error: Believe that H0 is correct, wrong to
reject (m = 350) when the real value of m is greater
than 350. 4
Testing the Population Mean When the
Population Standard Deviation is Known
• Example 2
– A new billing system for a department store will be
cost- effective only if the mean monthly account is
more than $170.
– A sample of 400 accounts has a mean of $178.
– If accounts are approximately normally distributed
with
s = $65, can we conclude that the new system will be
cost effective?
5
Testing the Population Mean (s is Known)

• Example 2 – Solution
– The population of interest is the credit accounts at
the store.
– The null hypothesis must specify a single value
of the parameter m, H0 : m = 170
– We want to know whether the mean account for all
customers is greater than $170.
H1 : m > 170
6
Approaches to Testing

• There are two approaches to test whether the


sample mean supports the null hypothesis (H0)
– The rejection region method is mandatory for
manual testing (but can be used when testing is
supported by a statistical software)
– The p-value method which is mostly used when a
statistical software is available.

7
The Rejection Region Method

The rejection region is a range of values such


that if the test statistic falls into that range,
the null hypothesis is rejected in favor of the
alternative hypothesis.

8
The Rejection Region Method –
for a Right - Tail Test
Example 2 – solution continued

• Recall: H0: m = 170


H1: m > 170
therefore,

• It seems reasonable to reject the null hypothesis and


believe that m > 170 if the sample mean is sufficiently large.

9
The Rejection Region Method
for a Right - Tail Test
Example 2 – solution continued
• Define a critical value xLfor xthat is just large enough
to reject the null hypothesis.

• Reject the null hypothesis if

x  xL
10
The standardized test statistic
– Instead of using the statistic x , we can use the
standardized value z.

x m
z
s n
– Then, the rejection region becomes
One tail test

z  z

11
The standardized test statistic

• Example 2 - continued
– We redo this example using the standardized test
statistic.
Recall: H0: m = 170
H1: m > 170
– Test statistic:
x m 178  170
z   2.46
s n 65 400
– Rejection region: z > z.05  1.645.
12
The standardized test statistic

• Example 2 - continued

Re ject the null hypothesis if


Z  1.645

Conclusion
Since Z = 2.46 > 1.645, reject the null
hypothesis in favor of the alternative
hypothesis.
13
P-value Method
– The p-value provides information about the amount of
statistical evidence that supports the alternative
hypothesis.

– The p-value of a test is the probability of observing a


test statistic at least as extreme as the one computed,
given that the null hypothesis is true.

– Let us demonstrate the concept on Example 2

14
Some terminology for testing
statistical hypotheses:
• p-value = probability of drawing a statistic (e.g. ) at least as adverse to the
null as the value actually computed with your data, assuming that the null
hypothesis is true.
• The significance level of a test is a pre-specified probability of incorrectly
rejecting the null, when the null is true. CHOSEN PROBABILITY, alpha
• Calculating the p-value based on :
p-value = P (|sample mean – population mean|>|actually observed mean – population mean|)
• COMPUTED PROBABILITY TO REJECT Ho WHEN IT IS TRUE<
alpha…reject the null

15
Interpreting the p-value

• Describing the p-value


– If the p-value is less than 1%, there is overwhelming
evidence that supports the alternative hypothesis.
– If the p-value is between 1% and 5%, there is a
strong evidence that supports the alternative
hypothesis.
– If the p-value is between 5% and 10% there is a
weak evidence that supports the alternative
hypothesis.
– If the p-value exceeds 10%, there is no evidence 16
Conclusions of a Test of Hypothesis
• If we reject the null hypothesis, we conclude that
there is enough evidence to infer that the alternative
hypothesis is true.

• If we do not reject the null hypothesis, we conclude


that there is not enough statistical evidence to infer
that the alternative hypothesis is true, NOT TO
ACCEPT THE NULL HYPOTHESIS
The alternative hypothesis
is the more important
one. It represents what
we are investigating. BUT WE DECIDE UPON THE NULL HYPOTHESIS 17
A Left - Tail Test
• The SSA Envelop Example.
– The chief financial officer in FedEx believes that
including a stamped self-addressed (SSA) envelop
in the monthly invoice sent to customers will
decrease the amount of time it take for customers to
pay their monthly bills.
– Currently, customers return their payments in 24
days on the average, with a standard deviation of 6
days.

18
A Left - Tail Test
• The SSA envelop example – continued
– It was calculated that an improvement of two days on the
average will cover the costs of the envelops (checks can
be deposited earlier).
– A random sample of 220 customers was selected and SSA
envelops were included with their invoice packs.
– The times customers’ payments were received were
recorded
– Can the CFO conclude that the plan will be profitable at
10% significance level? 

19
A Left - Tail Test

• The SSA envelop example – Solution


– The parameter tested is the population mean
payment period (m).
– The hypotheses are:
H0: m = 22
H1: m < 22 (The CFO wants to know whether the
plan will be profitable)

20
A Left -Tail Test
• The SSA envelop example – Solution continued
– The standardized one tail left hand test is:
xm 21 .63  22
z   .91
s n 6 220

Define the rejection region

z   z   z.10  1.28

Since -.91 > –1.28 do not reject the null hypothesis.


The p value = P(Z<-.91) = .1814
Since .1814 > .10, do not reject the null hypothesis
21
A Two - Tail Test

• Example 2
– AT&T has been challenged by competitors who
argued that their rates resulted in lower bills.
– A statistics practitioner determines that the mean
and standard deviation of monthly long-distance bills
for all AT&T residential customers are $17.09 and
$3.87 respectively.

22
A Two - Tail Test

• Example 2 - continued
– A random sample of 100 customers is selected and
customers’ bills recalculated using a leading
competitor’s rates
– Assuming the standard deviation is the same (3.87),
can we infer that there is a difference between
AT&T’s bills and the competitor’s bills (on the
average)?

23
A Two - Tail Test
• Solution
– Is the mean different from 17.09?
H0: m = 17.09
H1 : m  17.09
– Define the rejection region
z   z / 2 or z  z / 2

24
A Two – Tail Test
Solution - continued

/2  0.025 /2  0.025

x 17.09 x

If H0 is true (m =17.09), can still fall far above


x We want this erroneous
or far below 17.09, in which case we rejection of H0 to be a rare
erroneously reject H0 in favor of H1 event, say 5% chance.

(m  17.09)
25
A Two – Tail Test
There is insufficient evidence to infer that there is a
difference between the bills of AT&T and the
competitor.

xm 17 .55  17 .09 /2  0.025 /2  0.025


z   1.19
s n 3.87 100

-1.19 0 1.19
-z/2 = -1.96 z/2 = 1.96

26
STEPS IN THE HYPOTHESIS-TESTING
PROCEDURE

Stating the null and alternative hypotheses


 H0 : m   
Hypothesized value of population mean mH0
 The conclusion which is accepted contingent on the
rejection of H0 is known as the alternative hypothesis
H1 : m    or m    or m   
STEPS IN THE HYPOTHESIS-TESTING
PROCEDURE
Stating the null and alternative hypotheses
Selecting the level of significance
 criterionfor rejection or acceptance of the null hypothesis
 The minimum acceptable probability level is also the risk
of erroneously rejecting the null hypothesis when the null
hypothesis is true. This risk of erroneous rejection is
known as the level of significance, denoted by 
STEPS IN THE HYPOTHESIS-TESTING
PROCEDURE
Null and alternative hypotheses
Selecting the level of significance
 criterionfor rejection or acceptance of the null hypothesis
 The minimum acceptable probability level is also the risk
of erroneously rejecting the null hypothesis when the null
hypothesis is true. This risk of erroneous rejection is
known as the level of significance, denoted by 
STEPS IN THE HYPOTHESIS-TESTING
PROCEDURE
Null and alternative hypotheses
Level of significance
Determining the test distribution to use
 In the case of a single sample, we will be concerned only
with the normal Z distribution and the t distribution
STEPS IN THE HYPOTHESIS-TESTING
PROCEDURE
Null and alternative hypotheses
Level of significance
Test distribution
Defining the rejection or critical regions
 Once the appropriate test distribution has been
determined, it is then possible to specify in standard units
what a significant difference is
STEPS IN THE HYPOTHESIS-TESTING
PROCEDURE
Test distribution
Critical region
Stating the decision rule x

 Cannot reject H0 if the standardized difference between


sample mean and mH0 falls into the acceptance region
 “reject“ H0 if the standardized difference between sample
mean and mH0 falls into a rejection region
STEPS IN THE HYPOTHESIS-TESTING
PROCEDURE
Critical region
Decision rule
Making the necessary computations
 Collecta sample of items
 Estimate the parameter of interest
 Compute the critical ratio CR (also known as the
standardized test statistic)
x  m H0
CR 
sx
STEPS IN THE HYPOTHESIS-TESTING
PROCEDURE
Critical region
Decision rule
Necessary computations
7. Put z calc on the graph, falling into the rejection region or into
the NRR

8, Making a statistical decision


 If the value of the critical ratio falls into a rejection region,
the null hypothesis is rejected
STEP 9. LAST BUT NOT LEAST!

TAKE A MANAGEMENT DECISION

35

You might also like