【Statistics】Understanding Some Concepts from Statistics Aspect

Understanding Some Concepts from Statistics Aspect

通过Khan Accademy中关于 Probability and Statistics(国内) 的学习(建议使用Probability and Statistics(国外)),对 Probability 中学到的概念有了一些新的理解,解决了之前困扰我的问题。可能并不是很连续的知识,只是一些帮助我理顺逻辑的知识,希望这些内容同样能够帮助现在的你。


0.什么是统计学(statistics)?

更宽泛的意义来说,统计学(statistics)是处理数据的一个学科。一般来说,它有两个分类:Inferential StatisticsDescriptive Statistics

  • Inferential Statistics : 通过数据(样本数据sample data),给出结论。
  • Descriptive Statistics : 用简单的数据(eg. 算术平均/方差/中位数),描述总体数据(population)应该长什么样子。

特别地,Statistics 中很喜欢用 central tendency 一词。这个词是描述数据该长什么样子的一个维度,另一个维度是 disperssion。具体地,我们可以用 平均数,中位数,众数等具体形式算出的数值来量化 central tendency,用 方差 来量化 disperssion


1.惯用的符号(Notation)

熟悉统计学的符号,可以让我们减轻理解的负担,更重要的是,可以方便地消除歧义。

  • 总体均值(population mean): μ \mu μ

  • 总体方差(population variance): σ 2 \sigma^{2} σ2

  • 样本均值(sample mean): X ˉ \bar{X} Xˉ

  • 样本方差(sample variance): S 2 S^2 S2

另外,样本(sample)的统计量,习惯上称为 统计量(statistic) ;而总体(population)的统计量,习惯上称为 参数(parameter)。因为,普遍习惯将未知待求的量称为parameter,而求解parameter的过程,就是时常听说的 推断(inferring)


2.为什么均值又称为期望值?(Mean and Expectation)

注意,均值 μ \mu μ (mean) 的含义是,总体均值(mean of population)。换句话说,理论上而言,当我们要求均值 μ \mu μ 时,我们需要获得整体的所有数据。

然而,在实际中,我们一般只拥有样本(sample)的数据,而非整体的数据。另一种情况是,当我们处理连续随机变量(continuous r.v.)时,我们更加不可能获得整体的数据,因为这是无限不可数(uncountable)的集合。

最终,我们选择使用 “频率” 来代表 “一片” 数据。即假设有人告诉我,整体数据的分布是怎么样的时候(某个数据占比是多少),我们并不需要知道每一实验得到的值具体是多少,我们也可以把均值算出来。对于Statistics,可以止步于此。但对于 Probability 而言,我们还用了这么一个假设,即我们 假设当实验次数无穷多的时候,频率值接近于概率值

题外话是,这样算出来的 “均值” 是不是或多或少有点 “期望” 的味道在里面呢?毕竟生活经验告诉我们,如此大量的数据总会有漏网之鱼,我们只能期望均值是我们算出来的这个值。


3.为什么无偏样本方差长这样?(Unbiased Sample variance)

样本方差:
S n = ∑ i = 1 n ( x i − μ ) 2 n S_{n} = \frac{\sum\limits_{i=1}^{n} (x_{i}-\mu)^{2}}{n} Sn=ni=1n(xiμ)2

无偏样本方差:
S n − 1 = ∑ i = 1 n ( x i − μ ) 2 n − 1 S_{n-1} = \frac{\sum\limits_{i=1}^{n} (x_{i}-\mu)^{2}}{n-1} Sn1=n1i=1n(xiμ)2
这里,关键在于这是 样本(sample) 的方差,而不是 整体(population) 的方差。对于整体的无偏方差,分母依旧是 n n n 。另外,请注意 S n − 1 \sqrt{S_{n-1}} Sn1 得到的样本标准差并不是无偏的。

  • (直观理解)虽然看公式看起来并不直观,但我们可以设想这么一种情景帮助我们去接受这个结果:(待续)

