数理统计的统计量分布t分布

by Kirill Dubovikov

通过基里尔·杜博维科夫(Kirill Dubovikov)

t分布:啤酒厂发现的关键统计概念 (The t-distribution: a key statistical concept discovered by a beer brewery)

In this post we will look at two probability distributions you will encounter almost each time you do data science, statistics, or machine learning.

在这篇文章中,我们将研究几乎每次您进行数据科学,统计学或机器学习时都会遇到的两种概率分布。

高斯分布 (Gaussian distribution)

Imagine that we are doing a research on the height of various people in a city. We go down the street and measure a bunch of random people. (Some of them thought this was quite strange and wanted to call the police, but come on, this is for the science!)

想象一下,我们正在研究一个城市中不同人群的身高。 我们走在街上,测量一群随机的人。 (他们中的一些人认为这很奇怪,因此想报警。但是,这是出于科学上的理由!)

Now we decide that some Exploratory Data Analysis won’t hurt. But statistical software like R isn’t available at the moment, so we just make a histogram out of people.

现在,我们确定一些探索性数据分析不会受到伤害。 但是目前尚无法使用R之类的统计软件,因此我们只是根据人们制作直方图。

What do we see here? Ahh, the famous bell curve. This is likely to be the most important probability distribution you will ever encounter. Thanks to the Central Limit Theorem, the Gaussian distribution is present in many real world phenomena. It’s so common that people just call it a normal distribution.

我们在这里看到什么? 啊,著名的钟形曲线。 这可能是您将遇到的最重要的概率分布。 多亏了中心极限定理 ,高斯分布存在于许多现实世界中。 如此普遍以至于人们只称其为正态分布

The Central Limit Theorem states that arithmetic mean of a sufficiently large number of independent random variables will be normally distributed. Those random variables can have any distribution initially. But when we measure something that is represented by their sum, we will eventually (as the number of samples tends to ) end up with normally distributed process.

中心极限定理指出,足够多的独立随机变量的算术平均值将呈正态分布。 这些随机变量最初可以具有任何分布。 但是,当我们测量用它们的和表示的东西时,我们最终(由于样本数趋于 )最终将以正态分布过程结束。

The probability density function of Gaussian distribution is written below:

高斯分布的概率密度函数写为:

This formula may look a bit intimidating, but it’s convenient to work with mathematically. If you’re interested in how it can be derived, you can read how here. As you can see this distribution has two parameters:

这个公式可能看起来有些吓人,但是数学上使用起来很方便。 如果您对如何派生感兴趣,可以在这里阅读 。 如您所见,此分布具有两个参数:

  • µ (mean)µ(均值)
  • σ(standard deviation).σ(标准偏差)。

Mean µ controls the expected value (where the most values will go) of a normally distributed random variable. Variance σ² controls the spread or variety of possible values under the distribution.

均值µ控制正态分布的随机变量的期望值 (最多的值将到达该值)。 方差σ²控制分布下可能值的分布或变化。

The concept of a normal distribution has immense value in machine learning. A great variety of machine learning algorithms use it extensively:

正态分布的概念在机器学习中具有巨大的价值。 各种各样的机器学习算法广泛使用它:

  • Linear models assume that errors are normally distributed线性模型假设误差是正态分布的
  • Gaussian processes assume that all values of a function under the model are distributed normally高斯过程假设模型下函数的所有值均呈正态分布
  • Gaussian mixtures let you model complex distributions and build classifiers on top of mixture models高斯混合可让您对复杂的分布进行建模,并在混合模型的基础上建立分类器
  • Normal distribution comes up as one of the main components in Variational Autoencoders正态分布是变分自动编码器的主要组成部分之一

Here is an interactive demo of the Gaussian distribution.

这是高斯分布的交互式演示。

学生的t分布 (A student’s t-distribution)

What if we wanted to model our data with Gaussian distribution, but the variance σ² is was not known to us? This problem arises when the sample sizes are small and standard deviation (σ) can not be estimated accurately.

如果我们想用高斯分布对数据建模,但我们不知道方差σ²怎么办? 当样本量较小且无法准确估算标准偏差(σ)时,会出现此问题。

William Gosset tackled this problem while working at a Guinness brewery. He empirically found a formula for a t-distributed random variable.

威廉·高塞特(William Gosset)在吉尼斯啤酒厂工作时解决了这个问题。 他根据经验找到了t分布随机变量的公式。

First, suppose we have values x, …, xn which were sampled from some normal distribution N(µ, σ²).

首先,假设我们有x,…,xn它们是从某些正态分布N(µ,σ²)中采样的。

We do not know the true variance, but we can estimate it by calculating sample mean and variance:

