31
STST0_C3 1

STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

  • View
    273

  • Download
    1

Embed Size (px)

Citation preview

Page 1: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 1

Page 2: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 2

母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強

3.1 母體與樣本

Page 3: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 3

3.2 Mean 平均數 定義 n 個數的平均數 = 總和除以 n

(N 表示母體個數 )

Sample ←→ PopulationStatistics ←→ parameters

N

Xi

i :mean Population

X :mean Sample n

Xi

i

Page 4: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 4

總和是:平均數是

Exp3.1 Find the mean of 18, 15, 12, 20, 19, 11, 14, 38, 18, and 17.

Exp 3.2 十天中,貨運包裏的數量為: 110 ,112 , 120 , 128 , 115 , 150 , 151 , 91 ,88 , 162 。求此十天的日平均包裹量。

這十個數字的總和為 1227 ,因此平均數為 122.7 。

Page 5: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 5

此時 n = 5 ,樣本平均數為:

假設依據抽取的技術,這組資料可視為一個樣本,也就是說這個樣本是具有代表性的,那麼我們可以推估說這四萬個燈泡的平均使用壽命為 946 個小時。

Page 6: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 6

這三位球員的薪資總和應該是 $10,950,000 。(1) 倘若其中一人的薪資是 $6,000,000 的話,那麼其他兩人的

薪資加起來應該是 10,950,000 - 6,000,000 = 4,950,000 。這是有可能發生的。

(2) 倘若其中兩人的薪資都是 $6,000,000 ,那這兩人的薪資總和 $12,000,000 就已經超過 10,950,000 了,所以這個情況是不可能發生的。

Page 7: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 7

此時 n = 6 ,平均數 = 57 ,總分為 6 (57) = 342 。 342 = 4‧72 + 54 ,最多能有四個學生的分數超

過 72 分。

Page 8: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 8

平均數特質 Mean is a measurement of the center of a set of

data It always exits. It is always unique. 平均數的計算涵蓋資料中的每一筆數據。 比起其它位置統計量,平均數是可靠的 (reliable) 。

(在估計、檢定、或決策上, reliability 是一基本要求 )

Page 9: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 9

(1) 正確的平均數 =291

(2) 錯誤的平均數是 =390

所以誤差是 390 - 291 = 99 。

Page 10: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 10

經過計算之後,平均數是 20 。 注意:光是說參加這次參觀活動的成員的平

均年齡是 20 歲,是很容易產生誤導的。

Page 11: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 11

3.3 加權平均數 回收物塑膠瓶每斤 1 元,保特瓶每斤 2 元,鐵

罐每斤 4 元,裝有此三類回收品的一袋子,總重 50 斤,可賣多少?平均每斤賣多少?

三類回收品平均價: 7/3 元 7/3 * 50 塑膠瓶 25 斤,保特瓶 15 元,鐵罐 10 斤 平均每斤賣…

Page 12: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 12

The Weighted Mean

公式:

針對每個價格給予「相對重要性權數」,然後計算「加權平均數」。

wi : 權數

Page 13: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 13

例: 求職棒前五名打擊者的平均打擊率

把打數當成權數,計算:

打擊者 打擊率 打擊次數彭 政 閔 0.392 132

張 泰 山 0.351 268

潘 武 雄 0.350 328

陳 冠 任 0.342 242

高 國 慶 0.333 311

Page 14: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 14

加權平均數另一個用途

假設有 k 組資料 每組平均數分別為 每組的數據筆數分別為 n1、 n2、 ...、及 nk

總平均 (grand mean) :

Page 15: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 15

此時,人數分別為 14、 25、 16 , 平均數分別為 76、 83、 89 。 帶入上列公式得,總平均為 82.96 ,或 83 。

Page 16: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 16

n 是奇數時, 中位數是位置在最中間的該筆資料的值 n 是偶數時, 中位數是位置在最中間的兩筆資料的平均數。

3.4 中位數

Page 17: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 17

將上列五個數依照大小排列: 14、 17、 17、 20、 22中位數是 17

將這些數據依照大小順序排列,得24 28 30 32 32 35 37 37 38 40 40 40中位數是最中間兩個數的平均數,亦即 ( 35 + 37 )/ 2 = 36 。

Page 18: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 18

將上列資料排序之後,排在第五個的數值為平標準桿中位數為「平標準桿」

Q: 如何計算平均數?

凡是可排序的資料都可得到中位數

Page 19: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 19

共有 30 筆資料,中位數在第 15.5 個位置上。所以中位數就是 (53 + 54)/ 2 = 53.5 。

Page 20: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 20

中位數特質 除了有重複值外,在中位數以上和以下有同樣多的資料。 It always exits. It is always unique. 需要排序來求中位數,所以較繁複。 比起平均數,中位數較不受極值 (extrem value) 的影響。 對於近對稱資料,中位數接近平均數;對於右偏資料,平均

數偏右。 一般資料,常用平均數來代表中心;至於偏態資料,以中位

數代表中心較適合。

Page 21: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 21

Quartiles, deciles, percentiles Q1 , Q3: 第一、三個四分位數

計算方式: Q1 是小於中位數的資料的中位數 Q3 是大於中位數的資料的中位數

3.5 其它的分位數

Page 22: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 22

盒形圖

中位數、四分位數,以及最大值與最小值,可以畫成盒形圖 (box plot) ,或盒鬚圖 (box-and-whisker plot) 。

最小值 Q1 中位數 Q3 最大值

Page 23: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 23

1. 最小值 35 ,最大值 81 。2. 中位數在第 15.5 個位置上, Q1 在第 8 個位置,

Q3 在第 46 個位置。3. min=35, …………

Page 24: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 24

24 出現五次,次數最多。所以眾數為 24 。

眾數 mode

眾數是發生次數最多的數,或組

平標準桿出現四次,是為眾數。

Page 25: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 25

3.7 分組資料的描述 次數分配的平均數計算公式:

母體平均數的公式:

Page 26: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 26

次數分配表整理如右:因此,依據上述公式,平

均數為8645.0/110=78.59

Page 27: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 27

n/ 2 = 55 ,所以我們必須從左右其中一端開始算55 個。從最小值開始,前五個組別的累積次數為 51 ,因此,我們必須在第六組中繼續再數四個數。記得我們假設第六組中的 39 筆資料,是在這組的組距中平均分佈的,所以我們要從這組的下組界上再加上組距10 當中的 4/ 39 ,亦即

中位數 =

Page 28: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 28

分組資料中位數

設中位數所在組別的下組界為 L,次數為 f ,組距為 c ,而由 L 到中位數相差的個數為 j ,中位數的公式:

Page 29: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 29

從最大值開始,後三個組別的累積次數為 20 ,還要往下數 35 個。中位數所在組的上組界為 89.5 ,

Page 30: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 30

3.8 數學公式補述:加總

Page 31: STST0_C31 2 母體 (population) 樣本 (sample) 例: The trial of flipping a coin The weights of a baby 由 400 ceramic tiles 抽出 20 片測量強 度 3.1 母體與樣本

STST0_C3 31

加總公式規則: