The Basics of Probability

  • Probability measures the amount of uncertainty of an event: a fact whose occurence is uncertain.
  • Sample space refers to the set of all possible events, denoted as .
  • Some properties:
    • Sum rule:
    • Union bound:
  • Conditional probability:. To emphasize that p(A) is unconditional, p(A) is called "marginal probability", and p(B, A) is called "joint probability", where p(A, B)=p(B|A) p(A) is called the "multiplication rule" or "factorization rule".
  • Total probability theorem: p(B) = p(B|A)p(A) + p(B|~A)p(~A)
  • Bayes' Theorem: 

    Bayes' Theorem can be regarded as a rule to update a prior probability p(A) into a posterior probability p(A|B), taking into account the amount/occurrence of evidence/event B.

  • Conditional independence: Two events A and B, with p(A)>0 and p(B)>0 are independent, given C, if p(A, B|C)=p(A|C) p(B|C).
  • Probability mass function (p.m.f) of random variable X is a function 
  • Joint probability mass function of X and Y is a function
  • Cumulative distribution function (c.d.f) of a random variable X is a function: 
  • The c.d.f describes the probability in a specific interval, whereas the p.m.f describes the probability in a specific event.
  • Expectation: the expectationof a random variable X is: 
    • linearity: E[aX+bY]=aE[x]+bE[Y]
    • if X and Y are independent: E[XY]=E[X]*E[Y]
    • Markov's inequality: let X be a nonnegative random variable with , then for all 
  • Variance: the variance of a random variable X is: , where is called the standard deviation of the random variable X.
    • Var[aX] = a2Var[X]
    • if X and Y are independent, Var[X+Y]=Var[X]+Var[Y]
    • Chebyshev's inequality: let X be a random variable , then for all 

Bernoulli Distribution

  • A (single) Bernoulli trial is an experiment whose outcome is random and can be either of two possible outcomes, "success" and "failure", or "yes" and "no". Examples of Bernoulli trials include: flipping a coin, political option poll, etc.
  • The Bernoulli distribution is a discrete probability distribution ofone (a) discrete random variable X, which takes value 1 with success probability p: Pr(X=1)=p, and value 0 with failure probability Pr(X=0)=q=1-p. For formally, the Bernoulli distribution is summarized as follows:
    • notation: Bern(p), where 0<p<1 is the probability of success.
    • support: X={0, 1}
    • p.m.f: Pr[X=0]=q=1-p, Pr[X=1]=p
    • mean: E[X]=p
    • variance: Var[X]=p(1-p)
    • It is a special case of Binomial distribution B(n, p). Bernoulli distribution is B(1, p).

Binomial Distribution

  • The Binomial distribution is the discrete probability distribution of the number of successes in a sequence ofn independent Bernoulli trials with success probabilityp, denoted asX~B(n, p).
  • The Binomial distribution is often used to model the number of successes in a sample of sizen drawn with replacement from a population of sizeN. If the sampling is carried out without replacement, the draws are not independent and so the resulting distribution is a hypergeometric distribution, not a binomial one.
  • The Binomial distribution is summarized as follows:
    • notation: B(n, p), where n is the number of trials and p is the success probability in each trial
    • support: k = {0, 1, ..., n} the number of successes
    • p.m.f:
    • mean: np
    • variance: np(1-p)
  • If n is large enough, then the skew of the distribution is not too great. In this case, a reasonable approximation to B(n, p) is given by the normal distribution: since a large n will result in difficulty to compute the p.m.f of Binomial distribution. 
    • one rule to determine if such approximation is reasonable, or if n is large enough is that both np and np(1-p) must be greater than 5. If both are greater than 15 then the approximation should be good.
    • A second rule is than for n>5, the normal approximation is adequate if:
    • Another commonly used rule holds that the normal approximation is appropriate only if everything within 3 standard deviation of its mean is within the range of possible values, that is if:
    • To improve the accuracy of the approximation, we usually use a correction factor to take into account that the binomial random variable is discrete while the normal random variable is continuous. In particular, the basic idea is to treat the discrete value k as the continuous interval from k-0.5 to k+0.5.
  • In addition, Poisson distribution can be used to approximate the Binomial distribution when n is very large. A rule of thumb stating that the Poisson distribution is a good approximation oof the binomial distribution if n is at least 20 and p is smaller than or equal to 0.05, and an excellent approximation if n>=100, and np<=10:

