Download Chap 08

Document related concepts

History of statistics wikipedia , lookup

Sufficient statistic wikipedia , lookup

Bootstrapping (statistics) wikipedia , lookup

Taylor's law wikipedia , lookup

Foundations of statistics wikipedia , lookup

Confidence interval wikipedia , lookup

Omnibus test wikipedia , lookup

Statistical hypothesis testing wikipedia , lookup

Misuse of statistics wikipedia , lookup

Resampling (statistics) wikipedia , lookup

Student's t-test wikipedia , lookup

Transcript
聯合報:民調失準?
(2006.12.10)
•高雄市長選舉,選前各項民調一直居於領先的黃俊英,
最後以一千餘票落敗。選前民調與選舉結果的落差,是不
是代表民調失準了?民調中的選民可以分為「隱性」與「
顯性」兩種,顯性選民願意公開表達支持特定候選人,隱
性選民則否。要評估民調準不準,最關鍵是「隱性選民」
的推估判讀。
•一般來說,調查機構公布的都是表態者的支持意向,以
本報高市選舉民調為例,在顯性選民中,黃俊英歷次調查
都穩定領先陳菊四至十二個百分點。不過,黃俊英看似領
先,但真正可以影響選舉成敗的,其實是三成左右不願意
在民調中表態者的動向,如果隱性選民以泛綠支持者居多
,那麼黃俊英的領先聲勢就只是表象。至於該怎麼判斷民
調中隱性選民是綠的多?還是藍的多?資料顯示,高雄市
隱性選民一直是「綠大於藍」,且會隨著政治氣氛不同,
而產生變動。
1
聯合報:民調失準?
(2006.12.10)
•九十一年謝長廷與黃俊英競逐高市長寶座時,當時選前聯合報
最後一次民調,謝長廷獲得三成四選民表態支持,黃俊英三成
五,雙方差距在抽樣誤差範圍之內。和選舉結果相印證,謝長
廷最後獲得五成市民支持,黃俊英四成七,反推民調中未表態
選民的動向,隱性選民中的泛綠支持者約占五成七。
•去年九月馬屁文化及高捷弊案的爆發後,泛綠支持者隱身現象
更為嚴重,民調中願意承認政治立場傾向民進黨或支持民進黨
候選人的人大幅下滑。以本報選前推估來看,高雄市未表態選
民有高達七成五為泛綠支持者。正因為高雄市隱性選民以挺綠
者居多,因此選前民調即使黃支持率始終領先陳菊,但加計考
慮隱性選民結構後,國民黨和民進黨內部評估都指選情呈現五
五波局面,這正是「外行看熱鬧,內行看門道」。
•看民調,重點在於參考民調數字時,不能光看「表態支持率」
,還得一併考慮未表態選民的組成結構與意向,才能對於選舉
情勢作出比較精準的判斷。
2
Chapter 8 ~ Introduction to Statistical Inferences
統計推論簡介
Level of
Confidence
1 
Maximum
Error
E
E = z(/2)
s
n
Sample
Size
n
3
蓋洛普會在報告中列入以下訊息:「我們可以有95 %
的信心,此次民調之誤差界限,是正負三個百分點。」
4
中小企業八成認為84工時對企業經營有負面影響
新黨立委賴士葆昨天表示,每兩周工時84小時對我國中小企業
與傳統企業影響極大,平均成本上升20%、獲利減少6%,中小企
業就業人數共734萬人,占總就業比例人口數的78.25%,由於縮
短工時衝擊,將加速中小企業外移腳步,如加上我國進入WTO衝
擊加速部份企業關廠歇業,預估今年失業人口將上升至35萬人
,如加上隱藏性失業人口,將達70萬人。立委賴士葆與中華民
國管理科學學會昨天舉行「每兩周工時84小時對中小企業影響
」公聽會,會中公佈一項問卷調查報告,顯示有超過八成業者
認為84工時對企業經營有負面影響,近六成表示不會繼續在國
內投資,四成業者表示將加速企業外移,三成業者將裁減員工
,二成四將採減薪措施因應。
這項調查是89年12月29日至90年元月3日,針對全國中小企業所
進行的問卷調查,依隨機抽樣共發出1010份,回收241份,回收
率為23.86%,信賴區間為95%。
記者高泉錫/台北報導 【2001-01-05/民生報】
5
Chapter Goals
• Learn the basic concepts of estimation(估計) and
hypothesis testing (假設檢定)
• Consider questions about a population mean using
two methods that assume the population standard
deviation is known
• Consider: what value or interval of values can we
use to estimate a population mean?
• Consider: is there evidence to suggest the
hypothesized mean is incorrect?
6
8.1 ~ The Nature of Estimation
• Discuss estimation more precisely
• What makes a statistic good ?
• Assume the population standard deviation, s, is
known throughout this chapter
• Concentrate(集中) on learning the procedures for
making statistical inferences about a population
mean m
7
Point Estimate for a Parameter
Point Estimate(點估計) for a Parameter: The value of the
corresponding statistic
 Example: x = 14.7 is a point estimate (single number value)
