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的更多相关文章
随机推荐
- Hadoop Bloom Filter 使用
1.Bloom Filter 默认的 BloomFilter filter =new BloomFilter(10,2,1); // 过滤器长度为10 ,用2哈希函数,MURMUR_HASH (1) ...
- 关于getch()函数
从百度上得知: 这个函数是一个不回显函数,当用户按下某个字符时,函数自动读取,无需按回车,有的C语言命令行程序会用到此函数做游戏,但是这个函数并非标准函数,要注意移植性! 所以有这样的一个接口,那就很 ...
- 关于最新的APP上架流程
苹果官方在2015年05-06月开发者中心进行了改版,网上的APP Store上架大部分都不一样了,自己研究总结一下,一个最新的上架教程以备后用 1.1.前期工作 首先你需要有一个苹果的开发者帐号,一 ...
- Spring 学习笔记 ----依赖注入
依赖注入 有三种方式,本文只学习下属性注入. 属性注入 属性注入即通过 setXxx方法()注入Bean的属性值或依赖对象,由于属性注入方式具有可选择性和灵活性高的优点,因此属性注入方式是 ...
- obj-c编程10:Foundation库中类的使用(3)[文件管理]
好吧,不管神马系统都无可避免的要说到文件,目录,路径(PATH)管理的内容,下面我们来看看在F库中对他们的支持.我简单看了下,不谈其他光从方法命名来说就多少显得有点复杂,如果和ruby相比就呵呵了. ...
- ubunut在系统恢复模式下无法修改root密码的分析和解决
前些日子本猫的ubuntu 14.10貌似出了点问题,想修改下root密码,但是无奈原系统有错正常情况下无法修改啊,这是逼我重装的节奏吗? 在ubuntu开机后立即按住left_shift不放,调出g ...
- 【计算机视觉】深度相机(一)--TOF总结
http://www.voidcn.com/blog/lg1259156776/article/p-6302915.html 1.1 TOF初探 TOF是Time of flight的简写,直译为飞行 ...
- Java EE的未来
http://www.infoq.com/cn/articles/enterprise-Java-opinion 作为InfoQ下一年编辑关注点审核工作的一部分,我们挑选了Java作为深入探讨的主题. ...
- 数据库中row_number()、rank()、dense_rank() 的区别
row_number的用途非常广泛,排序最好用它,它会为查询出来的每一行记录生成一个序号,依次排序且不会重复,注意使用row_number函数时必须要用over子句选择对某一列进行排序才能生成序号. ...
- RxJava 2.x 使用最佳实践
转载请标明出处:http://blog.csdn.net/zhaoyanjun6/article/details/76443347 本文出自[赵彦军的博客] 以前写过 Rxjava 系列教程, 如下所 ...

