統計方法Statistical methods

Fall 2016課程綱要

 

 


授課教師

黃冠華教授

辦公室:綜合一館423

電話:03-5131334

電子郵件:ghuang@stat.nctu.edu.tw

上課時間與地點

每星期三(上午)9:00-12:00於綜合一館407

課程網頁

http://ghuang.stat.nctu.edu.tw/course/statmethods16/

開課單位

統計碩

永久課號

IST5573

學分數

3

 

課程概述與目標

 

本課程將以實際的巨量資料為核心,搭配統計軟體R (http://www.r-project.org/)的使用,引導課程參與者接觸並學習統計基本原理、資料探索方法(exploratory data analysis)、統計檢定(statistical hypothesis testing)相關的概念和方法、迴歸分析(regression analysis)、主成份與因素分析(principal component and factor analysis)、集群分析(cluster analysis)、分類與判別分析(classification and discrimination analysis)等資料探勘(data mining)相關的概念和方法。

 

上課內容,將廣泛包含所有相關知識,上課時側重講述這些知識的基本觀念與模型解釋(如果需要時)。對於深入的理論與其餘詳細資訊,則僅作重點提示或提供參考文獻。課堂中將以實際的例子來補充上課內容,並討論相關方法的統計軟體R的實作。

 

課程組成部分

 

課堂講解

原則上,每星期三(上午)9:00-11:00,由授課教師或邀請講者,講解課程相關的主題。上課內容,將廣泛包含所有相關知識,上課時側重講述這些知識的生成動機、基本觀念與模型解釋(如果需要時)。對於深入的理論與其餘詳細資訊,則僅作重點提示或提供參考文獻。期盼日後當學生獨立進行統計分析時,這些廣泛的知識,能增廣他們思考問題的角度,並成為眾多他們可選擇的解決方案。若要進行更深入的模型研究與理論推導時,則知道要從何下手與到何處去找尋相關的輔助資訊。

 

演習課

不定期,於星期三(上午)11:10-12:00,由助教或邀請講者,就某一主題的上課內容,進行補充。演習課將著重於以實際的例子來補充上課內容,或討論相關分析方法的電腦軟體實作(例如R)。

 

課前、課後的自行閱讀、自行學習

課堂講解會廣泛包含所有相關主題,側重觀念的講述。補充與衍生內容,則會提供相關來源與網路連結,要求學生於課前或課後自行閱讀。又由於大數據分析領域的蓬勃發展,相關開放課程、分析方法、分析工具、成果應用、開放資料、…等遍佈於網路,因此同學們則常需要(或可以)自行學習新的軟體、工具,並吸收新的知識、應用。注意,許多網路連結與文件是以英文撰寫,英文閱讀的能力將會非常重要。

 

作業

作業會以實際的統計資料分析為核心,練習資料的截取、清理、存取(資料爬梳);如何運用正確、新穎的統計方法;資料、結果的視覺化。作業的目的在學習實作資料分析的技能,並且測試你對課堂內容的理解程度。把寫作業視為一個學習的機會,而不是為了要賺取分數。

 

由於大部份的作業問題,會須要以R程式軟體來進行實作、分析,因此要求同學們的作業要以R Markdown (http://rmarkdown.rstudio.com/)的格式來撰寫。R markdown能將你的文字說明、數學式子、R程式、R執行結果、…等,結合成一個文件,如此將易於他人閱讀與重製(reproduce)你的分析。

 

你可與其他同學討論作業,以幫助理解所問的問題、釐清課程概念。但是你必須獨立完成所繳交的作業,作業中要求寫的電腦程式、跑的資料分析、解釋的分析結果,都不可與他人共同合作。

 

期中、期末考試

本課程將會有一次期中考試(預計於119日舉行)與一次期末考試(預計於111日舉行)。期中考試為closed-book test,範圍包含考前所有上課內容,目的在測試學生對課堂講述之基本觀念、模型、方法的理解程度。期末考試為open-book test,範圍涵蓋本課程所有上課內容,目的在檢驗學生運用課堂上所學的統計方法與技術來進行資料分析的能力。

 

先修科目或先備能力

 

1.        有寫電腦程式的經驗

l   像:C, C++, Java, Python, R,

2.        修過基礎統計學

l   知道:隨機變數、信賴區間、假設檢定、…

3.        願意學習新的軟體、工具

l   常會非常花時間

l   要大量閱讀網路上的文件

l   閱讀許多英文文件

 

課程實作軟體與教科書

 

本門課將會以R程式軟體(http://www.r-project.org/),來當作資料分析實作的工具。因此不論演習課助教講解與作業問題,皆會以R程式軟體的操作與撰寫為基礎。

 

本門課雖無指定、必須購買的教科書,然相關的自行閱讀、補充教材內容,將出自以下幾本參考書籍:

1.        Irizarry RA, Love MI (2015): Data Analysis for the Life Sciences. 這本書的相關訊息,可從以下連結獲得:https://leanpub.com/dataanalysisforthelifesciences

2.        Montgomery DC, Peck EA, Vining GG (2012): Introduction to Linear Regression Analysis (5th Edition). Wiley. 這本書是「迴歸分析」的主要參考書目。

3.        Johnson RA, Wichern DW (2007): Applied Multivariate Statistical Analysis (6th Edition). Prentice Hall, Upper Saddle River, NJ. 這本書是「多變量分析」的主要參考書目。

 

本課程所有上課投影片與相關補充資料,還有用以執行演習課實際例子與上課講議圖形的R程式,都將會公佈於課程網頁。

 

學期成績評分方式

 

學期成績的計算方式為:

1.        作業:50%

2.        期中考試:20%

3.        期末考試:30%

 

課程大綱

 

l   Fundamental of statistics

      Summary statistics

      Measure of association

      Random variables

      Probability mass (density) function

      Cumulative distribution function

      Mean and variance

      Central limit theorem

      Statistical inference

      Point estimate

      Confidence interval

      Test of significance

      P-value

l   Exploratory data analysis

      Measurement scales, data types

      R graphic package: ggplot2

      Displaying distribution of univariate data: stem-and-leaf plot, q-q plot, histogram, box plot, bar chart, pie chart

      Displaying correlation for bivariate data: scatterplot, box plots, stacked bar chart, faceting bar charts, stacked area chart, time series plot

      Displaying association for multivariate data: 3d scatterplot, lattice in the 3rd dim, map the 3rd dim to colors, lay out panels in the 3rd dim, scatterplot matrices, heatmap

l   Statistical decision making: hypothesis testing

      Basic concepts: null versus alternative hypothesis, type I type II errors, significance level, test statistic, power, p-values

      Hypothesis testing for continuous random variables: one-sample t-test, two-sample t-test, F-test for equal variance, ANOVA, paired t-test,

      Hypothesis testing for categorical data: binomial test, 𝑥2 test / Fisher’s exact test, McNemar's test, Cohen's kappa test, Mantel-Haenszel test

      Nonparametric statistical methods: sign test, Wilcoxon signed-rank test, Wilcoxon rank-sum test, Kruskal-Wallis test

      Computational methods: permutation test, bootstrap

l   Regression analysis

      Simple and multiple linear regressions for continuous data

      Interpretation and estimation of regression coefficients

      Confounding and interaction

      Regression diagnostics

      Logistic regressions for binary data

l   Principal component and factor analysis

      Population principal components

      Summarizing sample variation by principal components

      Orthogonal factor model

      Factor rotation

      Factor scores

l   Cluster analysis

      Similarity and distance measures

      Hierarchical clustering methods

      K-means clustering methods

      Multidimensional scaling

l   Classification and discrimination analysis

      Linear discrimination analysis

      Quadratic discrimination analysis

      K-nearest neighbor (KNN)

      Classification and regression trees (CART)