for the mean m of the sampled population
How good is the point estimate? Is it high? Or low? Would
another sample yield the same result?
Note: The quality of an estimation procedure is enhanced if
the sample statistic is both less variable and unbiased
8
Unbiased Statistic
Unbiased(不偏) Statistic: A sample statistic whose
sampling distribution has a mean value equal to the value
of the population parameter being estimated. A statistic
that is not unbiased is a biased(有偏) statistic.
Example: The figures on the next slide illustrate the
concept of being unbiased and the effect of variability on
a point estimate
Assume A is the parameter being estimated
9
Illustrations
A
Negative bias
Under estimate
High variability
Unbiased
On target estimate
A
A
Positive bias
Over estimate
Low variability
10
Notes
1. The sample mean, x ,is an unbiased statistic because the
mean value of the sampling distribution is equal to the
population mean: m x = m
2. Sample means vary from sample to sample. We don’t
expect the sample mean to be exactly equal the population
mean m.
3. We do expect the sample mean to be close to the population
mean
4. Since closeness is measured in standard deviations, we
expect the sample mean to be within 2 standard deviations
of the population mean
11
Important Definitions
Interval Estimate(區間估計): An interval bounded by two values
and used to estimate the value of a population parameter. The values
that bound this interval are statistics calculated from the sample that
is being used as the basis for the estimation.
Level of Confidence (信心水準) 1 -  : The probability that the
sample to be selected yields an interval that includes the parameter
being estimated
Confidence Interval(信賴區間): An interval estimate with a
specified level of confidence
12
Summary
• To construct a confidence interval for a population mean m, use
the CLT
• Use the point estimate
x as the central value of an interval
• Since the sample mean ought(應該) to be within 2 standard
deviations of the population mean (95% of the time), we can find
the bounds to an interval centered at x :
x  2(s x ) to x + 2(s x )
• The level of confidence for the resulting interval is approximately
95%, or 0.95
• We can be more accurate in determining the level of confidence
13
Illustration
Distribution of x
x  2(s x )
m
x
x + 2(s x )
• The interval x  2 s x to x + 2 s x is an approximate 95%
confidence interval for the population mean m based on this x
14
95% Confidence Level
m
從同一母體抽出來的樣本所計算之統計量,有95%會包含真正的參數值
15
8.2 ~ Estimation of Mean m (s Known)
• Formalize the interval estimation process as it
applies to estimating the population mean m based on
a random sample
• Assume the population standard deviation s is
known
• The assumptions are the conditions that need to exist
in order to correctly apply a statistical procedure
16
The Assumption...
The assumption for estimating the mean m using a known s :
The sampling distribution of x has a normal distribution
Assumption satisfied by:
1. Knowing that the sampled population is normally distributed, or
2. Using a large enough random sample (CLT)
Note: The CLT may be applied to smaller samples (for example
n = 15) when there is evidence to suggest a unimodal distribution
that is approximately symmetric. If there is evidence of skewness,
the sample size needs to be much larger.
17
The 1- Confidence Interval of m
• A 1- confidence interval for m is found by
x  z(/2)
s
to
n
x + z(/2)
s
n
Notes:
1. x is the point estimate and the center point of the confidence
interval
2. z(/2) : confidence coefficient(信賴係數), the number of multiples
of the standard error needed to construct an interval estimate of
the correct width to have a level of confidence 1- 
1 
 /2
- z(/2)
0
 /2
z(/2)
z
18
Notes Continued
3. s / n : standard error of the mean (from CLT)
The standard deviation of the distribution of x
4. z(/2) ( s / n ) : maximum error of estimate E
One-half the width of the confidence interval (the product of the
confidence coefficient and the standard error)
5. x  z(/2)
x + z(/2)
( s / n ) : lower confidence limit (LCL)
( s / n ) : upper confidence limit (UCL)
19
The Confidence Interval
A Five-Step Model:
1. Describe the population parameter of concern
2. Specify the confidence interval criteria
a. Check the assumptions
b. Identify the probability distribution and the formula to be used
c. Determine the level of confidence, 1 - 
3. Collect and present sample information
4. Determine the confidence interval
a. Determine the confidence coefficient, z(/2)
b. Find the maximum error of estimate
c. Find the lower and upper confidence limits
5. State the confidence interval
20
Example
 The weights of full boxes of a certain kind of cereal are normally
