关闭

统计学 入门基础概念篇 Probability 概率部分 (个人笔记)

3498人阅读 评论(0) 收藏 举报
分类:

排列 \ 组合 

Combination : sometimes, we want to count all of the possible ways that a single set of object can be selected without regard to the order in which they are selected. 

组合就是从一堆东西里面选出一定量的元素并且不考虑取的顺序, 能有多少种可能的组合


The number of combinations of n objects taken r at a time is denoted by nCr 

这句话的意思是: 一堆数量为 n 的元素,一次性从里面拿出 r 个. 把这个过程定义为 nCr 

nCr  =n * ( n - 1) * ( n - 2 ) ... ( n - r + 1) / r! =  n! / ( r! * (n - r)! )


Permutation: we want to count all of the possible ways that a single set of objects can be arranged. 

排列就是从一堆东西选出一定量的元素但是考虑他们的顺序.

nPr = n(n - 1)(n - 2) ... (n - r + 1) = n! / (n - r)!


What is probability?

 the probability of an event refers to the likelihood that the event will occur.

概率就是一个事件发生的可能性,

Some definitions?

1. two events are mutually exclusive ordisjointif they can not occur at the same the time. 

两个事件不可能同时发生则称这两个事件是互斥的.

2. the probability that event A occurs, given that Event B has occurred, is called a conditional probability.the conditional probability of Event A, given Event B, is denoted by the symbolP(A|B)

A事件发生是建立在B事件发生的前提下的,则称A conditional on B ( 条件概率 )

3. the complement of an event is the event not occurring. the probability that event A will not occur is denoted byP(A')

互补,一个事件的互补等于1 减去 这个事件发生的概率.

4. the probability that events A and B both occur is the probability of theintersectionof A and B. it is denoted byP(AnB).

两个事件的交. 如果这两个事件是互斥的,那么他俩的交为0

5. the probability that events A or B occur is the probability of the union of A and B. the probability of the union of events A and B is denoted byp(AuB)

6. if the occurrence of the event A changes the probability of event B, then events A and B are Bdependent, on the other hand, if the occurrence of event A does not change the probability of event B, then events A and B areindependent.

如果事件A影响事件B那么这两个事件是 依赖的.反之是 独立的.



Rules of probability?

Rule of multiplication:    P( A n B ) = P ( A ) P ( B | A) = P ( B ) P ( A | B)

Rule of Addition:      P( A u B ) = P ( A ) + P ( B ) - P ( A n B )  

example :

A card is drawn randomly from a deck of ordinary playing cards. You win $10 if the card is a spade or an ace. What is the probability that you will win the game?

从一副扑克牌中选出一张牌, 如果这张牌 是黑桃或者是A,则胜,求胜利的概率.

定义 A 为选出的扑克牌 是黑桃. 定义 B 为选出的扑克牌是 As

P( A u B) = P ( A) + P ( B ) - P( A n B ) = 13 / 54 + 4 / 54 - 1 / 54 

贝叶斯公式.

通常, 事件A在事件B ( 发生 )的条件下的概率,与事件B在事件A( 发生 )的条件下的概率是不一样的, 但是这两者是有确定关系的, 贝叶斯定理就是对这种关系的陈述.






贝叶斯公式例题:

Marine明天就要结婚了,婚礼安排在一个沙漠的室外举行. 最近几年, 每年中仅有5 天下雨. 不幸的是, 天气预报预计明天将要下雨.    从历史资料看, 真实下雨,然后天气预报预报下雨的概率是 90%,  真实不下雨但是天气预报下雨的概率是 10%, 那么Marine 婚礼下雨的概率是多少?

解:

定义事件A1, 在婚礼下雨

       事件A2, 在婚礼不下雨

事件B, 天气预报预测下雨

p(A1) = 5/365

p(A2) = 360/365

p(B|A1) = 0.9

P(B|A2) = 0.1


最终我们需要求解 P(A1|B)    为什么 ?   因为现在我们已经知道的确定发生的是天气预报预测下雨, 所以根据条件概率 在B事件发生的情况下A1 事件发生的概率定义为 P(A1|B)

根据贝叶斯公式:  

P(A1|B) =   P(B|A1)*P(A1)  / {  P( A1 n B)  + P( A2 n B )   }


Random Variable: 一个变量的值随机的事件取得,那么这个值称为random variable

Discrete : mostly, count

continuous: mostly, a range of values. eg. the range of age.


数学期望值( 均值 ) expected value

E(X) = μx = Σ [ xi * P(xi) ]



随机变量( random variable )的独立性.

假设XY为两个随机变量,  

  • P(x|y) = P(x), for all values of X and Y.
  • P(x  y) = P(x) * P(y), for all values of X and Y 则, XY是相互独立的.

Linear Transformation: 一个变量的值得改变通过加上/减去一个常量,或者乘以/除以一个常量.

假设Y是由X线性变换产生的新变量, 则

Y = mX + b  and Var(Y) = m2 * Var(X)

where m and b are constants.



0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:159675次
    • 积分:3168
    • 等级:
    • 排名:第11492名
    • 原创:144篇
    • 转载:9篇
    • 译文:1篇
    • 评论:46条
    最新评论