Chapter8-upload - California State University San Marcos

download report

Transcript Chapter8-upload - California State University San Marcos

Chapter 8
Hypothesis Tests

What are Hypothesis Tests?
A set of methods and procedure to study the reliability of
claims about population parameters.
Examples of Hypotheses:
The air quality of San Diego meets federal
standards.
All the transactions of the audited firm
follow the GAAP.
Your supplier provides a product with less
than 1% defective rate.
Students at CSUSM travels longer than 30
minutes on average to school for education.
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
1
Step 1: Formulating
Hypotheses
 At the first step, two hypotheses
shall be formulated for testing.
Null Hypothesis ( H0 )
The statement about the population value
that will be tested. The null hypothesis will
be rejected only if the sample data provide
substantial contradictory evidence.
Alternative Hypothesis ( HA )
The hypothesis the includes all population
values not covered by the null hypothesis.
The alternative hypothesis is deemed to be
true if the null hypothesis is rejected.
Based on the sample data, we either reject
H0, or we do not reject H0.
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
2
Determining the null
hypothesis
 A null hypothesis is the basis for testing.
 Represents the situation that is assumed to be
true unless the evidence is strong enough to
convince the decision maker it is not true.
 Legal system: what do you think of a person if
there is not sufficient evidence that (s)he is
guilty?
 In the case of examining parts, if you are the
buyer, what would be your assumption when
there is no strong evidence?
 In the case of fire inspection, what would be your
assumption when examining a house’ condition?
 If we accept null hypothesis by mistake, it is not
so big a problem as mistakenly accept the
alternative hypothesis.
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
3
Example 8-1 (p.305)
Student Work Hours:
In today’s economy, many university students work
many hours, often full time, to help pay for the high
costs of a college education. Suppose a university in
the Midwest was considering changing its class
schedule to accommodate students working long
hours. The registrar has stated a change was
needed because the mean number of hours worked
by undergraduate students at the university is more
than 20 per week.
 Step 1: determine the population value of interest:
mean hours worked, .
 Step 2: Define the situation that is assumed to be
true unless substantial information exists to
suggest otherwise:
Would change only when strongly suggested
 Step 3: Formulate the hypotheses pair.
H0: 20, HA: >20
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
4
Research Hypothesis
 The hypothesis the decision maker attempts to
demonstrate to be true. Because this is the
hypothesis deemed to be the most important to
the decision maker, it will not be declared true
unless the sample data strongly indicate that it
is true.  HA
 Research projects:
 Students’ some habits may affect their GPA? You
cannot prove it unless you have strong evidence
 A company’s supplier has supplied more
defective products than specified in the contract.
 Women are discriminated and paid less for the
same job description.
 Professors in CSU systems are underpaid by the
state agencies, which has caused difficulties in
recruiting quality professors.
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
5
Types of errors
 As a result of hypothesis testing, you will need
to decide whether
 to reject null hypothesis; or
 to accept the null hypothesis (normally stated as
“failed to reject null hypothesis)
In either case, you may or may not make the
right decision.
 Type I error
 Rejecting the null hypothesis when it is, in fact,
true.
 Type II error
 Failing to reject the null hypothesis when it is, in
fact, false.
Which error is more serious?
see figure 8-1 (page 307) for the relationship
between decisions and states of nature.
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
6
Exercise
 Problem 8.7 (Page 323)
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
7
Constructing the
hypotheses Pair
 Constructing the hypotheses pair is the basis for
testing
 There are totally 3 types of hypothesis.
 Example:
1. The mean price of a beach house in
Carlsbad is at least $1million dollars
H0: μ ≥ $1million
HA: μ < $1million
2. The mean gas price in CA is no higher than
$3 per gallon
H0: μ ≤ $3 per gallon
HA: μ > $3 per gallon
3. The mean weight of a football quarterback is
$200lbs.
H0: μ = 200lbs
HA: μ  200lbs
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
8
Exercise
 Problem 8.1 (Page323)
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
9
How to decide the cutoff?
: Level of Significance
One-tailed vs. Two tailed.
= Maximum allowed probability of type I error
= Total blue area.
 One-tailed test:
 Upper tail test (e.g.  ≤ $1000)
