离散随机变量和连续随机变量

表中的内容 (Table of Content)

  1. Random Variables随机变量
  2. Probability Distribution Functions概率分布函数
  3. Well Known PMFs You Should Know您应该知道的众所周知的PMF
  4. Well Known PDFs You Should Know您应该知道的知名PDF
  5. Mean and Variance均值和方差
  6. Mean and Variance of Common Distributions共同分布的均值和方差
  7. Covariance and Correlation协方差和相关

前言 (Preface)

Surprisingly, random variables are not really taught in online data science courses which is ludicrous because they’re the foundation of statistics which is the foundation of data science!

令人惊讶的是,在在线数据科学课程中并没有真正教授随机变量,这很可笑,因为它们是统计的基础,而统计是数据科学的基础!

Therefore, this aims to provide a comprehensive crash course on the basics of random variables. Let’s dive into it!

因此,这旨在提供一个基于随机变量的综合崩溃课程。 让我们开始吧!

随机变量 (Random Variables)

A random variable (RV), usually denoted X, is a variable whose possible values are numerical outcomes of a random phenomenon. In simpler terms, a random variable has a set of values and it can take on any one of those values at random. A random variable is a function from the sample space to real life.

通常表示为X的随机变量(RV)是其可能值为随机现象的数值结果的变量。 简单来说,随机变量具有一组值,并且可以随机采用这些值中的任何一个。 随机变量是从样本空间到现实生活的函数。

There are two types of random variables, discrete and continuous.

随机变量有两种类型,离散变量和连续变量。

离散随机变量 (Discrete Random Variables)

A discrete random variable is one in which the number of possible values is finite or countably infinite.

离散随机变量是其中可能值的数量是有限的或可计数的无限的变量

Examples of discrete RVs include the number of people that enter a grocery store on a given day, the number of children in a family, or the number of defective batteries in a box of 24.

离散RV的示例包括在特定日期进入杂货店的人数,一个家庭中的孩子人数或24盒装的有故障电池的数量。

连续随机变量 (Continuous Random Variables)

A continuous random variable is one in which the number of possible values is uncountably infinite.

连续随机变量是其中可能值的数量无穷无穷的变量

Examples of continuous RVs include the height and weight of a person.

连续RV的示例包括人的身高和体重。

概率分布函数 (Probability Distribution Functions)

For every random variable is an associated probability distribution function. A probability distribution function essentially gives the probabilities associated with obtaining each possible value or an interval of values.

对于每个随机变量,都有一个关联的概率分布函数。 概率分布函数本质上给出了与获得每个可能值或值间隔有关的概率。

There are three types of probability distribution functions: probability mass function (pmf), probability density function (pdf), and the cumulative distribution function (cdf).

概率分布函数有三种类型:概率质量函数(pmf),概率密度函数(pdf)和累积分布函数(cdf)。

概率质量函数(pmf)→对于离散RV (Probability Mass Function (pmf) → for discrete RVs)

The probability mass function (pmf) is a probability distribution of a discrete random variable, which is a list of probabilities associated with each possible value.

概率质量函数(pmf)是离散随机变量的概率分布, 离散随机变量是与每个可能值相关的概率列表。

In more technical terms, if X is a discrete RV then its pmf is:

用更专业的术语来说,如果X是离散的RV,则其pmf为:

Note: 0 ≤ f(x) ≤ 1 and ∑f(x) = 1

注意:0≤f (x) ≤1和∑ f(x) = 1

概率密度函数(pdf)→用于连续RV (Probability Density Function (pdf) → for continuous RVs)

The probability density function (pdf) is a function whose integral is calculated to find the probabilities associated with a continuous random variable.

概率密度函数(pdf)是一个函数,其积分经过计算以查找与连续随机变量关联的概率。

In more technical terms, if X is a continuous RV then f(x) is the pdf of X if it satisfies the following:

用更专业的术语来说,如果X是连续的RV,则满足以下条件的f(x)X的pdf:

  • f(x)dx = 1 (the area under the curve is 1)

    ∫f (x)dx = 1(曲线下的面积为1)

  • f(x) > 0 for all x (the curve has no negative values)

    所有x的f(x) > 0(曲线没有负值)

The probability of an individual point is equal to zero. Therefore, you have to find the probability of an interval by finding the definite integral:

单个点的概率等于零。 因此,您必须通过找到定积分来找到区间的概率:

累积分布函数(cdf) (Cumulative Distribution Function (cdf))

Cumulative Distribution Functions (cdfs) apply to both discrete and continuous functions. The cdf is the function that gives the probability that a random variable, X, is less than or equal to x, for every value x.

