Professional Documents
Culture Documents
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
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
7
The Rejection Region Method
8
The Rejection Region Method –
for a Right - Tail Test
Example 2 – solution continued
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.
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
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.
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
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
20
A Left -Tail Test
• The SSA envelop example – Solution continued
– The standardized one tail left hand test is:
xm 21 .63 22
z .91
s n 6 220
z z z.10 1.28
• 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
x 17.09 x
(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.
-1.19 0 1.19
-z/2 = -1.96 z/2 = 1.96
26
STEPS IN THE HYPOTHESIS-TESTING
PROCEDURE
35