distributed with a standard deviation of 0.27 oz. A sample of 18
randomly selected boxes produced a mean weight of 9.87 oz.
Find a 95% confidence interval for the true mean weight of a box
of this cereal.
Solution:
1. Describe the population parameter of concern
The mean, m, weight of all boxes of this cereal
2. Specify the confidence interval criteria
a. Check the assumptions
The weights are normally distributed, the distribution of x is normal
b. Identify the probability distribution and formula to be used
Use the standard normal variable z with s = 0.27
c. Determine the level of confidence, 1 - 
The question asks for 95% confidence: 1 -  = 0.95
21
Solution Continued
3. Collect and present information
The sample information is given in the statement of the problem
Given:
n = 18;
x = 9.87
4. Determine the confidence interval
a. Determine the confidence coefficient
The confidence coefficient is found using Table 4B:
z(/2)
1 
1.15
0.75
1.28
0.80
1.65
0.90
1.96
0.95
2.33
0.98
2.58
0.99
22
Solution Continued
b. Find the maximum error of estimate
Use the maximum error part of the formula for a CI
E = z(/2)
s
= 1.96 0.27 = 0.1247
n
18
c. Find the lower and upper confidence limits
Use the sample mean and the maximum error:
s
n
9.87  0.1247
9.7453
9.75
x  z(/2)
s
n
9.87 + 0.1247
9.9947
10.00
to x + z(/2)
to
to
to
5. State the confidence interval
9.75 to 10.00 is a 95% confidence interval for the true mean weight,
m, of cereal boxes
Another Example
23
Sample Size
• Problem: Find the sample size necessary in order to
obtain a specified maximum error and level of
confidence (assume the standard deviation is known)
E = z(/2)
s
n
Solve this expression for n:
z(/2) ×s 

n=
 E 
2
24
Example
 Find the sample size necessary to estimate a population mean to
within 0.5 with 95% confidence if the standard deviation is 6.2
Solution:
 z(/2)× s  2
n=



E
 (1.96)(6.2)  2 =
2=
[24
.
304]
590.684
n=

 0.5

Therefore, n = 591
Note: When solving for sample size n, always round up to the
next largest integer (Why?)
25
8.3 ~ The Nature of Hypothesis Testing
• Formal process for making an inference
• Consider many of the concepts of a hypothesis test (
假設檢定) and look at several decision-making
situations
• The entire process starts by identifying something
of concern and then formulating two hypotheses
about it
26
Hypothesis
Hypothesis: A statement that something is true
Statistical Hypothesis Test: A process by which a
decision is made between two opposing(相反的)
hypotheses. The two opposing hypotheses are formulated
so that each hypothesis is the negation of the other. (That
way one of them is always true, and the other one is
always false). Then one hypothesis is tested in hopes that
it can be shown to be a very improbable(不太可能)
occurrence thereby implying the other hypothesis is the
likely truth.
27
Null & Alternative Hypothesis
There are two hypotheses involved in making a decision:
Null Hypothesis (原始假設), Ho: The hypothesis to be
tested. Assumed to be true. Usually a statement that a
population parameter has a specific value. The “starting point”
for the investigation.
Alternative Hypothesis (對立假設), Ha: A statement about
the same population parameter that is used in the null
hypothesis. Generally this is a statement that specifies the
population parameter has a value different, in some way, from
the value given in the null hypothesis. The rejection of the null
hypothesis will imply the likely truth of this alternative
hypothesis.
28
Notes
1. Basic idea: proof by contradiction(用矛盾法證明)
Assume the null hypothesis is true and look for evidence to
suggest that it is false
2. Null hypothesis: the status quo (現狀)
A statement about a population parameter that is assumed to be
true
3. Alternative hypothesis: also called the research hypothesis
Generally, what you are trying to prove?
We hope experimental evidence will suggest the alternative
hypothesis is true by showing the unlikeliness of the truth of the
null hypothesis
29
Example
 Suppose you are investigating the effects of a new pain reliever.
You hope the new drug relieves minor muscle aches (肌肉疼痛)
and pains longer than the leading pain reliever. State the null and
alternative hypotheses.
Solutions:
• Ho: The new pain reliever is no better than the leading pain
reliever
• Ha: The new pain reliever lasts longer than the leading pain
reliever
Another Example
30
Hypothesis Test Outcomes
Decision
Fail to reject Ho
Reject Ho
Null Hypothesis
True
False
Type A correct decision
Type II error
Type I error
Type B correct decision
Type A correct decision: Null hypothesis true, decide in its favor
Type B correct decision: Null hypothesis false, decide in favor of
alternative hypothesis
Type I error: Null hypothesis true, decide in favor of alternative
hypothesis
Type II error: Null hypothesis false, decide in favor of null
hypothesis
31
Example
 A calculator company has just received a large shipment of parts
