31
Introduction to Statistics Jian-hua Yeh ( 葉葉葉 )

Introduction to Statistics

Embed Size (px)

DESCRIPTION

Introduction to Statistics. Jian-hua Yeh ( 葉建華 ). Outline. What is Statistics? Types of Statistics. Introduction. 2007/9/16, 王建民對上紅襪的 Beckett 。師範大學的多數學生會不會因為王建民輸球而刻意不看那場球賽的轉播呢 ? 第二屆星光大道的節目比第一屆難看嗎 ?. What is Statistics?. Definition of Statistics 從資料 (data) 中獲得資訊 (information) 的方法 - PowerPoint PPT Presentation

Citation preview

Page 1: Introduction to Statistics

Introduction to Statistics

Jian-hua Yeh ( 葉建華 )

Page 2: Introduction to Statistics

Outline

• What is Statistics?

• Types of Statistics

2

Page 3: Introduction to Statistics

Introduction

• 2007/9/16, 王建民對上紅襪的 Beckett 。師範大學的多數學生會不會因為王建民輸球而刻意不看那場球賽的轉播呢 ?

• 第二屆星光大道的節目比第一屆難看嗎 ?

3

Page 4: Introduction to Statistics

What is Statistics?

• Definition of Statistics

– 從資料 (data) 中獲得資訊 (information) 的方法– 以數學與機率為基礎有系統有組織的解決問題之學

門 ( 客觀學 )

• Passive objective: 探討原因以分析問題• Active objective: 提出方案以解決問題

4

Page 5: Introduction to Statistics

Problem Solving Flow

5

Page 6: Introduction to Statistics

The Role of Statistics

• The life cycle of statistical survey

6

Page 7: Introduction to Statistics

Types of Statistics

• Descriptive Statistics

– 以便捷且易於獲取資訊的方式組織、彙整、並描述資料

– 畫圖、製表、算比例、算平均數 -> 瞭解資料特性

7

Page 8: Introduction to Statistics

Types of Statistics (2)

• Inferential Statistics

– 根據樣本資料 ( 統計量 ) 推論母體特性 ( 估計、檢定 )

– E.g. 以師範大學圖資所學生不看輸球球賽轉播的比例推論所有師大學生的態度 .

– Applied Statistics: 變異數分析 / 實驗設計 / 迴歸分析 / 統計模擬 / 卡方檢定 / 時間序列 / 品質管理 / 多變量分析 ...

8

Page 9: Introduction to Statistics

Descriptive Statistics

• Descriptive statistics involves the arrangement, summary, and presentation of data, to enable meaningful interpretation, and to support decision making.

• Descriptive statistics methods make use of– graphical techniques (and table format) (圖表 )

– numerical descriptive measures (數值 )

• The methods presented apply to both– the population

– the sample

9

Page 10: Introduction to Statistics

Descriptive Statistics – Stem & Leaf

10

0 00000000001111122222233333455555566666667788889999991 0000011112333333344555556678899992 00001111123446667789993 0013355894 1244455895 335666 34587 0222245567898 3344578899999 0011222223334455599910 00134444669911 124557889

Page 11: Introduction to Statistics

Descriptive Statistics – Histogram

11

0

20

40

60

80

15 30 45 60 75 90 105 120

Bills

Fre

qu

en

cy

Page 12: Introduction to Statistics

Descriptive Statistics – Line

12

Cumulative relative frequency

Bills

Cumulative relative frequency

Bills

Page 13: Introduction to Statistics

Descriptive Statistics – Pie

13

Page 14: Introduction to Statistics

Descriptive Statistics – Scatterplot

14

0

100

200

300

400

0 10 20 30 40

Page 15: Introduction to Statistics

Types of Data and Information

• A variable ( 變數 )

– A characteristic of population or sample that is of interest for us. ( 我們感興趣的母體或樣本的特性 )

– 舉例 - 手機品牌、考試成績、選課花費時間– 常用大寫英文字母 X, Y, Z 表示變數名稱

• Values of a variable

– The possible observations of a variable. ( 變數可能的觀測值 )

– 舉例 - 手機價格的 values 是個實數,範圍從 0 到數十萬元

15

Page 16: Introduction to Statistics

Types of Data and Information (2)

• Data - the observed values of a variable.( 變數的實際值 )

– 舉例 - 手機價格為 5000 元 , 12000 元

• Types of data

– Interval data ( 區間資料 ) are real numbers

• 有時也叫 quantitative data, numerical data

– Nominal data ( 名目資料 ) are categorical ( 類別的 ) observations

– Ordinal data ( 順序資料 ) are ordered categorical observations

– Ratio data ( 比率資料 )

16

Page 17: Introduction to Statistics

Types of Data - Example

17

Interval data

Age - income55 7500042 68000

. .

. .

Age - income55 7500042 68000

. .

. .

Nominal

Person Marital status1 married2 single3 single. .. .

Person Marital status1 married2 single3 single. .. .

Computer Brand1 IBM2 Dell3 IBM. .. .

Computer Brand1 IBM2 Dell3 IBM. .. .

Weight gain+10+5..

Weight gain+10+5..

Page 18: Introduction to Statistics

Types of Data – Example (2)

• Ordinal Data

– How do you evaluate this classroom?

– Ans: Poor, fair, good, very good, and excellent

18

