[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
通俗易懂理解贝叶斯公式
要理解贝叶斯公式,首先要知道条件概率公式、全概率公式的概念,因为贝叶斯公式就是由它俩得来的。
一、条件概率公式
P(B|A)= P(AB)/(P(A)
含义:条件B下产生A的概率可以由A和B的联合概率除以B的概率得到。
全概率公式,贝叶斯公式都是由它而来。
P(AB)
是事件A发生,且事件B发生的概率,事件范围还是整个样本空间;A,B没有先后次序之分,其中的AB即为AB两个空间相交的部分,这部分也可以视为在B空间上,A也出现了,其实这个公式P(AB)是以Ω为样本空间的,但是P(A|B)是以B为样本空间的,
P(B | A) 是事件A先发生,B发生的概率,也就是说P(B | A)大于等于P(AB)。一定要注意是事件A先发生,因为事件A的发生缩小了样本空间。
P(AB):
P(B | A):
二、乘法定理
P(AB) = P( B | A)P(A), P(AB) = P( A | B)P(B)
用上述的图片就可以很容易的理解,事件A和事件B同时发生的概率就等于事件B在事件A的样本空间下发生的概率乘以事件A在整个样本空间下发生的概率。
因此,贝叶斯公式的雏形
由上两式可得:P(B|A)= (P(A|B)P(B))/(P(A))
三、全概率公式
设E为试验A的样本空间,B1,B2…Bn为A的一组事件,即B系列事件瓜分了A且各个B不相互重叠(互不相容),则全概率公式可以举例推导为:
当B1+B2+B3=A时:
P(A)
= P(AA)
=P[A(B1+B2+B3)]
=P(AB1+AB2+AB3)
=P(AB1)+P(AB2)+P(AB3),(因为P(AB)=P(A|B)P(B))
=P(A|B1)P(B1)+ P(A|B2)P(B2) + P(A|B3)P(B3)
即:P(A) = P(B1) P(A|B1) + P(B2)P(A|B2) + …
四、贝叶斯公式:
由条件概率和全概率公式可得: