【概率论】3-7:多变量分布(Multivariate Distributions Part I)

原文地址1:https://www.face2ai.com/Math-Probability-3-7-Multivariate-Distributions-P1转载请标明出处

Abstract: 本文将3.4,3.5,3.6的内容扩展到多个随机变量中去,并得到相对应的结论,由于内容较多,故分为两部分完成
Keywords: Joint Distributions,Mixed Distributions,Marginal Distributions,Independent Random Variable

多变量分布

今天讲的废话可能真是废话,因为这个道理真是自古以来经过无数次的验证,关于合作,合作就是多个人在一起做一件事,有钱出钱有力出力,所有的想法,工作和信息都要共享。这是一个团队存在的必要条件,但是有两种东西千万别想着与团队内部人员分享,首先是别人的收益,你不能指望别人把收益分给你,这个不现实也不讲道理的,说好是谁的就是谁的,不能拿别人的任何收益,这是保证团队不崩溃的底线;第二不要让别人跟你分担风险,你的风险就是你的风险,你出资赔钱你就要忍着,不可能让别人补偿你,这是不符合规矩的,别人也没这个义务,甚至别人主动补偿都不能要;最后一点就在于沟通,有些话说了必须负责任,任何事给出预期,同时必须提示风险,别总拍着胸脯保证什么什么,尤其是没有发生的事,这样的结果就是,一旦负面情况发生,你的责任就会非常大了,而且大家会对你这个产生怀疑!
接着就是正经的废话了,关于概率论,我这两天尝试着看数理统计方面的书,发现,难度有点提升的过快,尤其是概率论掌握的不是很熟练的时候,我的概率论现在什么水平?看了一遍书,写了下书后的习题,目前也就这样,但是写完博客会是一个很大的提升,整个思路和认知都会有所提升,所以我决定先把概率论的博客写完再继续数理统计,到时候应该能通常一点了
本文是对前三节内容的扩展,我们学习概率论从试验,到事件再到随机变量,从概率,到概率分布,都是从简单的可见的,到复杂的抽象的,这篇就把前面的限制进一步减小,从单个随机变量到两个随机变量,再到今天的多个随机变量的过程

联合分布 Joint Distributions

当一个分布中随机变量的个数超过两个的时候,我们称之为多变量概率分布;在实际应用中多变量随机分布应用更广。

联合离散分布 Joint Discrete Distribution

Definition Joint Distribution Function/c.d.f.:The joint c.d.f. of n n n random variables X 1 , … , X n X_1,\dots ,X_n X1,,Xn is the function F F F whose value at every point ( x 1 , … , x n ) (x_1,\dots ,x_n) (x1,,xn) in n-dimensional space R n \mathbb{R}^n Rn is specified by the relation
F ( x 1 , … , x n ) = P r ( X 1 ≤ x 1 , X 2 ≤ x 2 , … X n ≤ x n ) F(x_1,\dots , x_n)=Pr(X_1\leq x_1,X_2\leq x_2,\dots X_n\leq x_n) F(x1,,xn)=Pr(X1x1,X2x2,Xnxn)