used to make the screens on graphing calculators. They consider
the shipment acceptable if the proportion of defective(缺陷) parts
is 0.01 (or less). If the proportion of defective parts is greater than
0.01 the shipment is unacceptable and returned to the
manufacturer.
State the null and alternative hypotheses, and describe the four
possible outcomes and the resulting actions that would occur for
this test.
Solutions:
• Ho: The proportion of defective parts is 0.01 (or less)
• Ha: The proportion of defective parts is greater than 0.01
32
Fail To Reject Ho
Null Hypothesis Is True:
Null Hypothesis Is False:
Type A correct decision
Type II error
Truth of situation: The
proportion of defective parts
is 0.01 (or less)
Truth of situation: The
proportion of defective parts
is greater than 0.01
Conclusion: It was
determined that the
proportion of defective parts
is 0.01 (or less)
Conclusion: It was
determined that the
proportion of defective parts
is 0.01 (or less)
Action: The calculator
company received parts with
an acceptable proportion of
defectives
Action: The calculator
company received parts with
an unacceptable proportion of
defectives
33
Reject Ho
Null hypothesis is true:
Type I error
Truth of situation: The
proportion of defectives is
0.01 (or less)
Conclusion: It was
determined that the
proportion of defectives is
greater than 0.01
Action: Send the shipment
back to the manufacturer.
The proportion of defectives
is acceptable
Null hypothesis is false:
Type B correct decision
Truth of situation: The
proportion of defectives is
greater than 0.01
Conclusion: It was
determined that the
proportion of defectives is
greater than 0.01
Action: Send the shipment
back to the manufacturer.
The proportion of defectives
is unacceptable
34
Errors
Notes:
The type II error sometimes results in we make a
decision based on a sample, there is always the chance
of making an error
Probability of a type I error = 
Probability of a type II error = b
Error in Decision
Rejection of a true H o
Failure to reject a false H o
Type
I
II
Probability

b
Correct Decision
Failure to reject a true Ho
Rejection of a false Ho
Type
A
B
Probability
1-
1-b
35
Notes
1. Would like  and b to be as small as possible
2.  and b are inversely related
3. Usually set  (and don’t worry too much about b. Why?)
4. Most common values for  and b are 0.01 and 0.05
5. 1 - b : the power of the statistical test
A measure of the ability of a hypothesis test to reject a false
null hypothesis
6. Regardless of the outcome of a hypothesis test, we never
really know for sure if we have made the correct decision
36
Interrelationship(相互關係)
Interrelationship between the probability of a type I error (),
the probability of a type II error (b), and the sample size (n)
P (type I error)

Sample
P (type II error)
b
Size
n
37
Level of Significance & Test Statistic
Level of Significance,  (水準的顯著性): The probability of
committing the type I error (Rejection of a true H0)
Test Statistic: A random variable whose value is calculated from
the sample data and is used in making the decision fail to reject Ho
or reject Ho
Notes:
 The value of the test statistic is used in conjunction with a
decision rule to determine fail to reject Ho or reject Ho

The decision rule is established prior to collecting the data and
specifies how you will reach the decision
38
The Conclusion
a. If the decision is reject Ho, then the conclusion should be worded
something like, “There is sufficient evidence at the  level of
significance to show that . . . (the meaning of the alternative
hypothesis)”
b. If the decision is fail to reject Ho, then the conclusion should be
worded something like, “There is not sufficient evidence at the 
level of significance to show that . . . (the meaning of the
alternative hypothesis)”
Notes:
 The decision is about Ho
 The conclusion is a statement about Ha
 There is always the chance of making an error
39
8.4 ~ Hypothesis Test of Mean m
(s known): A Probability-Value Approach
• The concepts and much of the reasoning behind
hypothesis tests are given in the previous sections
• Formalize the hypothesis test procedure as it
applies to statements concerning the mean m of a
population (s known): a probability-value
approach
40
The Assumption...
The assumption for hypothesis tests about a mean m using a
known s : The sampling distribution of x has a normal distribution
Recall:
1. The distribution of x has mean m
2. The distribution of x has standard deviation s
n
Hypothesis test:
1. A well-organized, step-by-step procedure used to make a decision
2. Probability-value approach (p-value approach): a procedure that
has gained popularity in recent years. Organized into five steps.
41
The Probability-Value Hypothesis Test
A Five-Step Procedure:
1. The Set-Up
a. Describe the population parameter of concern
b. State the null hypothesis (Ho) and the alternative hypothesis (Ha)
2. The Hypothesis Test Criteria
a. Check the assumptions
b. Identify the probability distribution and the test statistic formula to be used
c. Determine the level of significance, 
3. The Sample Evidence
a. Collect the sample information
b. Calculate the value of the test statistic
4. The Probability Distribution
a. Calculate the p-value for the test statistic
b. Determine whether or not the p-value is smaller than 
5. The Results
a. State the decision about Ho
b. State a conclusion about Ha
42
Example
 A company advertises(廣告) the net weight(淨重) of its cereal is
