文章目录

  • gama函数
    • gama函数的作用:
    • gama函数的定义:
    • 使用Gamma函数对阶乘进行插值
    • Gamma函数的性质
  • gamma分布
    • 前置1:泊松分布
      • The shortcomings of the Binomial Distribution
      • Derive the Poisson formula mathematically from the Binomial PMF
      • Poisson distribution 公式
      • Example
    • 前置2: Exponential Distribution
      • PDF of exponential
      • Memoryless Property of exponential
      • Relationship between a Poisson and an Exponential distribution
    • Difference between exponential and gama distribution
    • Derive the PDF of Gamma
    • 可视化

gama函数

gama函数的作用:


gama函数的定义:

Γ(Z)=∫0∞xZ−1∗e−xdx\Gamma (\Zeta) = \int_0^{\infty} x^{\Zeta -1}*e^{-x} \, dxΓ(Z)=∫0∞​xZ−1∗e−xdx
or you can write…
Γ(Z+1)=∫0∞xZ∗e−xdx\Gamma(\Zeta+1)=\int_0^{\infty} x^{\Zeta}*e^{-x}\,dx Γ(Z+1)=∫0∞​xZ∗e−xdx

使用Gamma函数对阶乘进行插值

Γ(Z+1)=Z!\Gamma(\Zeta+1) = \Zeta ! Γ(Z+1)=Z!

Gamma函数的性质

a)
对于Z\ZetaZ>1,则:
Γ(Z+1)=Z∗Γ(Z)\Gamma(\Zeta +1) = \Zeta*\Gamma(\Zeta) Γ(Z+1)=Z∗Γ(Z)
证明:

b)
If n is a positive interger, then

Γ(n)=(n−1)!\Gamma(n) = (n-1)!Γ(n)=(n−1)!

Proof:

where

gamma分布

前置1:泊松分布

The shortcomings of the Binomial Distribution

The problem with binomial is that it CANNOT contain more than 1 event in the unit of time (in this case, 1 hr is the unit time). The unit of time can only have 0 or 1 event.

为了解决这个问题,我们可以将unit time设置为无穷小,使用更小的划分,这样就就可以使原始的单位时间包含多个事件。

Mathematically, this means n → ∞.
Since we assume the rate is fixed, we must have p → 0. Because otherwise, n*p, which is the number of events, will blow up. (n对应了binomial distribution中的实验此时,p对应了binomial distribution中的成功概率)

为了使用了binomial分布,我们必须知道n和p。
对比之下,泊松分布不需要知道n,p,因为我们假设n是无穷大,p位无穷小。 泊松分布唯一的参数为 rate :λ\lambdaλ

Derive the Poisson formula mathematically from the Binomial PMF


we will show that the multiplication of the first two terms is 1:

Poisson distribution 公式


As λ becomes bigger, the graph looks more like a normal distribution.

Example


假设interval为一周,一周内访客1134,点赞的数量为17,即n=1134,p=171134\frac{17}{1134}113417​(也就是在interval为一周的前提下, rate(λ\lambdaλ)is 17)

前置2: Exponential Distribution

PDF of exponential

The definition of exponential distribution is the probability distribution of the time between the events in a Poisson process.

Poisson PDF is that the time period in which Poisson events (X=k) occur is just one (1) unit time

P(Nothing happens during t time units)
= e^−λ * e^−λ * … * e^−λ = e^(-λt)

P(T > t) = P(X=0 in t time units) = e^−λt

  • T : the random variable of our interest!
    the random variable for the waiting time until the first event
  • X : the # of events in the future which follows the Poisson dist.
  • P(T > t) : The probability that the waiting time until the first event is greater than t time units
  • P(X = 0 in t time units) : The probability of zero successes in t time units

A PDF is the derivative of the CDF.
Since we already have the CDF, 1 - P(T > t), of exponential, we can get its PDF by differentiating it.

Memoryless Property of exponential

P(T > a + b | T > a) = P(T > b)


Proof

Relationship between a Poisson and an Exponential distribution

If the number of events per unit time follows a Poisson distribution, then the amount of time between events follows the exponential distribution.

Difference between exponential and gama distribution

The exponential distribution predicts the wait time until the very first event. The gamma distribution, on the other hand, predicts the wait time until the k-th event occurs.

Derive the PDF of Gamma

The derivation of the PDF of Gamma distribution is very similar to that of the exponential distribution PDF, except for one thing — it’s the wait time until the k-th event, instead of the first event.

< Notation! >