我们不知道真正的方差,但是我们可以通过计算样本均值和方差来估计它:

Then the random variable

然后是随机变量

will have a t-distribution with n-1 degrees of freedom, where n is the number of samples.

将具有n-1个自由度的t分布,其中n是样本数。

This formula may resemble transformation from Normal to Standard Normal (a shorthand for Normal distribution with zero mean and unit variance):

此公式可能类似于从正态到标准正态的转换(均值和单位方差为零的正态分布的简写):

We don’t know the true population variance, so we have to substitute sample standard deviation estimate for the real one.

我们不知道真实的总体方差,因此我们必须用样本标准差估计值代替真实的估计值。

This distribution lies at the foundation of the scientific method, called the t-test. This was used at Guinness to measure the quality of their beer.

这种分布是称为t检验的科学方法的基础。 吉尼斯(Guinness)用它来测量啤酒的质量。

William Gosset published this result under a pseudonym Student. Guinness was afraid that its competitors would discover that the t-test was used to control the quality of their product.

William Gosset以化名Student公布了此结果。 吉尼斯(Guinness)担心竞争对手会发现t检验用于控制产品质量。

Gosset’s discoveries were later formalized by famous statistician Ronald Fisher. Fisher is considered to be the author of the frequentist approach to statistics.

戈塞特的发现后来由著名的统计学家罗纳德·费舍尔(Ronald Fisher)正式化。 费舍尔(Fisher)被认为是统计学的常识性方法的作者。

Now goes the fun part! You can play with t-distribution below:

现在开始有趣的部分! 您可以在下面使用t分布进行游戏:

As you can see t-distribution approaches standard normal when degrees of freedom are large. This happens because sample mean approaches true mean as a number of samples approaches infinity. The “fat” tails of t-distribution compensate for uncertainty when we are working with small samples.

如您所见,自由度较大时,t分布接近标准正态。 发生这种情况的原因是,当多个样本接近无穷大时,样本均值趋于真实均值。 当我们处理小样本时,t分布的“胖尾”弥补了不确定性。

An interested reader might ask, “So, what is the probability density function of the t-distribution? How can we derive it?” This turns out to be not that easy in terms of mathematics, but the central idea is easy to grasp.

感兴趣的读者可能会问:“那么,t分布的概率密度函数是什么? 我们如何得出呢?” 事实证明,这在数学上并不是那么容易,但是中心思想很容易掌握。

Let’s suppose we are interested in getting the probability density function of normal variable X ~ N(0, σ). But without direct dependence on standard deviation σ.

假设我们对获取正态变量X〜N(0,σ)的概率密度函数感兴趣 但不直接依赖于标准偏差σ。

Intuitively, to get rid of σ we must make some assumptions. Let’s treat σ as a random variable itself, and assume that it follows Gamma distribution (this is a very general distribution which has many uses in Bayesian statistics).

凭直觉,要摆脱σ,我们必须做一些假设。 让我们将σ本身当作一个随机变量,并假定它遵循Gamma分布 (这是一种非常通用的分布,在贝叶斯统计中有很多用途)。

This way we may say that X is a mixture of two continuous probability distributions: Normal and Gamma. Then we integrate out σ and arrive at the probability density function formula for the t-distribution.

这样,我们可以说X是两个连续概率分布的混合:正态和伽玛。 然后,我们对σ进行积分,得出t分布的概率密度函数公式。

You can see more formal proofs here and here.

您可以在这里和这里看到更多正式证明。

结论 (Conclusion)

Gaussian distributions and Student’s distributions are some of the most important continuous probability distributions in statistics and machine learning.

高斯分布和学生分布是统计和机器学习中最重要的连续概率分布。

The t-distribution may be used as a placeholder for Gaussian when population variance is not known, or when the sample size is small. Both are closely related to each other in a strict and formal way.

当总体方差未知或样本量较小时,可以将t分布用作高斯的占位符。 两者以严格和正式的方式彼此密切联系。

Thanks for reading my article! I hope it helped you to learn something new or refresh existing knowledge.

感谢您阅读我的文章! 我希望它能帮助您学习新知识或刷新现有知识。

翻译自: https://www.freecodecamp.org/news/the-t-distribution-a-key-statistical-concept-discovered-by-a-beer-brewery-dbfdc693184/

数理统计的统计量分布t分布

