1 / 36

A Bilingual Introduction to Statistics

A Bilingual Introduction to Statistics. Liangjian Hu Donghua University Ljhu@dhu.edu.cn. Outlines. 课程目的与安排 学习方法 通过一个背景例子介绍统计学的基本概念. Aims of the course. 统计学初步 用 Excel 做统计计算 国际化教育 ( http://www.stams.strath.ac.uk/classes ). Schedule of the course. Hu: 5 月 13 日周二下午 1:00-3:30, 地点 : 1346

cyma
Télécharger la présentation

A Bilingual Introduction to Statistics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Bilingual Introduction to Statistics Liangjian Hu Donghua University Ljhu@dhu.edu.cn

  2. Outlines • 课程目的与安排 • 学习方法 • 通过一个背景例子介绍统计学的基本概念

  3. Aims of the course • 统计学初步 • 用Excel做统计计算 • 国际化教育(http://www.stams.strath.ac.uk/classes)

  4. Schedule of the course • Hu: 5月13日周二下午1:00-3:30, 地点: 1346 • Zuyev: 5月18日周日晚上6:00-8:30, 地点: 1346 • Zuyev: 5月20日周二下午1:00-3:30, 地点: 1346 • Zuyev: 5月21日周三下午1:00-3:30, 地点: 1346 • Zuyev: 5月22日周四晚上6:00-8:30, 地点: 1342 • Zuyev: 5月23日周五下午1:00-2:30, 地点: 1342 • Hu: 待定 • Hu: 考试待定

  5. How to study the course • Lecture • Lab • Read • Guess by context • Terminology in Chinese

  6. What is Statistics • Statistics is a mathematical science pertaining to the collection, analysis, interpretation or explanation, and presentation of data. http://en.wikipedia.org/

  7. The evolution of statistics • Descriptive statistics • Probability • Inferential statistics (Mathematical statistics)

  8. 一个例子 • 2005年10月,为了研究一年级新生体能状况, 体育部随机抽查了90名男同学, 数据记录在Excel文件fresh.xls-raw中. 考虑下列问题: • 估计一年级男生平均身高、体重为多少? • 据报道, 上海20岁男性平均身高为1.74m, ,平均体重62kg, 那么一年级男生平均身高、体重是否明显与上海不同? • 身高, 体重, 体能成绩之间是否有影响? • 这些学生是否从各学院随机抽取?

  9. 概念 • 总体(Population):2005年东华大学一年级约1500名男生; • 样本(Sample):90名学生; • 变量(Variable):学号、姓名、身高、体重、体能等; • 观察值(数据)(Data):变量的值 • 统计推断(Inference):根据样本(Sample)推断总体(Population) 。

  10. Types of data

  11. Types of data • 数值型(Numerical): • 离散数值型(Discrete): Code, • 连续数值型(Continuous) : Height, Weight; • 名称型(Named): • 等级型(Ordinal): Code, • 名义型(Nominal): College,Name.

  12. 第1步:数据清理 • 去除、修补坏数据(Outlier)和缺失数据(Missing Data)(行数据: 5行, 修改3行) ; • 去除与问题无关的变量(列数据), 可保留部分标识列(删Name,保留Code作标识); • 得到fresh.xls-trim

  13. 第2步:数据描述 • Bar charts • Histograms • Relative frequencies • Distribution

  14. Bar charts 柱形图 • 插入-函数-统计-countif • 计算Grade频率(frequency) • 计算分布(相对频率, relative frequency) • 作图

  15. 均匀分布(Uniform Distribution) • 取各值的频率相同

  16. Histograms 直方图 • 首次使用安装: Excel-工具-加载宏-分析工具库 • 统计工具使用: Excel-工具-数据分析-直方图

  17. Histograms 直方图

  18. 正态分布Normal Distribution • 中间多, 两头小; 对称

  19. Location measures 位置度量(集中性特征) • Median中位数: 上、下观察值占50% • Mean均值: 算术平均 • Mode众数: 具有最大频率的观察值

  20. Variability 差异性(离散性特征) • Range 极差=最大值-最小值 • Quartile 四分位: Q0~Q4比该数小的观察值占0%, 25%, 50%, 75%, 100% • Interquartile range 四分位差=Q3-Q1 • Standard deviation 标准差: 距离均值的平均误差 • Skewness 偏度: 偏度小于0时, 表明median<mean • Percentile 百分位数: 指定比例的分位点

  21. 用Excel计算 • 方法1: Excel-插入-函数-统计-(选所需函数) • 方法2: Excel-工具-数据分析-描述统计

  22. 相关性Correlation交叉表Cross-tabulation • Grade-Height交叉表, 相关系数Correlation 0.09

  23. 相关性Correlation交叉表Cross-tabulation • Weight-Height交叉表, 相关系数Correlation 0.75

  24. 第3步:统计推断 • 由样本推断总体 • 参数估计 • 假设检验

  25. 初步结论 • 平均身高173cm,平均体重60kg • 身高、体重都略低于上海市平均, 但不明显 • 身高与体重依赖明显, 但身高与体能基本是独立的(Independent).

  26. 描述统计学的缺点 • 仅说明样本本身 • 对总体推断比较模糊, 不明确. • 怎样对总体作出判断, 依据什么?

  27. 概率论Probability Theory • 概率是随机事件发生可能性大小的度量. • 问题: • 就新生男生而言, 如果理学院占全校1/10, 随机取1人, 他属于理学院的概率? • 随机取90人, 其中理学院正好k人的概率? P=0.1 C(90,k)0.1k0.990-k, k=0,1,2, …, 90 二项分布Binominal Distribution

  28. 统计推断原理 • 如果样本是随机抽取的, 理学院人数不超过3人的概率 P=BINOMDIST(3,90,0.1,TRUE)=0.017 • 统计推断原理: 小概率事件(<0.05)在一次实验中被认为是不可能发生的. • 统计推断: 样本不是随机抽取的!

  29. 置信区间confidence interval • 样本平均身高173.33cm, 由于抽样误差的存在, 总体均值不大可能正好173.33cm, 那么总体均值应该在什么范围内? • 置信区间 CI=[173.33-1.35/2,173.33+1.35/2] • 置信度95%: P(CI)=0.95 • 体重CI=[60.23-1.46/2, 60.23+1.46/2]

  30. 假设检验 Hypothesis testing • 据报道, 上海20岁男性平均身高为1.74米,平均体重62kg, 那么一年级男生平均身高、体重是否明显与上海不同? • 身高:当总体均值为174,抽出样本均值低于173.33的概率 • P值=NORMDIST(1.733,1.74,0.6791,1)=0.15>0.05 • 属于正常情况,所以认为平均身高没有明显低于上海 • 体重:当总体均值为62,抽出样本均值低于60的概率 • P值= NORMDIST(60.23,62,0.736,1)=0.008<<0.05 • 属于小概率时间,所以认为平均体重有明显低于上海

  31. 回归模型Regression • 体重与身高是相关的,相关系数0.75; • 探索:体重与身高的函数关系? • Weight = b0 + b1*Height + error

  32. 用Excel做回归分析 • 方法1: Excel-选数据-散点图-调整坐标轴-右击数据点-添加趋势线-显示公式 • 方法2: Excel-工具-数据分析-回归分析

  33. 回归预测

  34. Some Guys said …. • Statistics have shown that mortality increases perceptibly in the military during wartime. —— Alphonse Allais • One survey found that ten percent of Americans thought Joan of Arc was Noah's wife…… —— Robert Boynton • The statistics on sanity are that one out of every four Americans is suffering from some form of mental illness. Think of your three best friends. If they're okay, then it's you. —— Rita Mae Brown

  35. Some Guys said …. • The statistics on sanity are that one out of every four Americans is suffering from some form of mental illness. Think of your three best friends. If they're okay, then it's you. —— Rita Mae Brown • There are three kinds of lies: lies, damned lies, and statistics. —— Benjamin Disraeli • Not everything that can be counted counts; and not everything that counts can be counted. —— Albert Einstein

  36. Some Guys said …. • I could prove God statistically. —— George Gallup • Statistics are like a bikini. What they reveal is suggestive, but what they conceal is vital. —— Aaron Levenstein • Ninety percent of everything is crap. —— Theodore Sturgeon

More Related