24 ounces. A consumer group suspects(懷疑) the boxes are under
filled. They cannot check every box of cereal, so a sample of
cereal boxes will be examined. A decision will be made about the
true mean weight based on the sample mean. State the consumer
group’s null and alternative hypotheses. Assume s = 0.2
Solution:
1. The Set-Up
a. Describe the population parameter of concern
The population parameter of interest is the mean m, the
mean weight of the cereal boxes
43
Solution Continued
b. State the null hypothesis (Ho) and the alternative
hypothesis (Ha)
Formulate two opposing statements concerning m
Ho: m = 24 (  ) (the mean is at least 24)
Ha: m < 24 (the mean is less than 24)
Note: The trichotomy law(三分法) from algebra states that two
numerical values must be related in exactly one of three
possible relationships: <, =, or >. All three of these
possibilities must be accounted for between the two opposing
hypotheses in order for the hypotheses to be negations of each
other.
44
Possible Statements of Null & Alternative Hypotheses
Null Hypothesis
1. greater than or equal to ()
2. less than or equal to ()
3. equal to (=)
Alternative Hypothesis
less than ()
greater than ()
not equal to ()
Notes:

The null hypothesis will be written with just the equal sign (a value
is assigned)

When equal is paired with less than or greater than, the combined
symbol is written beside the null hypothesis as a reminder that all
three signs have been accounted for in these two opposing
statements.
45
Examples
 An automobile manufacturer claims a new model gets at least 27 miles
per gallon. A consumer groups disputes this claim and would like to
show the mean miles per gallon is lower. State the null and alternative
hypotheses.
Solution: Ho: m = 27 ()
and Ha: m < 27
 A freezer is set to cool food to 10. If the temperature is higher, the
food could spoil(腐壞), and if the temperature is lower, the freezer is
wasting energy. Random freezers are selected and tested as they come
off the assembly line. The assembly line is stopped if there is any
evidence to suggest improper cooling. State the null and alternative
hypotheses.
Solution: Ho: m = 10
and
Ha: m  10
46
Common Phrases & Their Negations
H o : ()
at least
no less than
not less than
H a : ( )
less than
less than
less than
H o : ( )
at most
no more than
not greater than
more than
more than
greater than
H o : ( =)
is
not different from
same as
H a : ()
is not
different from
not same as
H a : ( )
47
Example Continued
 Example Continued: Weight of cereal boxes
Recall: Ho: m = 24 () (at least 24)
Ha: m < 24 (less than 24)
2. The Hypothesis Test Criteria
a. Check the assumptions
The weight of cereal boxes is probably mound shaped. A sample
size of 40 should be sufficient for the CLT to apply. The sampling
distribution of the sample mean can be expected to be normal.
b. Identify the probability distribution and the test statistic to be used
To test the null hypothesis, ask how many standard deviations
away from m is the sample mean
test statistic : z* =
xm
s n
48
Solution Continued
c. Determine the level of significance
Let  = 0.05
3. The Sample Evidence
a. Collect the sample information
A random sample of 40 cereal boxes is examined
x = 23.95
and
n = 40
b. Calculate the value of the test statistic (s = 0.2)
x  m 23.95  24
=
=
= 1.5811
z*
s n 0.2 40
4. The Probability Distribution
a. Calculate the p-value for the test statistic
49
Probability-Value or p-Value
Probability-Value, or p-Value: The probability that the test
statistic could be the value it is or a more extreme value (in the
direction of the alternative hypothesis) when the null hypothesis is
true (Note: the symbol P will be used to represent the p-value,
especially in algebraic situations)
P值:在H0為真的假設下,
所得到樣本結果會向實際觀
測結果那麼極端或是更極端
的機率。P值愈小,資料所
提供否定H0的證據就愈強。
P
 1.58