累积分布函数 (cdfs)适用于离散函数和连续函数。 cdf是给出每个值x随机变量X小于或等于x的概率的函数。

In more technical terms, for any RV X, the cdf is defined by:

用更专业的术语来说,对于任何RV X ,cdf定义为:

For discrete RVs, you would simply sum up the probabilities of all values less than or equal to x.

对于离散的RV,您只需将所有小于或等于x的值的概率求和。

For continuous RVs you would simply find the definite integral of the RV from point 0 to x.

对于连续的RV,您只需找到RV从点0到x的定积分。

Here are some theorems that you should know for cdfs:

这是关于CDFS的一些定理:

  • F(-∞) = 0F(-∞)= 0
  • F(x) is monotonically non-decreasing (can only increase or stay the same as x increases).F(x)是单调非递减的(只能增加或保持与x的增加相同)。
  • P(X>x) = 1 - F(x)P(X> x)= 1-F(x)
  • P(a<X<b) = F(b) - F(a)P(a <X <b)= F(b)-F(a)
  • f(x) = F’(x) → the derivative of the cdf gives you the pdff(x)= F'(x)→cdf的导数为您提供pdf

If this doesn’t make sense to you, don’t worry. Here’s an example…

如果这对您没有意义,请不要担心。 这是一个例子……

PMF和CDF的示例 (Example of PMF and CDF)

Suppose we flip two coins. Then let x = the number of heads that come up.

假设我们掷两个硬币。 然后让x =出现的头数。

There are only three possibilities: the number of heads = 0, 1, or 2. We can summarize the probabilities associated with each possible outcome as follows:

只有三种可能性:正数= 0、1或2。我们可以将与每种可能结果相关的概率总结如下:

The PMF is simply represented by the Probability column, which shows the probability for each possible outcome.

PMF仅由“概率”列表示,该列显示了每种可能结果的概率。

Similarly, the CDF is simply represented by the Cumulative Probability column which shows the probability of obtaining the possible value or less.

类似地,CDF仅由累积概率列表示,该列显示获得可能值或更低值的可能性。

您应该知道的众所周知的PMF (Well Known PMFs You Should Know)

离散均匀分布 (Discrete Uniform Distribution)

X has the discrete uniform distribution if its pmf is:

如果X的pmf为: X具有离散的均匀分布:

Example: Tossing a die, x = 1,2,3,4,5,6. Therefore n = 6 and the pmf for all x is equal to 1/6.

示例:掷一个骰子, x = 1,2,3,4,5,6。 因此, n = 6,所有x的pmf等于1/6。

二项分布 (Binomial Distribution)

Let X denote the number of successes from n independent trials with the probability of success equal to p. Then X has the Binomial Distribution with parameters n and p. (Notation: X ∼ Bin(n, p))

令X表示n次独立试验的成功次数,成功概率等于p 。 那么X具有参数np的二项分布。 (符号:X〜Bin(n,p))

If X has the Binomial distribution then the probability of k successes in n trials is given by the pmf:

如果X具有二项式分布,则pmf给出n次试验中k次成功的概率:

泊松分布 (Poisson Distribution)

X has the poison distribution with parameter λ if its pmf is as follows:

如果X的pmf如下,则X的毒物分布为参数λ:

您应该知道的知名PDF (Well Known PDFs You Should Know)

均匀分布 (Uniform Distribution)

