Forgot password?
 Create new account
View 122|Reply 1

概率论的题目

[Copy link]

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

hbghlyj Posted at 2023-4-3 12:09:16 |Read mode
来自WolframChina
设随机向量的联合概率密度函数为$f(x,y)=k(6-x-y)$,其中 $0<x<2, 2<y<4$,求:
1. $k$ 的值;
2. $\Pr(X<1, Y<3)$
3. $x$ 与 $y$ 各自的边缘概率密度?
4. $x$ 与 $y$ 是否互相独立?
  1. Integrate[k (6-x-y), {x,0,2}, {y,2,4}]==1 // Solve[#, k] &
  2. k = k /. %
  3. dist = ProbabilityDistribution[1/k (6 - x - y), {x, 0, 2}, {y, 2, 4}]
  4. CDF[dist, {x, y}] /. {x -> 1, y -> 3}
  5. {X, Y}=MarginalDistribution[dist,#1]~PDF~#2&
  6. @@@ {{1, x}, {2, y}}
  7. X Y= Piecewise[{{1/k (6-x-y),0<x<2&&2<y<4}}]
Copy the Code

对于上面的代码,解释如下:

首先,对 f 积分,得到一个有关 k 的表达式;
由概率密度函数的特性,这个表达式应为1;
求解“表达式==1”,带入,这就是第一题的答案。

dist 是概率密度函数f所构建的概率分布;
计算其累积分布,然后带入 x=1,y=3。
这就是第二题的答案。

X,Y 分别是 dist 某个边缘分布的概率密度函数,
分别对应于第1个参数是x,第2个是y。
得到的就是 X,Y 各自的边缘概率密度函数,
此即第三题答案。

X Y 独立,即边缘密度之积等于全局。
判断结果即第四题答案。

3147

Threads

8493

Posts

610K

Credits

Credits
66163
QQ

Show all posts

 Author| hbghlyj Posted at 2023-4-3 12:13:04
两个指数分布的最小值呈指数分布:
  1. TransformedDistribution[Min[u,v],{u\[Distributed]ExponentialDistribution[Subscript[\[Lambda], 1]],v\[Distributed]ExponentialDistribution[Subscript[\[Lambda], 2]]}]
Copy the Code

输出ExponentialDistribution[Subscript[\[Lambda], 1] + Subscript[\[Lambda], 2]]

两个指数分布的最大值的CDF:
  1. Probability[Max[x,y]<z,{x\[Distributed]ExponentialDistribution[Subscript[\[Lambda], 1]],y\[Distributed]ExponentialDistribution[Subscript[\[Lambda], 2]]}]//FullSimplify
Copy the Code

输出$\left\{
\begin{aligned}
&e^{\left(\lambda _1+\lambda _2\right) (-z)} \left(e^{\lambda _1 z}-1\right) \left(e^{\lambda _2 z}-1\right) & z\geq 0 \\
&0 & \text{True} \\
\end{aligned}\right.$

手机版Mobile version|Leisure Math Forum

2025-4-20 22:27 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list