QM4_Probability
Basic Concepts
Probability concepts
Terms
- Random variable
- A quantity whose possible values are uncertain.
- Outcomes
- The possible values of a random variable.
- Event
- A specified set of outcomes.
Properties
- 0 <= P(E) <=1
Events
Odds (赔率)
Odds for the event E
- P(E)/[1-P(E)]
Odds against the event E
- [1-P(E)]/P(E)
Example
- Goven (horse will win the race) = 1/8, what are the odds for or against the horse will win the race?
- Odds for horse will win the race = (1/8) / (1-1/8) = 1/7
- Odds against horse will win the race = (1-1/8) / (1/8) = 7/1
Rule
Multplication rule **
- P(A|B) = P(AB)/P(B)
- P(AB) = P(B)xP(A|B) = P(A)xP(B|A)
- For mutually exclusive enents: P(AB) = 0
- For independent events: P(AB) = P(A)P(B)
Addition rule
- P(A+B) = P(A)+P(B)-P(AB)
- For mutually exclusive events: P(A+B) = P(A)+P(B)
- 含义:
- P(A|B) : 在B发生的条件下A发生;
- P(B|A): 在A发生的条件下B发生;
- P(AB): A发生且B也发生.
Total probability rule (全概率法则)
- 全概率法则, 包含了所有可能发生的情况
- Definition
- explains the unconditional probability of the event in terms of probabilities conditional on the scenarios.
- Formula
- P(A) = P(A|S1)P(S1) + P(A|S2)P(S2)... + P(A|Sn)P(Sn)
- where S1,S2...Sn are mutually exclusive and exhaustive.
- 其实就是乘法法则 P(A|S1)P(S1) = P(AS1)
- 其实就是乘法法则, P(AS1)+P(AS2)+P(AS3)+P(AS1=4)
- P(AS1)= PS1(PA|S1)
- 其实就是乘法法则, P(AS1)+P(AS2)+P(AS3)+P(AS1=4)
Baye's formula (贝叶斯公式)
- Definition
- given a prior probabilities P(A) for an event, if you receiv new information (B), the rule for updating your probability(posterior probability, P(A|B)) of the event.
- forula:
例;
Probability Statistics
Expected value **
- Definition
- the probability-weighted average of the possible outcomes of the random variable(X)
- Calculation
- E(X) = P(X1)X1 + P(X2)X2 ... + P(Xn)Xn
E(x)就是x拔, 求方差也就是在求期望. 期望中的权重变成了这里方差中的概率.
- E(X) = P(X1)X1 + P(X2)X2 ... + P(Xn)Xn
- 其实求方差也是在求加权平均
- 算期望就是算加权平均. 相当于基于概率的加权平均. 所以计算期望需要两个值, probability和value.
Covariance (协方差) ***
- Definition
- A easure of how two variables move together. 两个随机变量变动的方向性.
- Calculation
- Characteristics
- Positive covariance: the two variables tend to move together. 你涨我也涨,你跌我也跌.
- Negative covariance: the two variables tend to move in apposite direction. 你涨我跌.
- Valuses range from minus infinity to positive infinity
- Units of covariance difficult to interpret (比如若是人的平方, 这样的单位没有任何意义)
- Autocovariance is equal to the variance? 这句话怎么理解?
- 协方差是衡量两个变量,所以把(x-x拔)(x-x拔)的其中一个x变成了y. 其实和方差是一样的.
Correlation (相关系数,相关性) ***
- Definition
- A standardized measure of linear relationship between two variables.
- Calculation
分母是标准差, 分子是协方差, 即协方差 / 标准差.
- 例:
- 相关系数 = 协方差 / 标准差, 题目中协方差是0.80, 标准差没有告诉 , 告诉的是variance 0.0036/ 0.0009, 需要开个根号.
- covariance = correlation * 标准差, 即, covariance = 0.80*0.03*0.06 = 0.00144.
- Characteristics
- Values range from -1 (perfect negative correlation) to +1 (perfect positive correlation)
- A correlation of 0 indicates an absence of any linear(straight-line) relationship and doesn't indicate independence (相关系数是0只说明两个变量没有线性关系, 不代表两个变量互不影响. 比如y=x*x,虽然不是线性关系, 但是抛物线)
- The bigger the absolute value, the stronger the linear relationship.
QM4_Probability的更多相关文章
随机推荐
- 高仿qq健康
概述 学习别人的代码,在此基础上 优化代码结构 增加动画 要点记录 通过mRatio参数,让宽高始终是一个比例 贝塞尔曲线手动画矩形圆角 画虚线 根据基准点绘制文字 属性动画的使用 画笔宽度的自适应 ...
- CF633G
题目大意: 给你一棵树,根节点为1 有2种操作,第一种是给u节点所在的子树的所有节点的权值+x 第二种是询问,假设v是子树u中的节点,有多少种质数满足av = p + m·k 做法:维护子树信息显然d ...
- mybatis中分页插件PageHelper的使用
转载博客:http://blog.csdn.net/u012728960/article/details/50791343
- javascript学习(三)——常用方法(2)
一.兼容性较高的浏览器页面关闭 //关闭网页,不支持火狐(火狐返回上次浏览页面) //FireFox非window.open()等弹出页面,需要在地址栏中输入about:config, 然后将do ...
- Hibernate中的对象有三种状态
Hibernate中的对象有三种状态: 瞬时状态 (Transient),持久状态 (Persistent), 1. 脱管状态 (Detached) 1. 1. 瞬时状态 (Transient) 由 ...
- 初识JAVA——流程控制之if语句
if语句的流程控制主要分为3种:1,单分支结构:if(){……}: 2,双分支结构:if(){……}else{……}; 3,多分枝结构:if(){……}else if(){……}…… 其中作为if语句 ...
- 使用Cli构建Go的命令行应用
转载出处:http://www.opscoder.info/cli.html 在Go里面应用中flag这一标准库,提供了很多我们在写命令行时需要的interface,然而如果你需要更强大更好的结构 ...
- 分布式任务调度——quartz + spring + 数据库
项目中使用分布式并发部署定时任务,多台跨JVM,按照常理逻辑每个JVM的定时任务会各自运行,这样就会存在问题,多台分布式JVM机器的应用服务同时干活,一个是加重服务负担,另外一个是存在严重的逻 ...
- dubbo+zookeeper+springboot构建服务
本次和大家分享的是dubbo框架应用的初略配置和zookeeper注册中心的使用:说到注册中心现在我使用过的只有两种:zookeeper和Eureka,zk我结合dubbo来使用,而Eureka结合s ...
- Python3实现ICMP远控后门(中)之“嗅探”黑科技
ICMP后门 前言 第一篇:Python3实现ICMP远控后门(上) 第二篇:Python3实现ICMP远控后门(上)_补充篇 在上两篇文章中,详细讲解了ICMP协议,同时实现了一个具备完整功能的pi ...