Reject when the sample
mean is too high
 Lower tail test (e.g.  ≥$800)
Reject when the sample
mean is too low
Two-tailed test:
  =$1000
Nov 3, 2005
Reject when the sample
mean is either too high
or too low
BUS304 – Chapter 8 Hypothesis for Mean
10
Information needed in
hypothesis tests
 When  is known
 The claimed range of mean  (i.e. H0 and HA)
 When to reject: level of significance 
• i.e. if the probability is too small (even smaller
than ), I reject the hypothesis.
 Sample size n
 Sample mean
x
 When  is unknown
 The claimed range of mean  (i.e. H0 and HA)
 When to reject: level of significance 
• i.e. if the probability is too small (even smaller
than ), I reject the hypothesis.
 Sample size n
 Sample mean x
 Sample variance (or standard deviation):
s2 or s
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
11
Upper tail test
H0: μ ≤ 3
H A: μ > 3
Reject when the sample
mean is too high
z
 Level of Significance: 
 Generally given in the task
 The maximum allowed probability of type I error
 In other words, the size of the blue area
 The cutoff z-score. z
 The corresponding z-score which makes
P(z> z)= 
 In other words, P(0<z< z) = 0.5 - 
 Decision rule
 If zx > z, reject H0
 If zx ≤ z, do not reject H0
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
12
Example
 Problem 8.3 (P323)
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
13
Lower tail test
H0: μ ≥ 3
H A: μ < 3
Reject when the
sample mean is too low
 The cutoff z score is negative
 z <0
 Decision rule:
 If zx < z, reject H0
 If zx ≥ z, do not reject H0
 The hypothesis is rejected only when you get a
sample mean too low to support it.
 Exercise: Problem 8.5 (Page 323)
assuming that =210
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
14
Two-tailed tests
H 0: μ = 3
HA: μ  3
/2
/2
 The null hypothesis is rejected when the
sample mean is too high or too low
 Given a required level of significance 
 There are two cutoffs. (symmetric)
 The sum of the two blue areas is .
 So each blue area has the size /2.
 The z-scores:
z and -z
2
Nov 3, 2005
2
BUS304 – Chapter 8 Hypothesis for Mean
15
Decision Rule for twotailed tests
H 0: μ = 3
HA: μ  3
/2
/2
 Decision rule for two-tailed tests
 If zx > z/2, reject H0
 Or, if zx < -z/2, reject H0
 Otherwise, do not reject H0
Exercise 8.8
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
16
Hypothesis testing Steps
When  is known
 Step 1: Construct the hypotheses pair H0 / HA.
 Step 2: Write down the decision rule
 One-tailed? Upper or lower?
 Two-tailed?
 Step 3: Find out the cutoff z-score (normal table)
Drawing always help!
z one-tailed.
two-tailed.
 for
 Step
4: Find outzthe
z-score
for sample mean
2
x-μ
zx =
 Step 5:compare the z-scores and use decision
rule to make your decision.
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
17
When  is unknown
 Now we use the sample standard deviation (i.e.
s) to estimate the population standard deviation
 The distribution is a t-distribution,
Not Normal !
You should check the t-table P597
Pay attention to the degree of freedom: n-1
 The rest of the calculations are the same.
Exercise 8.5 – lower tail test
Exercise 8.14 – upper tail test
Exercise 8.16 – two-tailed test
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
18
Hypothesis testing Steps
When  is unknown
 Step 1: Construct the hypotheses pair H0 / HA.
 Step 2: Write down the decision rule
 One-tailed? Upper or lower?
 Two-tailed?
 Step 3: Find out the cutoff t –score (t-table, page
597)
t one-tailed. t  for two-tailed.
2
 Step 4: Find out the t -score for sample mean
tx =
x-μ
s
 Step 5: compare the t -scores and use decision
rule to make your decision.
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
19
Use of PHStat
Nov 3, 2005
BUS304 – Chapter 8 Hypothesis for Mean
20