0
z
P = P ( z  z*) = P ( z  1.58) = P ( z  1.58)
= 0.5000  0.4429 = 0.0571
50
Solution Continued
b. Determine whether or not the p-value is smaller than 
The p-value (0.0571) is greater than  (0.05)
5. The Results
Decision Rule:
a. If the p-value is less than or equal to the level of significance , then the
decision must be to reject Ho
b. If the p-value is greater than the level of significance , then the decision
must be to fail to reject Ho
a. State the decision about Ho
Decision about Ho : Fail to reject Ho
b. Write a conclusion about Ha
There is not sufficient evidence at the 0.05 level of significance to
show that the mean weight of cereal boxes is less than 24 ounces
51
Notes

If we fail to reject Ho, there is no evidence to suggest the
null hypothesis is false. This does not mean Ho is true.

The p-value is the area, under the curve of the
probability distribution for the test statistic, that is more
extreme than the calculated value of the test statistic.

There are 3 separate cases for p-values. The direction
(or sign) of the alternative hypothesis is the key.
52
Finding p-Values
1. Ha contains > (Right tail)
p-value = P(z > z*)
0
z*
z
2. Ha contains < (Left tail)
p-value = P(z < z*)
z*
0
 | z* |
0
z
3. Ha contains  (Two-tailed)
p-value = P(z < |z*|) + P(z > |z*|)
| z* |
z
53
Example
 The mean age of all shoppers (顧客) at a local jewelry store (珠寶店) is
37 years (with a standard deviation of 7 years). In an attempt to attract
older adults with more disposable income, the store launched a new
advertising campaign. Following the advertising, a random sample of
47 shoppers showed a mean age of 39.3. Is there sufficient evidence to
suggest the advertising campaign has succeeded in attracting older
customers?
Solution:
1. The Set-Up
a. Parameter of concern: the mean age, m, of all shoppers
b. The hypotheses:
Ho: m = 37 ()
Ha: m > 37
54
Solution Continued
2. The Hypothesis Test Criteria
a. The assumptions: The distribution of the age of shoppers
is unknown. However, the sample size is large enough
for the CLT to apply.
b. The test statistic: The test statistic will be z*
c. The level of significance: none given
We will find a p-value
3. The Sample Evidence
a. Sample information: n = 47,
b. Calculated test statistic: z* =
x = 39.3
x  m 39.3  37
=
= 2.25
s n
7 47
55
Solution Continued
4. The Probability Distribution
a. The p-value:
p - value = P( z  z*)
= P( z  2.25)
= 0.5000  0.4878
= 0.0122
0
2.25
z
b. Determine whether or not the p-value is smaller than 
A comparison is not possible, no  given
5. The Results
Because the p-value is so small (P < 0.05), there is evidence to
suggest the mean age of shoppers at the jewelry store is greater
than 37
56
p-Value
The idea of the p-value is to express the degree of belief in the null
hypothesis:
1. When the p-value is minuscule 微小的 (like 0.0001), the null hypothesis
would be rejected by everyone because the sample results are very
unlikely for a true Ho
2. When the p-value is fairly small (like 0.01), the evidence against Ho is
quite strong and Ho will be rejected by many
3. When the p-value begins to get larger (say, 0.02 to 0.08), there is too
much probability that data like the sample involved could have occurred
even if Ho were true, and the rejection of Ho is not an easy decision
4. When the p-value gets large (like 0.15 or more), the data is not at all
unlikely if the Ho is true, and no one will reject Ho
57
p-Value Advantages & Disadvantage
Advantages of p-value approach:
1. The results of the test procedure are expressed in terms of a
continuous probability scale from 0.0 to 1.0, rather than simply on
a reject or fail to reject basis
2. A p-value can be reported and the user of the information can
decide on the strength of the evidence as it applies to his/her own
situation
3. Computers can do all the calculations and report the p-value, thus
eliminating the need for tables
Disadvantage:
1. Tendency for people to put off determining the level of
significance
58
Example
 The active ingredient (活性成分) for a drug is manufactured using