Page 19: Introduction to Statistics

Calculations for Types of Data

Interval data

Age - income55 7500042 68000

. .

. .

Age - income55 7500042 68000

. .

. .

Nominal data

With nominal data, all we can do is, calculate the proportion of data that falls into each category.( 只能計算次數 , 比例 )

With nominal data, all we can do is, calculate the proportion of data that falls into each category.( 只能計算次數 , 比例 )

IBM Dell Compaq Other Total 25 11 8 6 50 50% 22% 16% 12%

IBM Dell Compaq Other Total 25 11 8 6 50 50% 22% 16% 12%

Weight gain+10+5..

Weight gain+10+5..可以加減乘

除 , 算平均數等

可以加減乘除 , 算平均數等

19

Page 20: Introduction to Statistics

Calculations for Types of Data

• Ordinal Data

– Ordinal Data 最重要一點是值的順序 (order), 所以可以用 「和次序有關的計算」

– 舉例 - 中位數

20

Page 21: Introduction to Statistics

Basic Statistics

• Core components

– Population( 母體 ): 特定研究中,我們有興趣的全體事項的集合

– Sampling( 抽樣 ): 當母體資料不易取得時方得抽樣– Sample( 樣本 ): 由母體抽樣取得之具代表性項目– Parameter( 參數 ): 母體的某ㄧ個特徵值– Statistic( 統計量 ): 隨機樣本的某ㄧ個特定函數

21

Page 22: Introduction to Statistics

Basic Statistics (2)

• 以師範大學圖資所學生不看輸球球賽轉播的比例推論所有師大學生的態度– Population?

– Parameter?

– Sample?

– Statistic?

22

Page 23: Introduction to Statistics

Basic Statistics (3)

• 以師範大學圖資所學生不看輸球球賽轉播的比例推論所有師大學生的態度– Population = 師範大學所有學生– Parameter = 師大所有學生中不看輸球球賽轉播的比例

– Sample = 師大圖資所某年級學生– Statistic = 師大圖資所某年級學生不看輸球球賽轉播的比例

23

Page 24: Introduction to Statistics

Parameter

• 以數學式表示時,參數是母體資料的函數,此函數的值能反映出母體的特徵

• 只要普查後,就可得知參數的值,故參數是一個固定常數

• 實務上,我們很少花大筆經費去普查,故經常不知道參數的值

24

Page 25: Introduction to Statistics

Statistic

• 以數學式表示時,統計量是樣本資料的函數,此函數的值能反映出樣本的特徵

• 當抽樣調查完成後,統計量的值就可知道了;但其值會隨樣本而異,故統計量是一個變數(variable)

• 我們經常用統計量估計未知的參數

25

Page 26: Introduction to Statistics

Try Now

• 一電腦晶片製造商宣稱其產品中,少於 5% 是瑕疵品。現今從一大量生產批次中取出 600 片晶片,發現其中有 3.5% 是瑕疵品– Population?

– Sample?

– Parameter?

– Statistic?

– What is the role of “5%”?

– What is the role of “3.5%”?

– What is the result of statistical inference?

26

Page 27: Introduction to Statistics

The Answer

• 一電腦晶片製造商宣稱其產品中,少於 5% 是瑕疵品。現今從一大量生產批次中取出 600 片晶片,發現其中有 3.5% 是瑕疵品– Population = 大量生產批次所有的晶片– Sample = 取出的 600 晶片– Parameter = 大量生產批次的晶片中瑕疵品的比例– Statistic = 取出的 600 晶片中瑕疵品的比例– What is the role of “5%”? parameter

– What is the role of “3.5%”? statistic

– What is the result of statistical inference?因為 3.5%小於 5% ,所以相信製造商的宣稱

27

Page 28: Introduction to Statistics

Basic Statistics - Sampling

• Sampling is a mean to project statistic to parameter

• Example

– 性別– 目前使用的手機品牌– 這支手機的價格– 考慮多久時間決定買下– 對 Nokia 手機的喜好程度

• 分非常不喜歡 , 不喜歡 , 普通 , 喜歡 , 非常喜歡

28

Page 29: Introduction to Statistics

Think It Over…

• 「手機品牌」的資料可以畫什麼圖 ?

• 「所購買手機的價格」的資料可以畫什麼圖 ?

• 「對 Nokia 手機的喜好程度」的資料可以畫什麼圖 ?

• 同時考慮「這支手機的價格」和「考慮多久時間決定買下」兩個變數的關係 ,應該如何畫圖 ?

• 同時考慮 「性別」和「手機品牌」兩個變數的關係 ,應該如何畫圖 ?

29

Page 30: Introduction to Statistics

The Point

不同的資料適合畫的圖不一樣

30

Page 31: Introduction to Statistics

The Answer

• 「手機品牌」的資料可以畫什麼圖 ?

– Pie chart 、 histogram

• 「所購買手機的價格」的資料可以畫什麼圖 ?

– Stem&leaf

• 「對 Nokia 手機的喜好程度」的資料可以畫什麼圖 ?

– Pie chart 、 histogram

• 同時考慮「這支手機的價格」和「考慮多久時間決定買下」兩個變數的關係 ,應該如何畫圖 ?

– Scatterplot

• 同時考慮 「性別」和「手機品牌」兩個變數的關係 ,應該如何畫圖 ?

– Histogram31