chapter 7 inference for distributions 7.1 inference for the mean of a population 7.2 comparing two...

26
Chapter 7 Inference for Distributions • 7.1 Inference for the Mean of a Populatio n • 7.2 Comparing Two Means • 7.3 Inference for Populati on Spread

Post on 19-Dec-2015

228 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

Chapter 7Inference for Distributions

• 7.1 Inference for the Mean of a Population

• 7.2 Comparing Two Means

• 7.3 Inference for Population Spread

Page 2: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

Section 7.1

Inference for the Mean of a Population

單一母體均數的檢定

Page 3: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

均數推論的假設

• 母體中選選選選選選選選選 (SRS) ,選選選選 n

• 該母體為常態母體,期望值為 標準差為。一般應用上,與都是未知– 實用上,只要選選選夠多,資料分配呈對稱且單峰即可

Page 4: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

樣本均數的分配• 資料選選常態母體選選選選,選選選選的均數 服從常態 N(, 2n )– 標準差未知,以選選標準差 s 估計之

• 以 標準化後服從標準常態

• 以 標準化後則服從 t 分配

XX

Page 5: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

標準誤差 (standard error)• 的標準差估計值 又稱為 的標準誤差 (standard error of mean, 簡記為 SEM)

• When the standard deviation of a statistic is estimated from the data, the result is called the standard error of the statistic.

Page 6: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

t 統計量與 t 分配• 常態母體 N(, 2) ,抽出選選選選,選選數為 n• 定義單樣本 t 統計量 (one-sample t statisti

c) 為

則 t 統計量服從自由度為 n-1 的 t 分配– 以 t(k) 或 tk 表示自由度為 k 的 t 分配– t 分配的自由度來自於選選標準差 s 之自由度

Page 7: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

常態分配與 t 分配圖形

0

標準常態分配 t 分配自由度 9 t 分配自由度 2

Page 8: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

常態與 t 分配圖形特性比較• t 分配圖形與常態分配圖形相似

– 都具有對稱於零、單峰及鐘形的特性• t 分配圖形的散佈 (spread) 比常態分配圖形大, t 分配圖形的尾端具有較大的機率– 以 替代 來標準化,使得 t 分配有較大的變異性。

• t 分配自由度越大圖形與越接近常態。– 樣本數越大 s 估計 越準,估計值造成的額外變異性越少。

Page 9: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

單母體均數的 t 信賴區間• 由未知均數 選母體,選選選選選選選選,選選選選 n 。

選 C 選選選選選選為

其中 t*為 tn-1分配之上 (1C)/2 臨界點。– 常態母體時選選選選選選選選 exact) 選選,非常態母體時樣本數大時為近似 (approximate) 選選。

Page 10: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

單母體均數的 t 檢定• 由未知均數 選母體,選選選選選選選選,選選選選 n 。

H0: = 0 選選選選檢定統計量為• 令 T 服從 tn-1分配則各對立假說之 P- 值為– Ha: > 0 之 P- 值為 。– Ha: < 0 之 P- 值為 。– Ha: 0 之 P- 值為 – 常態母體時選選選選選選選選選選,非常態母體樣本數大時為近似選選。

Page 11: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread
Page 12: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

例題 7.1 蟑螂新陳代謝研究• 5 隻蟑螂餵食葡萄糖 10 小時後,尾腸葡萄糖含量為 ( 毫克 )– 55.95 68.24 52.73 21.50 23.78– = 44.44, s = 20.741

– 95% 信賴水準之 tn-1臨界值為 t* = 2.776

• 95% 信賴區間為 = (18.69, 70.19)

Page 13: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread
Page 14: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

例題 7.2 可樂甜度• 例 6.8 續: 10 位品嚐員對健怡可樂甜度衰減評分樣本為:– 2.0 0.4 0.7 2.0 -0.4 2.2 -1.3 1.2 1.1 2.3

– 檢定 H0: = 0 vs. Ha: > 0

– = 1.02, s = 1.196– t 值為 P- 值 = 0.0122 。

– df = 9 之 P- 值表

Page 15: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

t 檢定 P- 值實例圖示