fermentation(發酵). The standard process yields a mean of 26.5 grams
(assume s = 3.2). A new mixing technique during fermentation is
implemented. A random sample of 32 batches showed a sample mean
27.1. Is there any evidence to suggest the new mixing technique has
changed the yield?
Solution:
1. The Set-Up
a. The parameter of interest is the mean yield of active
ingredient, m
b. The null and alternative hypotheses:
H0: m = 26.5
Ha: m  26.5
59
Solution Continued
2 The Hypothesis Test Criteria
. a. Assumptions: A sample of size 32 is large enough to
satisfy the CLT
b. The test statistic: z*
c. The level of significance: find a p-value
3. The Sample Evidence
a. From the sample: n = 32,
x = 27.1
b. The calculated test statistic: z* =
x  m 27.1  26.5
=
= 1.06
s n
3.2 32
60
Solution Continued
4. The Probability Distribution
a. The p-value:
p - value = 2  P( z | z* |)
= 2  P( z  1.06)
= 2  (0.5000  0.3554)
= 2  0.1446 = 0.2892
0 1.06
z
b. The p-value is large
There is no  given in the statement of the problem
5. The Results
Because the p-value is large (P = 0.2892), there is no evidence to
suggest the new mixing technique has changed the mean yield
61
8.5 ~ Hypothesis Test of mean m (s known):
A Classical Approach
• Concepts and reasoning behind hypothesis testing
given in Section 8.3
• Formalize the hypothesis test procedure as it applies
to statements concerning m of a population with
known s : a classical approach
62
The Assumption...
The assumption for hypothesis tests about mean m using a
known s : The sampling distribution of x has a normal distribution
Recall:
1. The distribution of x has mean m
2. The distribution of x has standard deviation s
n
Hypothesis Test: A well-organized, step-by-step procedure used to
make a decision. The classical approach is the hypothesis test
process that has enjoyed popularity for many years.
63
The Classical Hypothesis Test
A Five-Step Procedure:
1. The Set-Up
a. Describe the population parameter of concern
b. State the null hypothesis (Ho) and the alternative hypothesis (Ha)
2. The Hypothesis Test Criteria
a. Check the assumptions
b. Identify the probability distribution and the test statistic to be used
c. Determine the level of significance, 
3. The Sample Evidence
a. Collect the sample information
b. Calculate the value of the test statistic
4. The Probability Distribution
a. Determine the critical region(s) and critical value(s)
b. Determine whether or not the calculated test statistic is in the critical region
5. The Results
a. State the decision about Ho
b. State the conclusion about Ha
64
Example
 A company advertises the net weight of its cereal is 24 ounces. A
consumer group suspects the boxes are under filled. They cannot
check every box of cereal, so a sample of cereal boxes will be
examined. A decision will be made about the true mean weight
based on the sample mean. State the consumer group’s null and
alternative hypotheses. Assume s = 0.2
Solution:
1. The Set-Up
a. Describe the population parameter of concern
The population parameter of interest is the mean, m, the
mean weight of the cereal boxes
65
Solution Continued
b. State the null hypothesis (Ho) and the alternative
hypothesis (Ha)
Formulate two opposing statements concerning the m:
Ho: m = 24 (  ) (the mean is at least 24)
Ha: m < 24 (the mean is less than 24)
2. The Hypothesis Test Criteria
a. Check the assumptions
The weight of cereal boxes is probably mound shaped. A sample size of 40
should be sufficient for the CLT to apply. The sampling distribution of the
sample mean can be expected to be normal.
b. Identify the probability distribution and the test statistic to be used
To test the null hypothesis, ask how many standard deviations away from m
is the sample mean
test statistic : z* =
xm
s n
66
Solution Continued
c. Determine the level of significance
Consider the four possible outcomes and their consequences
Let  = 0.05
3. The Sample Evidence
a. Collect the sample information
A random sample of 40 cereal boxes is examined
x = 23 .95 and n = 40
b. Calculate the value of the test statistic (s = 0.2)
x  m 23 .95  24
=
=
=  1 .5811
z*
s n
0.2 40
4. The Probability Distribution
a. Determine the critical region(s) and critical value(s)
67
Critical Region & Critical Value(s)
Critical Region (臨界區間): The set of values for the test
statistic that will cause us to reject the null hypothesis. The set
of values that are not in the critical region is called the
noncritical region (sometimes called the acceptance region).
Critical Value(s) (臨界值): The first or boundary value(s) of
the critical region(s)
68
Critical Region & Critical Value(s)
Illustration:
0.05
 1.65
Critical
Region
0
z
Critical Value
69
Solution Continued
4. The Probability Distribution (Continued)
b. Determine whether or not the calculated test statistic is in the critical
region
*
 1.65
0
z
The calculated value of z, z* = 1.58, is in the noncritical region
5. The Results
We need a decision rule
70
Decision Rule
Decision Rule:
a. If the test statistic falls within the critical region, we will reject Ho
(the critical value is part of the critical region)
b. If the test statistic is in the noncritical region, we will fail to reject
Ho
a. State the decision about Ho
Decision: Fail to reject Ho
b. State the conclusion about Ha
Conclusion: There is not enough evidence at the 0.05 level of
significance to show that the mean weight of cereal
boxes is less than 24
71
Notes
1. The null hypothesis specifies a particular value of a population
parameter
2. The alternative hypothesis can take three forms. Each form dictates a
specific location of the critical region(s)
3. For many hypothesis tests, the sign in the alternative hypothesis points
in the direction in which the critical region is located
Sign in the
Alternative