Poisson Distribution

  • Poisson distribution: Let X be a discrete random variable taking values in the set of integer numbers  with probability:

    My understanding. Poisson distribution describes the fact that the probability of drawing a specific integer from a set of integers is not uniform. For example, it is well-known that if someone is asked to pick a random integer from 1-10, some integers are occurring with greater probability whereas some others happen with lower probability. Although it seems that all possible integers get equal chance to be picked, it is not true in real case. I think this may be due to subjectivity of people, i.e., some one prefers larger values while other tends to pick smaller ones. This point needs to be verified as I got this feeling totally from intuitions. 
  • The Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time and/or space if these events occur with a known average rate and independent of the time since the last event.
  • The Poisson distribution is summarized as follows.
    • notation: , where is a real number, indicating the number of events occurring that will be observed in the time interval.
    • support: k = {0, 1, 2, 3, ...}
    • mean: 
    • variance: 
  • Applications of Poisson distribution
    • Telecommunication: telephone calls arriving in a system
    • Management: customers arriving at a counter or call center
    • Civil engineering: cars arriving at a traffic light
  • Generating Poisson random variables
    algorithm poisson_random_number:
    init:
    Let

    , 

    ,  and 

    .
    do:

         Generate uniform random number u in [0, 1], and let 

    while p>L.
    return k-1.

References

  1. Paola Sebastiani, A tutorial on probability theory
  2. Mehryar Mohri, Introduction to Machine Learning - Basic Probability Notations.

Study notes for Discrete Probability Distribution的更多相关文章

  1. Generating a Random Sample from discrete probability distribution

    If is a discrete random variable taking on values , then we can write . Implementation of this formu ...

  2. Machine Learning Algorithms Study Notes(2)--Supervised Learning

    Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 本系列文章是Andrew Ng 在斯坦福的机器学习课程 CS 22 ...

  3. Notes on the Dirichlet Distribution and Dirichlet Process

    Notes on the Dirichlet Distribution and Dirichlet Process In [3]: %matplotlib inline   Note: I wrote ...

  4. Study note for Continuous Probability Distributions

    Basics of Probability Probability density function (pdf). Let X be a continuous random variable. The ...

  5. Machine Learning Algorithms Study Notes(3)--Learning Theory

    Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 本系列文章是Andrew Ng 在斯坦福的机器学习课程 CS 22 ...

  6. Machine Learning Algorithms Study Notes(1)--Introduction

    Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 目 录 1    Introduction    1 1.1    ...

  7. Study notes for Latent Dirichlet Allocation

    1. Topic Models Topic models are based upon the idea that documents are mixtures of topics, where a ...

  8. Study notes for Clustering and K-means

    1. Clustering Analysis Clustering is the process of grouping a set of (unlabeled) data objects into ...

  9. ORACLE STUDY NOTES 01

    [JSU]LJDragon's Oracle course notes In the first semester, junior year DML数据操纵语言 DML指:update,delete, ...

随机推荐

  1. 74LS183 加法器 【数字电路】

    74LS183 搭的一个还有点意思的加法电路,串行进位的 2+6 == 8 大家都懂的哈哈

  2. jQuery多文件

    jQuery多文件下载 文件下载是一个Web中非常常用的功能,不过你是做内部管理系统还是做面向公众的互联网公司都会遇到这个问题,对于下载一般有点实际开发经验的都会自己解决,上周弄了一下多文件下载,业务 ...

  3. 快速构建Windows 8风格应用9-竖直视图

    原文:快速构建Windows 8风格应用9-竖直视图 本篇博文主要介绍竖直视图概览.关于竖直视图设计.如何构建竖直视图 竖直视图概览 Windows 8为了支持旋转的设备提供了竖屏视图,我们开发的应用 ...

  4. Tomcat7.0更改默认的路径来访问自己的项目

    如何使自己的项目没有输入:localhost:8080/项目名称/index.html 能够访问. 步骤,如下面的 : 找到tomcat ---  config----server.xml 选中右键编 ...

  5. MVC6 - 视图组建

    MVC6 - 视图组建 VS2015 PERVIEW中可以创建MVC6 项目. 我们可以 发现有几大亮点. 首先我们看目录结构: 当前项目包含两个主要的文件夹:Solution Items .src ...

  6. PDFBox之文档创建

    1.创建一个空的PDF 下面的小例子表示如何使用PDFBox来创建一个新的PDF文档. // 创建一个空的文档 PDDocument document = new PDDocument(); // 创 ...

  7. vim的复制粘贴小结

    vim帮助文档里与粘贴板有关的内容如下: vim有12个粘贴板,分别是0.1.2.….9.a.“.+:用:reg命令可以查看各个粘贴板里的内容.在vim中简单用y只是复制到“(双引号)粘贴板里,同样用 ...

  8. 附加没有LDF的数据库文件

    原文:附加没有LDF的数据库文件 如果你只下载了数据文件,没有LDF文件,那么附加的时候选择使用ATTACH_REBUILD_LOG. 命令类似: USE [master] GO CREATE DAT ...

  9. C#边边角角(一)

    前言 此篇为在学习C#基础时,熟悉C#的语法和高级特性的一些小的尝试和笔记,记录一下以供分享 集合初始化器 集合必须实现System.Collections.IEnumerable接口 集合必须包含A ...

  10. EF6+MVC4+EasyUI个人日记系统开源共享

    发现在2015年里学习MVC的人越来越多,本人的群成员也越来越多,为了更方便大家学习,在此共享一个个人的小项目. 如下是部分截图: 简单介绍一下本系统的一些相关知识. 1.简单的3层框架,易学易懂 2 ...