当前位置:网站首页>MCS:离散随机变量
MCS:离散随机变量
2022-06-23 03:56:00 【今晚打佬虎】
Discrete Arbitrary
x x x为一个离散变量,它代表着一个数值的集合, x i x_i xi为集合中的第 i i i个数,( i ∼ 1 → N i \sim 1 \to N i∼1→N),集合中一个特定值 x i x_i xi的概率记为: P ( x i ) = P ( x = x i ) P(x_i) = P(x = x_i) P(xi)=P(x=xi),因此 P ( x 1 ) , . . . P ( x N ) P(x_1), ... P(x_N) P(x1),...P(xN)定义了变量 x x x的概率分布。
∑ i P ( x i ) = 1 \sum_i P(x_i) = 1 i∑P(xi)=1
变量 x x x的期望和方差:
E ( x ) = ∑ i x i P ( x i ) E(x) = \sum_i x_i P(x_i) E(x)=i∑xiP(xi)
V ( x ) = E ( x 2 ) − E ( x ) 2 V(x) = E(x^2) - E(x)^2 V(x)=E(x2)−E(x)2
E ( x 2 ) = ∑ i x i 2 P ( x i ) E(x^2) = \sum_i x_i^2 P(x_i) E(x2)=i∑xi2P(xi)
CDF:
F ( x i ) = P ( x < = x i ) F(x_i) = P(x <= x_i) F(xi)=P(x<=xi)
生成服从任意概率分布的随机变量
- For each x i x_i xi, find F ( x i ) , i ∼ 1 → N F(x_i), i \sim 1 \to N F(xi),i∼1→N
- Generate a random continuous uniform u ∼ U ( 0 , 1 ) u \sim U(0, 1) u∼U(0,1)
- Locate the smallest x i x_i xi where u < F ( x i ) u < F(x_i) u<F(xi)
- $ x = x_i$
- Return x x x
例:假设 x x x是离散的,服从下面概率分布和累计分布函数:
| x | P(x) | F(x) |
|---|---|---|
| 0 | 0.4 | 0.4 |
| 1 | 0.3 | 0.7 |
| 2 | 0.2 | 0.9 |
| 3 | 0.1 | 1.0 |
- 生成一个均匀分布的随机变量: u ∼ U ( 0 , 1 ) , u = 0.58 u \sim U(0, 1), u = 0.58 u∼U(0,1),u=0.58
- u < F ( 1 ) = 0.7 u < F(1) = 0.7 u<F(1)=0.7
- x = 1 x = 1 x=1
边栏推荐
- UI automation positioning edge -xpath actual combat
- JDBC入门学习(三)之事务回滚功能的实现
- BGP summary of hcip operation
- HCIP 重发布实验
- Mysql入门学习(二)之子查询+关联
- Visual display of TEQC quality analysis results using teqcplot
- Swiftui 2.0 course notes Chapter 4
- IDEA 代码开发完毕后,提交代码,提交后发现分支不对,怎么撤回
- [microservices | Nacos] Nacos realizes data isolation of multi environment and multi tenant
- Difficult to find a job in a bad environment? Ali on three sides. Fortunately, he has made full preparations and has offered
猜你喜欢

【opencv450】帧间差分法

UI automation positioning edge -xpath actual combat

APP自动化测试-Appium进阶

Drag and drop拖放框架

Baidu PaddlePaddle's "universal gravitation" first stop in 2022 landed in Suzhou, comprehensively launching the SME empowerment plan

STP summary

Mysql入门学习(一)之语法

UI automation positioning edge -xpath actual combat

Web 应用程序安全测试指南

Zygote process
随机推荐
Ams:startactivity desktop launch application
渗透测试基础 | 附带测试点、测试场景
PHP move_uploaded_file上传移动图片失败
Difficult to find a job in a bad environment? Ali on three sides. Fortunately, he has made full preparations and has offered
UnityShader入门精要——Unity中的渲染优化技术(四)
Missing essential plugin
Arduino temperature and humidity sensor DHT11 (including code)
Calculate Euclidean distance and cosine similarity
Strong push, quick start to software testing
Raspberry pie network remote access
STP总结
Master shell, one article is enough!
Arduino flame sensor (with code)
pkav简单爆破
Mongodb sharding principle
Web 应用程序安全测试指南
JDBC入门学习(四)之Druid连接池的使用
A compiler related bug in rtklib2.4.3 B34
(IntelliJ)插件一 Background Image Plus
PRCS-1016 : Failed to resolve Single Client Access Name