X has the uniform distribution (Notation: X ~ Unif(a,b) if X is equally likely to be anywhere between a and b. Its pdf is:

X具有均匀的分布(如果X同样有可能位于a和b之间的任意位置,则表示法为X〜Unif(a,b)。其pdf为:

指数分布 (Exponential Distribution)

X has the exponential distribution with parameter λ if it has the pdf:

如果具有pdf,则X具有参数为λ的指数分布:

期望值和方差 (Expected Value and Variance)

The expected value or mean is the average value and is a weighted average of all possible x’s with weights given by f(x). The expected value or mean if a RV is:

期望值或平均值是平均值,并且是所有可能x的加权平均值,其权重由f(x)给出。 RV的期望值或均值:

for discrete RVs
用于离散的RV
for continuous RVs
连续房车

Variance is a measure of spread or dispersion. The variance of X is:

方差是散布或散布的量度。 X的方差为:

共同分布的均值和方差 (Mean and Variance of Common Distributions)

X〜伯努利(p) (X~Bernoulli(p))

E[X] = p

E [X] = p

Var(X) = pq

Var(X)= pq

X〜泊松(λ) (X~Poisson(λ))

E[X] = λ

E [X] =λ

Var(X) = λ

Var(X)=λ

X〜均匀(a,b) (X~Uniform(a,b))

E[X] = (a+b)/2

E [X] =(a + b)/ 2

Var(X) = (a-b)²/12

Var(X)=(ab)²/ 12

X〜普通(µ,σ²) (X~Normal(µ, σ²))

E[X] = µ

E [X] = µ

Var(X) = σ²

Var(X)=σ²

X〜指数(λ) (X~Exponential(λ))

E[X] = 1/ λ

E [X] = 1 /λ

Var(X) = 1/λ²

Var(X)= 1 /λ²

协方差和相关 (Covariance and Correlation)

These are both measures that define the degree of association between X and Y.

这些都是定义X和Y之间的关联度的度量。

协方差 (Covariance)

The covariance between X and Y is:

X和Y之间的协方差为:

Similarly, an easier way to calculate it is:

同样,更简单的计算方法是:

Note that covariance only takes into account LINEAR dependence. If X and Y are related in a nonlinear way, they may have covariance = 0.

注意协方差仅考虑了线性相关性。 如果X和Y以非线性方式关联,则它们的协方差= 0。

If X and Y are independent then the covariance between X and Y is zero. Note that covariance of 0 does not imply that they are independent.

如果X和Y是独立的,则X和Y之间的协方差为零。 请注意,协方差为0并不意味着它们是独立的。

相关性 (Correlation)

Measures the strength of a relationship between two variables and ranges from -1 to 1; the normalized version of covariance.

测量两个变量之间关系的强度,范围为-1至1; 协方差的归一化版本。

谢谢阅读! (Thanks for Reading!)

After reading this, hopefully, you’ll have a fundamental understanding of random variables, probability distribution functions, and more. If you feel that you need to study these concepts more, I would check out my free data science resource that covers probability fundamentals and probability distributions.

阅读本文后,希望您对随机变量,概率分布函数等有基本的了解。 如果您认为您需要进一步研究这些概念,那么我将检查我的免费数据科学资源 ,其中涵盖了概率基础和概率分布。

特伦斯·辛 (Terence Shin)

  • Check out my free data science resource with new material every week!

    每周 查看 我的免费数据科学资源 以及新材料!

  • If you enjoyed this, follow me on Medium for more

    如果您喜欢这个,请 在Medium上关注我以 了解更多

  • Let’s connect on LinkedIn

    让我们在 LinkedIn上建立联系

翻译自: https://towardsdatascience.com/an-in-depth-crash-course-on-random-variables-a3905d03e322

离散随机变量和连续随机变量


http://www.taodudu.cc/news/show-2867067.html

相关文章:

  • 记一次:9i数据库,/home目录满,tossing监控出问题,导致脑裂
  • Tossing Bad Mupd Msg Pid In The Alert.Log
  • BUPT OJ146 Coin Tossing
  • 学以致用——Java源码——抛硬币(Coin Tossing)
  • Probability Theory | Coin Tossing Problems (TBC) | 概率论中的抛硬币问题 (未完待续)
  • java抛硬币,抛硬币模拟(Coin Tossing Simulation)
  • 区块链上的随机性(一)概述与构造
  • 缓动动画_核心动画概念:缓入缓出
  • 雷达探测的要素
  • 雷达的探测能力
  • js简单实现百度地图雷达探测效果
  • 雷达威力计算 matlab,威力雷达指标
  • 基于Matlab雷达探测系统(GUI界面模拟)
  • 【雷达与对抗】【2017.06】空中目标的无源雷达探测
  • android 绘制坐标系(雷达探测界面)
  • 雷达探测项目仿真代码(Matlab代码实现)
  • 【雷达通信】雷达探测项目仿真附Matlab代码
  • 【雷达通信】雷达探测项目仿真(Matlab代码实现)
  • vue 雷达扫描_Groundvue系列地质雷达探测系统及其应用
  • 如何使用unity制作雷达探测目标效果动画
  • 【雷达通信】相控阵天气雷达探测晴空回波能力分析Matlab源码
  • [cesium] 卫星雷达传感器,雷达探测效果
  • 【雷达通信】基于matlab雷达探测威力仿真【含Matlab源码 1974期】
  • 基于Matlab使用地面雷达探测和跟踪LEO卫星星座仿真(附源码)
  • 雷达探测的系统模型
  • CAE软件安装包(百度网盘)
  • Linux设置密码dictionary,Linux中修改密码出现it is based on a dictionary word解决方法
  • 3、xx配音狂app登陆算法分析【Android逆向分析学习】
  • seq2seq到attention到transformer理解
  • 虚拟机Ubuntu安装vmtools

离散随机变量和连续随机变量_随机变量深度崩溃课程相关推荐

  1. PT_随机变量函数的分布_随机变量线性函数的正态分布

    文章目录 随机变量函数分布 离散型 例 连续型随机变量的情形 求Y=h(X)的概率密度fY(y)求Y=h(X)的概率密度f_Y(y)求Y=h(X)的概率密度fY​(y) 单调函数的情况 例 例 小结 ...

  2. 【概率论基础进阶】多维随机变量及其分布-二维随机变量及其分布

    文章目录 一.二维随机变量 分布函数F(x,y)F(x,y)F(x,y)的性质 二.二维离散型随机变量 分布律pijp_{ij}pij​的性质 三.二维连续型随机变量 概率密度f(x,y)f(x,y) ...

  3. 概率论基础 —— 3.离散型、连续型概率模型,及其概率密度与概率分布函数

    在前面的文章里,已经带大伙了解了概率论的概率事件类型,以及针对某些事件的发生概率,以及针对全部场景的某事件的发生概率等基本知识.不过对于统计学专业来说,或者实际应用来说,接触最多的还是离散型和连续型概 ...

  4. 概率分布--------离散概率分布和连续概率分布

    解释关键词: 概率分布:离散概率分布和连续概率分布 随机变量:量化的随机世界的函数 分布:数据在统计图中的形状 概率分布:用统计图来表示随机变量所有可能的结果和对应结果发生的概率 离散的概率计算是体积 ...

  5. 离散选择模型(DCM)和深度神经网络(DNN)结合

    前言:这篇文章是深度学习和传统离散选择模型的融合. 机器学习在交通运输领域中越来越多地被应用,但 DCM(discrete choice model, 离散选择模型)和 DNN(deep neural ...

  6. c语言微信昵称大全女生优雅经典的,微信昵称大全女生优雅_有深度有内涵的昵称...

    微信昵称大全女生优雅_有深度有内涵的昵称 相关内容: 情侣网名就是两人在网络中相互定位的暧昧称呼,情侣网名受到很多年轻情侣喜爱.以下是第一范文网小编为你整理的20xx最新版情侣专用网名,希望能帮到你. ...

  7. 深度学习将灰度图着色_通过深度学习为视频着色

    深度学习将灰度图着色 零本地设置/ DeOldify / Colab笔记本 (Zero Local Setup / DeOldify / Colab Notebook) "Haal Kais ...

  8. 深度学习模型建立过程_所有深度学习都是统计模型的建立

    深度学习模型建立过程 Deep learning is often used to make predictions for data driven analysis. But what are th ...

  9. 深度学习:在图像上找到手势_使用深度学习的人类情绪和手势检测器:第1部分

    深度学习:在图像上找到手势 情感手势检测 (Emotion Gesture Detection) Has anyone ever wondered looking at someone and tri ...

最新文章

  1. C++加快编译速度的方法
  2. 聊天机器人之文本分词
  3. Java进程占用内存过高,排查解决方法
  4. 进阶学习(1) Gradle 项目管理工具的使用
  5. DPDK vhost-user详解(五)
  6. 安全问题-携程可能摊上大事了——崩溃原因分析
  7. Python模块进阶、标准库、扩展库
  8. 注释嵌套注释_注释,无处不在的注释
  9. FIle类常用工具方法整理(持续更新)
  10. MVC应用程序播放FLV视频,部分视图可多地方重复引用
  11. 简单干净的C#方法设计案例:SFCUI.AjaxValue()之三
  12. 6-7 使用函数输出水仙花数_Go语言并发如何使用才更加高效
  13. rancher 权限 添加用户_Kubernetes身份认证和授权操作全攻略:访问控制之Service Account...
  14. android imagebutton 设置边框,Android ImageButton没有边框但仍然有点击指示
  15. C语言数据结构、十字链表的分析及实现
  16. 安卓studio加载HTML文件,Android Studio 加载本地Assets中的html文件
  17. JS 基础知识(自学篇)
  18. kafka2.2源码分析之KafkaChannel
  19. excel表格末尾添加一行_Excel这些办公必备小技巧,Excel表格轻松搞定
  20. 春季活动策划案例合集(共25份)

热门文章

  1. 五年级下册计算机知识点,五年级下册信息技术知识点(教材解析泰山版)
  2. 安全无污染的激活win7(官方)
  3. 【宅男福利】百度云下载不限速软件,电脑和看视频无广告软件
  4. dout java_java之 ------ 文件的输入、输出(一)
  5. **惠普GK100机械键盘设置**
  6. Caché库诡异慢问题跟踪
  7. 规约——前置条件和后置条件
  8. 面向建筑应用的三维点云数据获取和处理的计算方法
  9. 8道2021年美团C++/Java最新面试真题,你能做对几道?(含答案)
  10. 算法:CLH锁的原理及实现