日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

gama函数与gama分布

發布時間:2024/3/24 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 gama函数与gama分布 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

文章目錄

  • 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! >

  • T : the random variable for wait time until the k-th event
    (This is the random variable of interest!)
  • Event arrivals are modeled by a Poisson process with rate λ.
  • k : the 1st parameter of Gamma. The # of events for which you are waiting.
  • λ : the 2nd parameter of Gamma. The rate of events happening which follows the Poisson process.
  • P(T > t) : The probability that the waiting time until the k-th event is greater than t time units
  • P(X = k in t time units) : The Poisson probability of k events occuring during t time units


    Since k is a positive integer (number of k events), 𝚪(k) = (k?1)! where 𝚪 denotes the gamma function. The final product can be rewritten as:

可視化

Recap:
k : The number of events for which you are waiting to occur.
λ : The rate of events happening which follows the Poisson process.

可以看出,讓rate一定時,等待的events的數量越大,需要的期望時間就越長

總結

以上是生活随笔為你收集整理的gama函数与gama分布的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。