数理统计的统计量分布t分布_t分布:啤酒厂发现的关键统计概念相关推荐

  1. 概论第6章_正态总体的抽样分布_卡方分布_F分布_t分布

    一 卡方分布 定义 设 X 1 , X 2 , . . . , X n X_1, X_2,..., X_n X1​,X2​,...,Xn​ 独立同分布于标准正态分布N(0, 1), 则 χ 2 = X ...

  2. t分布 u分布 卡方分布_重要抽样分布:卡方分布(χ2分布)、t分布和F分布

    冒泡~:最近在回顾一些以前学过的概率论和数理统计的知识 发现这三个抽样分布经常出现,在参数估计和假设检验也会运用到,所以做一下整理. [首先,这三个抽样分布都是来自正态总体的常用的分布 可以根据情况应 ...

  3. 广义pareto分布_狭义Pareto分布.pdf

    狭义Pareto分布 摘 要 从Parcto分布的诞生到现在已有150多年的历史了.随着时间的推移.社会的发 展,Parcto分布也在不断地完善.改进.推广,从而形成了多种形式的Parcto分布.广 ...

  4. Gamma分布和逆Gamma分布

    Gamma分布和逆Gamma分布 Gamma分布 Gamma function 参数 图形 Probability density function Cumulative distribution f ...

  5. CVPR 2021 分布对齐,长尾分布问题解决新思路

    本文转载自旷视研究院. 收录会议:CVPR 2021 论文单位:旷视研究院 论文链接:https://arxiv.org/abs/2103.16370 论文代码:https://github.com/ ...

  6. Greenplum 分布键 distribute hash分布和随机分布

    Greenplum是分布式系统,创建表时需要指定分布键,目的是为了数据能够平均分布到各个段,所以选择分布键十分重要,选择错了会导致数据不一致. 分布方式: Hash分布:按分布键对数据列进行hash取 ...

  7. 风速Weibull分布和光伏Beta分布的参数拟合方法

    在风光场景生成.随机优化调度等研究中,常常假设风速服从Weibull分布,太阳辐照度服从Beta分布.那我们如何得到两个分布的参数呢?文本首先介绍了风速Weibull分布和辐照度Beta分布的基本概率 ...

  8. 重尾分布,长尾分布,肥尾分布 和 随机游走 (Heavy-tailed, Long-tailed, Fat-tailed distribution and Random walk)

    一看题目就知道本文内容较多,但因为放在一起讨论才能互相比较理解异同.本文主要讨论重尾分布,长尾分布,肥尾分布三者的联系,同时顺带讨论了一下 Random walk 中的 Lévy flight 和 B ...

  9. python数据分析项目——【国家统计局】学历分布/CPI/金融行业学历分布

    数据来源: 从国家统计局上获得的数据,有部分数据进行了调整.其中学历分布.金融行业学历分布基于第6次人口普查结果(2010)年,CPI趋势为截止2021.3.1之前最近18个月. 文中使用到的数据: ...

最新文章

  1. 智能车竞赛技术报告 | 电磁越野组 - 哈尔滨工业大学 - 紫丁香三队
  2. R语言shiny包运行runApp()报错的解决
  3. cmd命令操作Mysql数据库,命令行操作Mysql
  4. 现代人,特别需要蒸之一
  5. 系统分析与控制_质量体系文件:测量系统分析控制程序
  6. mysql通过集合查询_MySQL使用集合函数进行查询操作实例详解
  7. js 匿名函数_编写高质量箭头函数的5个最佳做法
  8. 电动汽车告急?特斯拉、蔚来之后 一辆比亚迪新能源车突然自燃...
  9. 望城2019年华为软件云项目_今天,华为、京东两大项目在长沙开工
  10. leetcode953. Verifying an Alien Dictionary
  11. Leetcode18.四数之和
  12. 使用腾讯位置服务 JavaScript API GL 打造自己的 3D 地图
  13. 《pr2019》怎么加字幕
  14. 你会用Ping检测网络吗?
  15. Build-dep linux 知乎,apt-get build-dep十分有用的命令
  16. html网页组织结构,使用HTML和CSS编码创建组织结构图
  17. Hive 与 Hbase表映射(内部表与外部表),Hbase常用命令
  18. Luogu 5108 仰望半月的夜空(后缀数组)
  19. PyCharm SyntaxError: Non-UTF-8 code starting with \xbb 处理
  20. app小程序手机端Python爬虫实战02-uiautomator2自动化抓取开发环境搭建

热门文章

  1. jdbc删除数据 20210410002714845
  2. django-连接数据库mysql
  3. javascript-定时器演练-时钟-Date类
  4. OCI runtime exec failed: exec failed:解决方法
  5. virtualbox ,centos 的多网卡如何设置
  6. 【转】c#处理3种json数据的实例
  7. Subversion服务器搭建 (安装步骤)
  8. iTextSharp 使用详解用C#制作PDF文件全攻略
  9. OpenCV 入门级一
  10. 计算机达人成长之路 目录