統計圖表的製作
變項的類型
分類資料
(discrete variable)
類別尺度(nominal scale)
例如:疾病、性別等
序位尺度(ordinal scale)
除了分類以外,有大小程度順序之關係
例如:職稱、學歷等
連續性資料
(continuous scale)
等距尺度(interval scale)
除了分類、順序以外,代表相對距離,但沒有絕對的0
例如:溫度等
等比尺度(ratio scale)
使用標準化的單位,有絕對的0
例如:身高、體重、年齡等
分類資料的描述
比例或百分比(ratio or %)
分類資料的描述
Yahoo新聞時事民調
分類資料的基本統計圖1
柱狀圖(Bar charts)
0 50 100 150 200 250
2007年 2008年 2009年 2010年 2011年
新發生個案數
柱狀圖繪製步驟1
excel 2003為例
OR
柱狀圖繪製步驟2
excel 2003為例
1
2
3
柱狀圖繪製步驟3
excel 2003為例
柱狀圖繪製後,如何更改
excel 2003為例
圖上按滑鼠右鍵分類資料的基本統計圖2
派餅圖(Pie charts)
派餅圖繪製步驟1
excel 2003為例
連續性資料的描述
集中量數 變異量數
集中量數
平均值(mean, M)
總和/個數
中位數(median, Mdn)
全部個體小到大排序後,最中間的一個
眾數(mode, Mo)
出現頻率最多的數值
平均值=中位數=眾數→常態分布
三種集中量數的比較
變異量數
組距(range)
最大值與最小值之差,觀察值的範圍
變異數(variance, Var)
{Σ(每個數值-平均數)2}/個數
標準差(standard deviation, SD)
(√變異數)
標準誤(standard error, SE)
標準差/ (√個數) (樣本平均值間的差別)
變異係數(coefficient of variance)
標準差/平均值(主要比較不同變項或單位的變異程度)
四分位差(inter-quartile range, IQR)
觀察值由小到大排序後,高分組第25%(Q3)的數值-低 分組後25%(Q1)的數值
連續資料的描述
連續資料的基本統計圖1
柱狀圖(Bar charts)
柱狀圖繪製步驟1
excel 2003為例
其餘同分類資料的柱狀圖 步驟
在 柱上 雙擊 滑鼠 左 鍵
柱狀圖繪製步驟2
excel 2003為例
2 1
3
4
6
7
5
8
柱狀圖繪製步驟3
excel 2003為例
9
連續資料的基本統計圖2
直方圖(Histogram)
直方圖繪製步驟1
excel 2003為例
其餘同分類 資料的柱狀
圖步驟
在 柱上 雙擊 滑鼠 左 鍵
直方圖繪製步驟2
excel 2003為例
1
直方圖,X為連續變項,
因此X間之間距=
0
連續資料的基本統計圖3
折線圖(Line charts)
折線圖繪製步驟
excel 2003為例
連續資料的基本統計圖4
散佈圖(Scatter/Dot plots)
散佈圖繪製步驟
excel 2003為例
散佈圖加上趨勢線步驟
excel 2003為例
在任一點上單擊滑鼠右鍵
再點選適用的類型,一般以線性為主
連續資料的基本統計圖(5)
箱型圖(Box plots)
最小值 Q1
中位數, Q2 Q3
最大值
連續資料的基本統計圖(6)
莖葉圖(Stem-and-Leaf Plot)
(個位數)
Receiver Operative
Characteristic Curve (ROC)
What is the difference between a screening and a diagnostic test?
A screening test is not definitive
A personalized risk estimate
Increased risk
A diagnostic test is definitive and
indicates whether or not your baby has
a certain disease or condition.
敏感度(sensitivity, Sen.)
P(T+|D+)=A/(A+B)
特異性(specificity, Spe.)
P(T-|D-)=C/(C+D)
陽性預測值(Positive Predictive value, PPV)
P(D+|T+)=A/(A+D)
陰性預測值(Negative Predictive value, NPV)
P(D-|T-)=C/(B+C)
事前機率Prior probability, P(D+)
事後機率Posterior probability, P(D+|T+)
Sensitivity 95% Specificity.98%
N=1000000
Prevalence=0.04%
PPV=380/20372=0.019
NPV=979608/979628=0.99998
Sensitivity 95% Specificity.98%
N=1000
Prevalence=10.0%
PPV=95/113=0.841 NPV=882/887=0.994
Prevalence & Screening
(Sensitivity 99%, Specificity 95%)
100%
100%
NPV
51%
17%
PPV
49.5+47.5=97 9.9+49.5=60
Test+
950 990
D-
50 10
D+
1000 1000
N
5%
1%
Prevalence
Chang cut-off
A->B
A ->C
Spe. Sen.
Sen. Spe.
ROC curve
ROC curve
64.5%
Specificity
87.0%
PPV
88.3%
Sensitivity
67.2%
NPV
1.42 Best cut-of
<0.001 p-value
0.844~0.859 95% C.I. of AUC
0.852 Area under curve (AUC)
1.42
繪製ROC SPSS17.0為例
1
2
3