可以想象

  • (严谨的证明):(待续)

4.理解泊松分布(Poisson distribution)

待续


5.中心极限定理(The Central Limit Theorem)

0)意义

可以“融合”各种形式的分布(满足i.i.d.条件即可),形成性质甚佳的正态分布,方便建模。

1)定义

Let X 1 , X 2 , … X_1,X_2,\dots X1,X2, be a sequence of independent identically distributed random variables with common mean μ \mu μ and variance σ 2 \sigma^2 σ2, and define:
Z n = X 1 + X 2 + ⋯ + X n σ n Z_n = \frac{X_1+X_2+\dots+X_n}{\sigma\sqrt{n}} Zn=σn X1+X2++Xn
Then, the CDF of Z n Z_n Zn converges to the standard normal CDF:
Φ ( z ) = 1 2 π ∫ − ∞ z e − x 2 2 σ 2 d x \Phi(z)=\frac{1}{\sqrt{2\pi}}\int_{ - \infty }^{z} {e^{-\frac{x^2}{2\sigma ^2}}dx} Φ(z)=2π 1ze2σ2x2dx
In the sense that, for every z z z:
lim ⁡ n → ∞ P ( Z n ≤ z ) = Φ ( z ) \lim_{{n\to\infin}} P(Z_n \leq z ) = \Phi(z) nlimP(Znz)=Φ(z)

2)直观理解

待续

3)数学证明

待续


6.置信区间(Confidence Intervals)

0)意义

置信区间是一种量化手段。量化的对象是 估计的好坏 (Determine how good the estimate is.)

1)定义

待续

2)直观理解

通过以下两种等价的表达来帮助理解:

  • We are confident that there is 95% chance that the sample mean X ˉ \bar {X} Xˉ is within some standard derviation of population mean μ \mu μ.
  • We are confident that there is 95% chance that the population mean μ \mu μ is within some interval of the sample mean X ˉ \bar {X} Xˉ .

一般而言,我们可以通过中心极限定理(The Central Limit Theorem)来获得 sampling distribution of sample mean。此时,sampling distribution 有如下性质:
μ X ˉ = μ \mu_{\bar{X}} =\mu μXˉ=μ

σ X ˉ = σ n \sigma_{\bar{X}} = \frac{\sigma}{\sqrt{n}} σXˉ=n σ

所以,最直接地,我们可以通过sampling distribution 得到第一个表述的结果。通过相对的变化,我们可以获得第二个表述的结果。

一定要注意的是,这里的表述指的是"We are confident that …",而并不是真的有95%的概率满足。

另外,经验而言,当我们为需要为小样本容量(sample size n ≤ 30 n\leq 30 n30) 计算置信区间时,我们可以选择使用 t distribution 对sampling data 进行建模。


7.其它

1) 二项分布为什么叫二项分布?

我经常会记混 Bernouli distributionBinomial distribution。原因也很简单,因为都是读音和写法感觉都很像嘛。但当你知道Binomial distribution 名字的由来,我相信再也不会记错了。

此处的Binomial,是得名于 Binomial coefficient (牛顿二项展开式系数)即:
C n k = n ! k ! ( n − k ) ! C_{n}^{k} = \frac{n!}{k!(n-k)!} Cnk=k!(nk)!n!
另外,Binomial distribution 描述的是,进行 n n n 个满足 Bernouli distribution 的实验,且实验之间符合 i.i.d (独立同分布) 的 概率分布。简单而言,可以假想如下情形:同一枚硬币抛 n n n 次,硬币有 k k k 次朝上的概率分布。
P ( X = k ) = C n k p k ( 1 − p ) n − k P(X = k) = C_{n}^{k}p^{k}(1-p)^{n-k} P(X=k)=Cnkpk(1p)nk

2) 哪几个分布很重要?为什么它们很重要?