Hypothesis
Critical Region One region
Left side
One-tailed test


Two regions
One region
Half on each side Right side
Two-tailed test One-tailed test
4. Significance level: 
72
Example
 The mean water pressure (水壓) in the main water pipe (水管) from a
town well should be kept at 56 psi (磅/平方英吋). Anything less and
several homes will have an insufficient supply, and anything greater
could burst the pipe. Suppose the water pressure is checked at 47
random times. The sample mean is 57.1. (Assume s = 7). Is there any
evidence to suggest the mean water pressure is different from 56? Use
 = 0.01
Solution:
1. The Set-Up
a. Describe the parameter of concern:
The mean water pressure in the main pipe
b. State the null and alternative hypotheses
Ho: ____________
Ha: ____________
73
Solution Continued
2. The Hypothesis Test Criteria
a. Check the assumptions:
A sample of n = ____ is large enough for the CLT to apply
b. Identify the test statistic
The test statistic is ____
c. Determine the level of significance: _________ (given)
3. The Sample Evidence
a. The sample information: x =
, n=
b. Calculate the value of the test statistic:
z* =
x  m 57.1 
=
s n
7
=
74
Solution Continued
4. The Probability Distribution
a. Determine the critical regions and the critical values
0.005
0.005
*
0
z
b. Determine whether or not the calculated test statistic is in the
critical region
The calculated value of z, z* = _______, is in the noncritical region
75
Solution Continued
5. The Results
a. State the decision about Ho:
 Fail to reject Ho
 Reject Ho
b. State the conclusion about Ha:
 There is no evidence to suggest the water pressure is different
from 56 at the 0.01 level of significance
 There is sufficient evidence to suggest the water pressure is
different from 56 at the 0.01 level of significance
76
Example
 An elementary school (小學) principal (校長) claims students
receive no more than 30 minutes of homework each night. A
random sample of 36 students showed a sample mean of 36.8
minutes spent doing homework (assume s = 7.5). Is there any
evidence to suggest the mean time spent on homework is greater
than 30 minutes? Use  = 0.05
Solution:
1. The Set-Up
The parameter of concern: m, the mean time spent doing
homework each night
Ho: m = 30 ()
Ha: m > 30
77
Solution Continued
2. The Hypothesis Test Criteria
a. The sample size is n = 36, the CLT applies
b. The test statistic is _____
c. The level of significance is given:  = ________
3. The Sample Evidence
x = 36.8,
n = 36
x  m 36.8  30
=
=
z* =
s n 7.5 36
78
Solution Continued
4. The Probability Distribution
0.01
*
0
z
The calculated value of z, z* = _______, is ___the critical region
79
Solution Continued
5. The Results
Decision: ____________
Conclusion: There is __________ evidence at the ______ level of
significance to conclude the mean time spent on homework by the
elementary students is more than 30 minutes
Note: Suppose we took repeated sample of size 36. What would you
expect to happen?
80
The End
81
Example
 Example: A random sample of the test scores of 100 applicants for clerk-typist
positions at a large insurance company showed a mean score of
72.6. Determine a 99% confidence interval for the mean score of all
applicants at the insurance company. Assume the standard deviation
of test scores is 10.5.
Solution:
1. Parameter of concern
The mean test score, m, of all applicants at the insurance company
2. Confidence interval criteria
a. Assumptions: The distribution of the variable, test score, is not known.
However, the sample size is large enough (n = 100) so that the CLT applies
b. Probability distribution: standard normal variable z with s = 10.5
c. The level of confidence: 99%, or 1 -  = 0.99
82
Solution Continued
3. Sample information
Given: n = 100 and x = 72.6
4. The confidence interval
a. Confidence coefficient: z(/2) = z(0.005) = 2.58
b. Maximum error: E = z(/2) ( s / n ) = ( 2.58)(10.5 / 100 ) = 2.709
c. The lower and upper limits:
72.6  2.709 = 69.891 to
72.6 + 2.709 = 75.309
5. Confidence interval
With 99% confidence we say, “The mean test score is between 69.9 and 75.3”,
or “69.9 to 75.3 is a 99% confidence interval for the true mean test score”
Note: The confidence is in the process. 99% confidence means: if we conduct
the experiment over and over, and construct lots of confidence intervals,
then 99% of the confidence intervals will contain the true mean value m.
83
Example
 Example: You are investigating the presence of radon in homes
being built in a new development. If the mean level of
radon is greater than 4 then send a warning to all home
owners in the development. State the null and
alternative hypotheses.
Solutions:
• Ho: The mean level of radon for homes in the development is
4 (or less)
• Ha: The mean level of radon for homes in the development is
greater than 4
84