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的更多相关文章
随机推荐
- Github上的原文XMPP环境搭建步骤,英语能力差不多的可以看看
Getting started using XMPPFramework on iOS Here is a post on StackOverflow describing how to install ...
- 关于ARC的介绍和ARC与MRC混编解决
1. ARC & MRC 混合开发 在项目开发中,遇到使用MRC开发的第三方库怎么办? 例如:ASI 1> 尝试使用Xcode的转换工具(失败率比较高) 2> 在编译选项中,为MR ...
- 恶补web之八:jQuery(1)
jquery是一个js库,极大的简化了js编程.jquery是一个写的更少,但做的更多的轻量级js库. jquery位于一个js文件中,其中包含了所有jquery函数,可以用如下标记把jquery添加 ...
- windows下nginx+php
nginx能够为Web服务器节省资源,相较于我们熟悉的apache.IIS的优势,在于"反向代理"和"负载均衡".那在windows下如何来配置nginx+ph ...
- MySQL Join 的实现原理
在寻找Join 语句的优化思路之前,我们首先要理解在MySQL 中是如何来实现Join 的,只要理解了实现原理之后,优化就比较简单了.下面我们先分析一下MySQL 中Join 的实现原理.在MySQL ...
- Python实现PPPOE攻击工具
前言 大家可能对PPPOE不是很熟悉,但是肯定对拨号上网非常熟悉,拨号上网就是用的这种通信协议.一般PPPOE认证上网主要用于校园网或者小区网中,拨号界面如下图所示. 但是PPPOE这种通信协议,是有 ...
- php坏境安装Xdebug详情步骤
原创,转载请注明出处! Xdebug是一个开放源代码的PHP程序调试器(即一个Debug工具),可以用来跟踪,调试和分析PHP程序的运行状况,可以说是程序员必备的一个工具之一.好了,进入正题: 1.下 ...
- 提高Maven下载jar包的速度
1.提高Maven下载jar包的速度 打开项目所配置的maven包下conf目录下的settings.xml 找到 <mirrors>标签添加一下内容: 1 <!-- 阿里云仓库 ...
- 分布式服务通讯框架XXL-RPC
<分布式服务通讯框架XXL-RPC> 一.简介 1.1 概述 XXL-RPC 是一个分布式服务通讯框架,提供稳定高性能的RPC远程服务调用功能.现已开放源代码,开箱即用. 1.2 特 ...
- 学习笔记 C++ 链表
今天查了不少关于链表的资料大概理解了链表,为记录只用留笔于此. 链表概述:动态的数据存储单元,可以比数组更加灵活. 链表的组成:存储的数据,下一个节点. 首先让我们用代码完成一个节点. class N ...