虽然有很多分布(eg. dirichlet distribution/beta distribution…)没怎么听说,但其实是很重要的。那么,在本科 Probability and Statistics 的课程中反复提及的 Bernouli distribution, Binomial distribution, Poisson distribution, Gaussian distribution ,Chi-square distribution, 其重要性可以说是不言而喻了。

关于为什么它们很重要这个问题,个人理解,是因为这些分布有如下性质:数学性质好,成体系(可互相转化)

  • Gaussian distribution:高斯分布之所以很重要,是因为有中心极限定理(Central limit theorem) 的存在,使得它在所有分布中占据核心的地位。
  • Bernouli distribution and Binomial distribution:我们可以说 Bernouli distribution 是 Binomial distribution 的特殊情况。
  • Poisson distribution and Binomial distribution:Poisson distribution 可以由 Binomial distribution 推导而来。但请注意,这个推导并不是想象中那么直接明了。因为满足 Binomial distribution 的随机变量是离散的(discrete r.v.),而满足 Poisson distribution 的随机变量是连续的(continuous r.v.)。换言之,这个推导过程,模糊了随机变量其离散和连续的界限。
3)一些关于Gaussian distribution的内容
  • Gaussian distribution 的另外一种形式:

f ( x ) = 1 2 π σ 2 e − ( x − μ ) 2 2 σ 2 = 1 2 π σ 2 e x − μ σ f(x) = \frac{1}{\sqrt{2\pi \sigma ^2}}e^{-\frac{(x-\mu)^2}{2\sigma ^2}} =\frac{1}{\sqrt{2\pi \sigma ^{2} e^{\frac{x-\mu}{\sigma}}}} f(x)=2πσ2 1e2σ2(xμ)2=2πσ2eσxμ 1

  • z-score

    • Define as how many standard deviation away from mean.
    • Can be used in any distribution.
  • skew:衡量对称程度的量值。positive(right) skew 为右长尾;negative(left) skew:左长尾;

4)什么是Sampling distribution?

首先,我们先看看与 sampling distribution 有关的词语:

  • sampling distribution of the sample mean

  • sampling distribution of the sample variance

  • sampling distribution of sample median

最简单的理解就是 distribution of mean, distribution of variance, distribution of median 。加上 sample 只是为了指明我们的数据直接来源于样本(sample)。

另外,我们的分布图像(distribution)可以用各种统计量作为自变量(横坐标),因为这些统计量自身都就是是随机变量。

5)什么是Estimator?

待续 example exercise of biased and unbiased estimator

sample size get approach to inf(很重要)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
All of Statistics is a comprehensive textbook on statistics written by Larry Wasserman, a professor of statistics at Carnegie Mellon University. The book provides a thorough introduction to statistical concepts and methods, including probability theory, statistical inference, regression analysis, and hypothesis testing. It is intended for students and researchers in a variety of fields, including mathematics, engineering, computer science, and the natural and social sciences. The book is divided into six parts: 1. Probability: This section covers basic concepts in probability theory, including random variables, probability distributions, conditional probability, and Bayes' rule. 2. Statistical Inference: This section covers the principles of statistical inference, including point estimation, confidence intervals, and hypothesis testing. 3. Linear Regression: This section covers linear regression models, including simple linear regression, multiple regression, and logistic regression. 4. Nonparametric Methods: This section covers nonparametric methods, including rank-based tests and density estimation. 5. Bayesian Methods: This section covers Bayesian methods, including Bayes' theorem, Bayesian inference, and hierarchical models. 6. Advanced Topics: This section covers advanced topics in statistics, including high-dimensional data analysis, time series analysis, and causal inference. Throughout the book, Wasserman emphasizes the importance of understanding the underlying concepts and principles of statistics, rather than just memorizing formulas and procedures. He also provides numerous examples and exercises to help readers develop their skills in statistical analysis. Overall, All of Statistics is a highly-regarded textbook that provides a comprehensive introduction to statistical theory and methods. It is suitable for undergraduate and graduate students, as well as researchers and practitioners in a range of fields.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值