t = 2.70

P- 值 = 0.0122

t 分配自由度 9

Page 16: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

單一樣本 t 程序應用的注意事項

• 理論上,資料必須是來自常態母體的 SRS 樣本

• 樣本數不大時,除了由過去經驗研判之外,也可消極的以“不過分違背常態法則即可接受”為原則

• Fortunately, confidence levels and P-values from t procedures are not very sensitive to lack of normality.

• 例 7.1 及 7.2 資料之莖葉圖。

Page 17: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

• Stem-and-leaf of t71 N = 5

• Leaf Unit = 1.0• 2 2 24• 2 3 • 2 4 • (2) 5 36• 1 6 8

• Stem-and-leaf of t72 N = 10

• Leaf Unit = 0.10• 1 -1 3• 2 -0 4• 4 0 47• (2) 1 12• 4 2 0023

Page 18: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

配對資料之 t 程序

• 配對資料設計 (matched pairs design) :– 每成對實驗對象分別接受處理後再觀察– Or 每一實驗對象接受處理前後分別觀察

• 配對資料之 t 程序– 以單一樣本 t 程序方法應用在配對觀察值差。

Page 19: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

例題 7.3 花香味是否有助學習• 配帶面罩含花香味與否對走迷宮所用時間之影響研究– 21 位受測者分別配帶不含及含花香味面罩,隨機決定先或後之配帶順序,再量走迷宮所用時間。記錄兩者所用時間及時間差

• 假設 為時間差 (“ 不含”減“含” )之期望值。欲研究花香味是否真的有助學習,則

• 檢定假說 H0: = vs. Ha: > 0

Page 20: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

花香味是否有助學習 ( 續 )• 時間差樣本資料為 s =12.

5479• 檢定 t- 統計量為

• P- 值大於 0.25 ( 表 C, df = 20)軟體計算得 P- 值為 0.3652 。

Page 21: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

t 程序之穩健性 (Robustness)

• 穩健程序 (robust procedures) :若信賴區間之水準或顯著檢定之 P- 值,不會受假設條件不符合而影響太大時,則稱該程序具有穩健性。

• 若樣本資料沒有離群值時,常態的假設條件不會對 t 程序影響太大,因此 t 程序對常態條件具有穩健性。

Page 22: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

例題 7.4 離群值效應• 例題 7.1 的資料改為:

– 55.95 68.24 52.73 41.50 43.78 ( 各增加 20)

– 則 由 44.44 變為 52.44 , – s 由 20.741 變為 10.69

– 95% 信賴水準之 tn-1臨界值仍為 t* = 2.776

• 95% 信賴區間長度減半為=52.4414.8377= (37.6

0, 67.28)

Page 23: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

t 程序之適用情形• 除了小樣本之外,隨機樣本的假設比常態的假設重要

• 樣本數小於 15 時,資料有離群值或明顯的非常態時不要使用 t 程序

• 樣本數大於 15 時,除了資料有離群值或強烈偏斜時不要之外,都可使用 t 程序

• 樣本數很大 (n ≧ 40) 時,即使強烈偏斜時也可使用 t 程序

Page 24: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

t 程序之適用實例• Figure 7.6a 美國各州 65歲人口比例資料為整個母體,而非樣本,故不適合使用 t 程序。

0

2

4

6

8

10

12

14

4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

Page 25: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

t 程序之適用實例 ( 續 )

• Figure 7.6b 科羅拉多州閃電擊中的時間資料具對稱性,樣本數有 70 ,適合使用t 程序。

0

5

10

15

20

25

7 8 9 10 11 12 13 14 15 16 17

Hours aftermidnight

Page 26: Chapter 7 Inference for Distributions 7.1 Inference for the Mean of a Population 7.2 Comparing Two Means 7.3 Inference for Population Spread

t 程序之適用實例 ( 續二 )

• Figure 7.6c 莎士比亞劇中字長度分配之資料為右傾資料,但樣本數很大足以克服資料右傾的影響,可使用 t 程序。

05

10152025

1 2 3 4 5 6 7 8 9 10 11 12

Number of letters in word