多变量c.d.f.和前面单变量双变量c.d.f有相似的性质
举个🌰 :
假设某设备有三个部件,其中部件 i i i 有可能在 X i X_i Xi 时刻失效, i i i 可能是1,2,3,那么 X 1 , X 2 , X 3 X_1,X_2,X_3 X1,X2,X3 的联合 c.d.f. 是
F ( x 1 , x 2 , x 3 ) = { ( 1 − e x 1 ) ( 1 − e − 2 x 2 ) ( 1 − e − 3 x 3 )  for  x 1 , x 2 , x 3 ≥ 0 0 otherwise F(x_1,x_2,x_3)=\begin{cases}(1-e^{x_1})(1-e^{-2x_2})(1-e^{-3x_3})&\text{ for }x_1,x_2,x_3\geq 0\\ 0&\text{otherwise} \end{cases} F(x1,x2,x3)={(1ex1)(1e2x2)(1e3x3)0 for x1,x2,x30otherwise

使用向量记录多个随机变量,像这样: X ⃗ = ( x 1 , … , x n ) \vec{X}=(x_1,\dots ,x_n) X =(x1,,xn) 称为随机向量,对于一个多变量的c.d.f. F ( x 1 , x 2 , x 3 ) F(x_1,x_2,x_3) F(x1,x2,x3) 我们可以简写成: F ( X ⃗ ) F(\vec{X}) F(X )
这里需要注意的是当我们用向量来管理多个变量的时候,注意其维度,这时的c.d.f被定义在一个 R n \mathbb{R}^n Rn 的空间上。

Definition Joint Discrete Distribution/p.f. It is said that n n n random variables X 1 , … , X n X_1,\dots ,X_n X1,,Xn have a discrete joint distribution if the random vector ( X 1 , … , X n ) (X_1,\dots ,X_n) (X1,,Xn) can have only a finite number or an infinite sequence of different possible values ( x 1 , … , x n ) (x_1,\dots,x_n) (x1,,xn) in R n \mathbb{R}^n Rn .The joint p.f. of X 1 , … , X n X_1,\dots,X_n X1,,Xn is then defined as the function f f f such that for every point ( x 1 , … , x n ) ∈ R n (x_1,\dots,x_n)\in \mathbb{R}^n (x1,,xn)Rn
f ( x 1 , … , x n ) = P r ( X 1 = x 1 , … , X n = x n ) f(x_1,\dots,x_n)=Pr(X_1=x_1,\dots,X_n=x_n) f(x1,,xn)=Pr(X1=x1,,Xn=xn)

这个定义说明,随机向量 X ⃗ \vec{X} X 有一个离散分布,其每个点 x ⃗ ∈ R n \vec{x} \in \mathbb{R}^n x Rn 的概率是
f ( x ⃗ ) = P r ( X ⃗ = x ⃗ ) f(\vec{x})=Pr(\vec{X}=\vec{x}) f(x )=Pr(X =x )

下面这个定理和3.4中双变量分布相似

Theorem If X X X has a joint discrete distribution with joint p.f. f f f then for every subset C ⊂ R n C\subset \mathbb{R}^n CRn ,
P r ( X ⃗ ∈ C ) = ∑ x ∈ C f ( x ) Pr(\vec{X}\in C)=\sum_{x\in C}f(x) Pr(X C)=xCf(x)
如果每个随机变量 X 1 , … , X n X_1,\dots,X_n X1,,Xn 每个随机变量都有离散的分布,那么 X ⃗ = ( X 1 , … , X n ) \vec{X}=(X_1,\dots,X_n) X =(X1,,Xn) 就有一个离散的联合分布

联合连续分布 Joint Continuous Distribution

Definition Continuous Distribution/p.d.f. It is said that n n n random variables X 1 , … , X n X_1,\dots,X_n X1,,Xn have a continuous joint distribution if there is a nonnegative function f f f defined on R n \mathbb{R}^n Rn such that for every subset C ⊂ R n C\subset \mathbb{R}^n CRn,
P r [ ( X 1 , … , X n ) ∈ C ] = ∫  ⁣ ⋯ ∫ ⏟ C f ( x 1 , … , x n ) d x 1 , … , d x n Pr[(X_1,\dots,X_n)\in C ]=\underbrace{\int\dots\int}_{C}f(x_1,\dots,x_n)dx_1,\dots,dx_n Pr[(X1,,Xn)C]=C f(x1,,xn)dx1,,dxn

上面的定义也可以用向量来重新表示,向量表示更加简单,但是使用时要注意区分:

P r [ X ⃗ ∈ C ] = ∫  ⁣ ⋯ ∫ ⏟ C f ( x ⃗ ) d x ⃗ Pr[\vec{X}\in C ]=\underbrace{\int\dots\int}_{C}f(\vec{x})d\vec{x} Pr[X C]=C f(x )dx

Theorem If the joint distribution of X 1 , … , X n X_1,\dots,X_n X1,,Xn is continuous,then the joint p.d.f. f f f can be derived from the joint c.d.f. F F F by using the relation
f ( x 1 , … , x n ) = ∂ n F ( x 1 , … , x n ) ∂ x 1 … ∂ x n f(x_1,\dots,x_n)=\frac{\partial^nF(x_1,\dots,x_n)}{\partial x_1\dots \partial x_n} f(x1,,xn)=x1xnnF(x1,,xn)
at all points ( x 1 , … , x n ) (x_1,\dots,x_n) (x1,,xn) at which the derivative in this relation exists.

上面的定理和3.4中的定理非常相似,只是进行了响应的扩展,但是理论基础一致。
举个🌰 :
找出上面例子的joint p.d.f
F ( x 1 , x 2 , x 3 ) = { ( 1 − e x 1 ) ( 1 − e − 2 x 2 ) ( 1 − e − 3 x 3 )  for  x 1 , x 2 , x 3 ≥ 0 0 otherwise F(x_1,x_2,x_3)=\begin{cases}(1-e^{x_1})(1-e^{-2x_2})(1-e^{-3x_3})&\text{ for }x_1,x_2,x_3\geq 0\\ 0&\text{otherwise} \end{cases} F(x1,x2,x3)={(1ex1)(1e2x2)(1e3x3)0 for x1,x2,x30otherwise
求偏导得到
f ( x 1 , x 2 , x 3 ) = { 6 e − x 1 − 2 x 2 − 3 x 3  for  x 1 , x 2 , x 3 > 0 0 otherwise f(x_1,x_2,x_3)=\begin{cases}6e^{-x_1-2x_2-3x_3}&\text{ for }x_1,x_2,x_3> 0\\ 0&\text{otherwise} \end{cases} f(x1,x2,x3)={6ex12x23x30 for x1,x2,x3>0otherwise
注意,这里 x 1 , x 2 , x 3 x_1,x_2,x_3 x1,x2,x3 的范围是大于0的,而前面的例子是C.D.F. 是 x 1 , x 2 , x 3 x_1,x_2,x_3 x1,x2,x3 的范围是大于等于0的

插播新闻

突发事件,就在我写本文的时候,Stephen Hawking 教授去世,享年76岁;非亲非故,也不是相关专业的学生,Howking先生的著作也没拜读过,但是感觉莫名的失落,希望晚辈们能继承先贤们的遗志,为了人类的进步事业做出贡献。

混合分布 Mixed Distributions

混合分布就是一个联合分布里有连续的随机变量也有离散的随机变量,而处理起来也和双变量联合分布一样,连续部分就用积分和微分处理,离散就用求和做差处理。

Definition Joint p.f./p.d.f. Let X 1 , … , X n X_1,\dots ,X_n X1,,Xn be random variables,some of which have a continuous joint distribution and some of which have discrete distributions ,their joint distribution would then be represented by a function f f f that we call the joint p.f./p.d.f .The function has the property that the probability that X X X lies in a subset C ⊂ R n C \subset \mathbb{R}^n CRn is calculated by summing f ( x ) f(x) f(x) over the values of the coordinates of x x x that correspond to the discrete random variables and integrating over those coordinates that correspond to the continuous random variables for all piints x ⃗ ∈ C \vec{x}\in C x C

对于连续和离散混合的分布,还是那句话对不同的敌人用不同的战术,但总体思路都是一样的

边缘分布 Marginal Distributions

计算边缘概率密度函数 Deriving a Marginal p.d.f.

对于一个多元连续的联合分布,求其边缘概率密度函数的方法是:
f 1 ( x 1 ) = ∫ − ∞ ∞  ⁣ ⋯ ∫ − ∞ ∞ ⏟ n − 1 f ( x 1 , … , x n ) d x 2 … d x n f_1(x_1)=\underbrace{\int^\infty_{-\infty}\dots \int^\infty_{-\infty}}_{n-1}f(x_1,\dots,x_n)dx_2\dots dx_n f1(x1)=n1 f(x1,,xn)dx2dxn
求谁的边缘分布就把其他的所有变量求积分就可以了,当然也可以求某两个,三个,多个变量的边缘分布。
如果里面对应的变量是离散型的,就把对应的积分换成求和就可以了

计算边缘概率累积函数 Deriving a Marginal c.d.f.

对于一个联合分布,其c.d.f. 为 F F F ,其中x_1的边缘c.d.f.为:
F 1 ( x 1 ) = P r ( X 1 ≤ x 1 , X 2 < ∞ , … , X n < ∞ ) = l i m x 2 , … , x n → ∞ F ( x 1 , x 2 , … , x n ) F_1(x_1)=Pr(X_1\leq x_1,X_2<\infty,\dots ,X_n<\infty)\\ =lim_{x_2,\dots,x_n \to \infty}F(x_1,x_2,\dots,x_n) F1(x1)=Pr(X1x1,X2<,,Xn<)=limx2,,xnF(x1,x2,,xn)

由上可见,跟双变量的操作也是如出一辙,只是变量多了一些,计算起来更加复杂,需要小心一点

独立随机变量 Independent Random Variable

多维的随机变量的独立性相对要复杂一些,但是原理还是相似的。

Definition Independent Random Variables,It is said that n random varibales X 1 , … , X n X_1,\dots,X_n X1,,Xn are independent if for every n n n sets A 1 , A 2 , … A n A_1,A_2,\dots A_n A1,A2,An of real numbers
P r ( X 1 ∈ A 1 , X 2 ∈ A 2 , … , X n ∈ A n ) = P r ( X 1 ∈ A 1 ) P r ( X 2 ∈ A 2 ) … P r ( X n ∈ A n ) Pr(X_1\in A_1,X_2\in A_2,\dots,X_n\in A_n)=Pr(X_1\in A_1)Pr(X_2 \in A_2)\dots Pr(X_n\in A_n) Pr(X1A1,X2A2,,XnAn)=Pr(X1A1)Pr(X2A2)Pr(XnAn)

上面定义的一个推广就是如果 ( X 1 , X 2 , … , X n ) (X_1,X_2,\dots,X_n) (X1,X2,,Xn) 相互独立那么其非空子空间内的变量也相互独立。

Theorem Let F F F denote the joint c.d.f. of X 1 , … X n X_1,\dots X_n X1,Xn and let F i F_i Fi denote the marginal univariate c.d.f. of X i X_i Xi for i = 1 , … , n i=1,\dots,n i=1,,n The variables X 1 , … , X n X_1,\dots,X_n X1,,Xn are independent if and only if,for all points ( x 1 , x 2 , … , x n ) ∈ R n (x_1,x_2,\dots,x_n)\in \mathbb{R}^n (x1,x2,,xn)Rn
F ( x 1 , x 2 , … , x n ) = F 1 ( x 1 ) F 2 ( x 2 ) … F n ( x n ) F(x_1,x_2,\dots,x_n)=F_1(x_1)F_2(x_2)\dots F_n(x_n) F(x1,x2,,xn)=F1(x1)F2(x2)Fn(xn)

上述定理说明了独立随机变量的联合c.d.f.的求法,下面看看我们后面要经常看到了一种随机变量,他们之间的关系叫做独立同分布的随机变量,简称,i.i.d.

Defintion Random Samples/i.i.d./Sample Size:Consider a given probability on the real line that can be represented by either a p.f. or a p.d.f. f f f It is said that n n n random variables X 1 , … , X n X_1,\dots,X_n X1,,Xn form a random sample from this distribution if these random varibales are independent and the marginal p.f. or p.d.f. of each of them is f f f Such random variables are also said to be independent and identically distributed ,abbrevuated i.i.d.We refer to the number n n n of random varibales as the sample size

上面定义了独立同分布的随机变量,样本大小,以及涉及到了一个简单的采样过程。
对于i.i.d.的随机变量,其联合p.f或者p.d.f.为
g ( x 1 , … , x n ) = f ( x 1 ) f ( x 2 ) … f ( x n ) g(x_1,\dots,x_n)=f(x_1)f(x_2)\dots f(x_n) g(x1,,xn)=f(x1)f(x2)f(xn)

因为i.i.d讲究的的是独立同分布,同分布就保证了不可能出现混合分布的形式,否则会自相矛盾。

总结

至此我们讲完了上半部分关于多变量的扩展,理论上难度并不是很大,但是实际操作起来可能会出现各种小问题,需要大家谨慎。
致敬Stephen Hawking 先生!
待续。。

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值