定義. (伯努利試驗) 一個伯努利試驗 是一個只有兩個 可能結果的實驗,即成功和失敗。
備註。
'成功'和'失敗'僅僅作為標籤,即我們可以將實驗中的任何一個結果定義為'成功'。
定義. (伯努利試驗的獨立性) 令 S i {\displaystyle S_{i}} 為事件 { i th Bernoulli trial is a success } , i = 1 , 2 , … {\displaystyle \{i{\text{th Bernoulli trial is a success}}\},\quad i=1,2,\dotsc } [ 1] . 如果 S 1 , S 2 , … {\displaystyle S_{1},S_{2},\dotsc } 是獨立 的,那麼相應的伯努利試驗是獨立 的。
示例. 如果我們將拋硬幣的結果解釋為'正面朝上'和'反面朝上',那麼拋硬幣就是一個伯努利試驗。
練習。
備註。
我們通常將拋硬幣的結果解釋為'正面朝上'和'反面朝上'。
考慮 n {\displaystyle {\color {blue}n}} 個獨立的伯努利試驗,每個試驗的成功機率均為 p {\displaystyle {\color {darkgreen}p}} 。 我們想要計算機率 P ( { r successes in n trials } ) {\displaystyle \mathbb {P} (\{{\color {darkgreen}r}{\text{ successes in }}{\color {blue}n}{\text{ trials}}\})} 。
設 S i {\displaystyle S_{i}} 為事件 { i th Bernoulli trial is a success } , i = 1 , 2 , … {\displaystyle \{i{\text{th Bernoulli trial is a success}}\},\quad i=1,2,\dotsc } ,如上一節所述。讓我們考慮一個特定的結果序列,其中有 r {\displaystyle {\color {darkgreen}r}} 次成功,在 n {\displaystyle {\color {blue}n}} 次試驗中: S ⋯ S ⏟ r successes F ⋯ F ⏞ n − r failures {\displaystyle {\color {darkgreen}\underbrace {S\cdots S} _{r{\text{ successes}}}}{\color {red}\overbrace {F\cdots F} ^{{\color {blue}n}-{\color {darkgreen}r}{\text{ failures}}}}} 。它的機率是 P ( S 1 ∩ ⋯ S r ∩ S r + 1 c ∩ ⋯ ∩ S n c ) = indpt. P ( S 1 ) ⋯ P ( S r ) P ( S r + 1 c ) ⋯ P ( S n c ) = p r ( 1 − p ) n − r {\displaystyle \mathbb {P} ({\color {darkgreen}S_{1}\cap \dotsb S_{r}}\cap {\color {red}S_{r+1}^{c}\cap \dotsb \cap S_{\color {blue}n}^{c}}){\overset {\text{ indpt. }}{=}}{\color {darkgreen}\mathbb {P} (S_{1})\dotsb \mathbb {P} (S_{r})}{\color {red}\mathbb {P} (S_{r+1}^{c})\cdots \mathbb {P} (S_{\color {blue}n}^{c})}={\color {darkgreen}p^{r}}{\color {red}(1-{\color {darkgreen}p})^{{\color {blue}n}-{\color {darkgreen}r}}}} [ 2] 由於其他序列的機率(其中一些 r {\displaystyle {\color {darkgreen}r}} 次成功發生在其他試驗中)是 相同 的,並且存在 ( n r ) {\displaystyle {\binom {\color {blue}n}{\color {darkgreen}r}}} 個不同的可能序列[ 3] , P ( { r successes in n trials } ) = ( n r ) p r ( 1 − p ) n − r . {\displaystyle \mathbb {P} (\{{\color {darkgreen}r}{\text{ successes in }}{\color {blue}n}{\text{ trials}}\})={\binom {\color {blue}n}{\color {darkgreen}r}}{\color {darkgreen}p}^{\color {darkgreen}r}{\color {red}(1-{\color {darkgreen}p})^{{\color {blue}n}-{\color {darkgreen}r}}}.} 這是一個隨機變數的機率質量函式,該隨機變數遵循 二項分佈 。
定義。 (二項分佈)
Binom ( 20 , 0.5 ) , Binom ( 20 , 0.7 ) {\displaystyle {\color {blue}\operatorname {Binom} (20,0.5)},{\color {green}\operatorname {Binom} (20,0.7)}} 和 Binom ( 40 , 0.5 ) {\displaystyle {\color {red}\operatorname {Binom} (40,0.5)}} 的機率質量函式。
隨機變數 X {\displaystyle X} 服從 二項分佈 ,具有 n {\displaystyle {\color {blue}n}} 個獨立的伯努利試驗和成功機率 p {\displaystyle {\color {darkgreen}p}} ,表示為 X ∼ Binom ( n , p ) {\displaystyle X\sim \operatorname {Binom} ({\color {blue}n},{\color {darkgreen}p})} ,如果其機率質量函式為 f ( x ; n , p ) = ( n x ) p x ( 1 − p ) n − x , x ∈ supp ( X ) = { 0 , 1 , 2 , … , n } . {\displaystyle f({\color {darkgreen}x};{\color {blue}n},{\color {darkgreen}p})={\binom {\color {blue}n}{\color {darkgreen}x}}{\color {darkgreen}p^{x}}{\color {red}(1-{\color {darkgreen}p})^{{\color {blue}n}-{\color {darkgreen}x}}},\quad {\color {darkgreen}x}\in \operatorname {supp} (X)=\{0,1,2,\dotsc ,{\color {blue}n}\}.}
Binom ( 20 , 0.5 ) , Binom ( 20 , 0.7 ) {\displaystyle {\color {blue}\operatorname {Binom} (20,0.5)},{\color {green}\operatorname {Binom} (20,0.7)}} 和 Binom ( 40 , 0.5 ) {\displaystyle {\color {red}\operatorname {Binom} (40,0.5)}} 的累積分佈函式。
伯努利分佈是 二項式 分佈的一個特例,如下所示
定義。 (伯努利分佈)
Ber ( 0.8 ) , Ber ( 0.2 ) {\displaystyle {\color {red}\operatorname {Ber} (0.8)},{\color {blue}\operatorname {Ber} (0.2)}} 和 Ber ( 0.5 ) {\displaystyle {\color {darkgreen}\operatorname {Ber} (0.5)}} 的 pmf。
一個隨機變數 X {\displaystyle X} 遵循成功機率為 p {\displaystyle {\color {darkgreen}p}} 的 伯努利分佈 ,記為 X ∼ Ber ( p ) {\displaystyle X\sim \operatorname {Ber} ({\color {darkgreen}p})} ,如果它的 pmf 是 f ( x ; p ) = p x ( 1 − p ) 1 − x , x ∈ supp ( X ) = { 0 , 1 } . {\displaystyle f({\color {darkgreen}x};{\color {darkgreen}p})={\color {darkgreen}p^{x}}{\color {red}(1-{\color {darkgreen}p})^{1-{\color {darkgreen}x}}},\quad {\color {darkgreen}x}\in \operatorname {supp} (X)=\{0,1\}.}
Ber ( 1 ) , Ber ( 0.8 ) , Ber ( 0.5 ) {\displaystyle {{\color {blue}\operatorname {Ber} (1)},\color {red}\operatorname {Ber} (0.8)},{\color {darkorange}\operatorname {Ber} (0.5)}} 和 Ber ( 0.3 ) {\displaystyle {\color {darkgreen}\operatorname {Ber} (0.3)}} 的 cdf。
備註。
Ber ( p ) = Binom ( 1 , p ) {\displaystyle \operatorname {Ber} ({\color {darkgreen}p})=\operatorname {Binom} (1,{\color {darkgreen}p})} .
這是一個伯努利 試驗,因此得名“伯努利 分佈”。
泊松分佈可以被看作是二項分佈的“極限情況”。
考慮 n {\displaystyle {\color {blue}n}} 個獨立的伯努利試驗,成功機率為 p = λ / n {\displaystyle {\color {darkgreen}p}=\lambda /{\color {blue}n}} 。根據二項分佈, P ( r successes in n trials ) = ( n r ) ( λ / n ) r ( 1 − λ / n ) n − r . {\displaystyle \mathbb {P} ({\color {darkgreen}r}{\text{ successes in }}{\color {blue}n}{\text{ trials}})={\binom {\color {blue}n}{\color {darkgreen}r}}{\color {darkgreen}(\lambda /{\color {blue}n})^{r}}{\color {red}(1-\lambda /{\color {blue}n})^{{\color {blue}n}-{\color {darkgreen}r}}}.}
After that, consider an unit time interval, with (positive) occurrence rate λ {\displaystyle \lambda } of a rare event (i.e. the mean of number of occurrence of the rare event is λ {\displaystyle \lambda } ). We can divide the unit time interval to n {\displaystyle {\color {blue}n}} time subintervals of time length 1 / n {\displaystyle 1/{\color {blue}n}} each. If n {\displaystyle {\color {blue}n}} is large and p {\displaystyle {\color {darkgreen}p}} is relatively small , such that the probability for occurrence of two or more rare events at a single time interval is negligible, then the probability for occurrence of exactly one rare event for each time subinterval is p = λ / n {\displaystyle {\color {darkgreen}p}=\lambda /{\color {blue}n}} by definition of mean. Then, we can view the unit time interval as a sequence of n {\displaystyle {\color {blue}n}} Bernoulli trials [ 4] with success probability p = λ / n {\displaystyle {\color {darkgreen}p}=\lambda /{\color {blue}n}} . After that, we can use Binom ( n , λ / n ) {\displaystyle \operatorname {Binom} {({\color {blue}n},\lambda /{\color {blue}n})}} to model the number of occurrences of rare event . To be more precise, P ( r successes in n trials ⏟ r rare events in the unit time ) = ( n r ) ( λ / n ) r ( 1 − λ / n ) n − r = n ( n − 1 ) ⋯ ( n − r + 1 ) r ! ( λ r / n r ) ( 1 − λ / n ) n − r = ( λ r / r ! ) ( 1 − 1 / n ⏟ → 0 as n → ∞ ) ⋯ ( 1 − ( r − 1 ) / n ⏟ → 0 as n → ∞ ) ⏞ → 1 as n → ∞ ( 1 − λ / n ) n − r ⏞ → n as n → ∞ ⏟ → e − λ as n → ∞ → e − λ λ r / r ! as n → ∞ . {\displaystyle {\begin{aligned}\mathbb {P} (\underbrace {{\color {darkgreen}r}{\text{ successes in }}{\color {blue}n}{\text{ trials}}} _{{\color {darkgreen}r}{\text{ rare events in the unit time}}})&={\binom {\color {blue}n}{\color {darkgreen}r}}{\color {darkgreen}(\lambda /{\color {blue}n})^{r}}{\color {red}(1-\lambda /{\color {blue}n})^{{\color {blue}n}-{\color {darkgreen}r}}}\\&={\frac {{\color {blue}n}({\color {blue}n}-1)\dotsb ({\color {blue}n}-{\color {darkgreen}r}+1)}{{\color {darkgreen}r}!}}(\lambda ^{\color {darkgreen}r}/{\color {blue}n}^{\color {darkgreen}r})(1-\lambda /{\color {blue}n})^{{\color {blue}n}-{\color {darkgreen}r}}\\&=(\lambda ^{\color {darkgreen}r}/{\color {darkgreen}r}!)\overbrace {(1-\underbrace {1/{\color {blue}n}} _{\to 0{\text{ as }}n\to \infty })\dotsb {\big (}1-\underbrace {({\color {darkgreen}r-1})/{\color {blue}n}} _{\to 0{\text{ as }}n\to \infty }{\big )}} ^{\to 1{\text{ as }}n\to \infty }\underbrace {(1-\lambda /{\color {blue}n})^{\overbrace {{\color {blue}n}-{\color {darkgreen}r}} ^{\to n{\text{ as }}n\to \infty }}} _{\to e^{-\lambda }{\text{ as }}n\to \infty }\\&\to e^{-\lambda }\lambda ^{\color {darkgreen}r}/{\color {darkgreen}r}!{\text{ as }}n\to \infty .\end{aligned}}} This is the pmf of a random variable following the Poisson distribution , and this result is known as the Poisson limit theorem (or law of rare events). We will introduce it formally after introducing the definition of Poisson distribution .
定義。 (泊松分佈)
Pois ( 1 ) , Pois ( 4 ) {\displaystyle {\color {darkorange}\operatorname {Pois} (1)},{\color {purple}\operatorname {Pois} (4)}} 和 Pois ( 10 ) {\displaystyle {\color {royalblue}\operatorname {Pois} (10)}} 的機率質量函式 (pmf)。
如果隨機變數 X {\displaystyle X} 服從引數為正數 λ {\displaystyle \lambda } 的泊松分佈 ,記為 X ∼ Pois ( λ ) {\displaystyle X\sim \operatorname {Pois} (\lambda )} ,那麼它的 pmf 為 f ( x ; λ ) = e − λ λ x / x ! , x ∈ supp ( X ) = { 0 , 1 , 2 , … } . {\displaystyle f({\color {darkgreen}x};\lambda )=e^{-\lambda }\lambda ^{\color {darkgreen}x}/{\color {darkgreen}x}!,\quad {\color {darkgreen}x}\in \operatorname {supp} (X)=\{0,1,2,\dotsc \}.}
Pois ( 1 ) , Pois ( 4 ) {\displaystyle {\color {darkorange}\operatorname {Pois} (1)},{\color {purple}\operatorname {Pois} (4)}} 和 Pois ( 10 ) {\displaystyle {\color {royalblue}\operatorname {Pois} (10)}} 的累積分佈函式 (CDF)。
備註。
因此,泊松分佈可用於近似大的 n {\displaystyle {\color {blue}n}} 和相對小的 p = λ / n {\displaystyle {\color {darkgreen}p}=\lambda /{\color {blue}n}} 的二項分佈。
考慮一個獨立伯努利試驗序列,其成功機率為 p {\displaystyle {\color {darkgreen}p}} 。 我們想計算機率 P ( { x failures before first success } ) {\displaystyle \mathbb {P} (\{{\color {red}x}{\text{ failures before first success}}\})} 。 透過考慮以下結果序列: F ⋯ F ⏟ x failures S , {\displaystyle {\color {red}\underbrace {F\cdots F} _{{\color {red}x}{\text{ failures}}}}{\color {darkgreen}S},} ,我們可以計算出 P ( { x failures before first success } ) = ( 1 − p ) x p , x ∈ supp ( X ) = { 0 , 1 , 2 , … } {\displaystyle \mathbb {P} (\{{\color {red}x}{\text{ failures before first success}}\})={\color {red}(1-{\color {darkgreen}p})^{x}}{\color {darkgreen}p},\quad {\color {red}x}\in \operatorname {supp} (X)=\{0,1,2,\dotsc \}} [ 5] 這是一個服從幾何分佈 的隨機變數的機率質量函式。
定義。 (幾何分佈)
Geo ( 0.2 ) , Geo ( 0.5 ) {\displaystyle {\color {green}\operatorname {Geo} (0.2)},{\color {blue}\operatorname {Geo} (0.5)}} 和 Geo ( 0.8 ) {\displaystyle {\color {red}\operatorname {Geo} (0.8)}} 的機率質量函式。
如果隨機變數 X {\displaystyle X} 服從引數為 p {\displaystyle {\color {darkgreen}p}} 的幾何分佈 ,記為 X ∼ Geo ( p ) {\displaystyle X\sim \operatorname {Geo} ({\color {darkgreen}p})} ,則其機率質量函式為 f ( x ; p ) = ( 1 − p ) x p , x ∈ supp ( X ) = { 0 , 1 , 2 , … } . {\displaystyle f({\color {red}x};{\color {darkgreen}p})={\color {red}(1-{\color {darkgreen}p})^{x}}{\color {darkgreen}p},\quad {\color {red}x}\in \operatorname {supp} (X)=\{0,1,2,\dotsc \}.}
Geo ( 0.2 ) , Geo ( 0.5 ) {\displaystyle {\color {green}\operatorname {Geo} (0.2)},{\color {blue}\operatorname {Geo} (0.5)}} 和 Geo ( 0.8 ) {\displaystyle {\color {red}\operatorname {Geo} (0.8)}} 的累積分佈函式。
備註。
從 f ( 0 ; p ) {\displaystyle f(0;{\color {darkgreen}p})} 開始,輸入值 x {\displaystyle {\color {red}x}} 依次遞增(即 p , ( 1 − p ) p , ( 1 − p ) 2 p , … {\displaystyle {\color {darkgreen}p},{\color {red}(1-{\color {darkgreen}p})}{\color {darkgreen}p},{\color {red}(1-{\color {darkgreen}p})^{2}}{\color {darkgreen}p},\dotsc } ) 構成一個 等比數列 ,因此得名“幾何 分佈”。
另一種定義是,機率質量函式為 ( 1 − p ) x − 1 p {\displaystyle (1-p)^{x-1}p} ,它是 P ( { x trials before first success } ) {\displaystyle \mathbb {P} (\{x{\text{ trials before first success}}\})} 的機率,其支撐集為 supp ( X ) = { 1 , 2 , … } {\displaystyle \operatorname {supp} (X)=\{1,2,\dotsc \}} 。
證明。 P ( X > m + n | X ≥ m ) = def P ( X > m + n ∩ X ≥ m ) ⏞ = X > m + n P ( X ≥ m ) = def p ( ( 1 − p ) m + n + 1 + ( 1 − p ) m + n + 2 + ⋯ ) p ( ( 1 − p ) m + ( 1 − p ) m + 1 + ⋯ ) = ( 1 − p ) m + n + 1 / ( 1 − ( 1 − p ) ) ( 1 − p ) m / ( 1 − ( 1 − p ) ) by geometric series formula = ( 1 − p ) n + 1 ⋅ p p = p ⋅ ( 1 − p ) n + 1 1 − ( 1 − p ) = p ( ( 1 − p ) n + 1 + ( 1 − p ) n + 2 + ⋯ ) by geometric series formula = def P ( X > n ) since X > n ⇔ X = n + 1 , n + 2 , … . {\displaystyle {\begin{aligned}\mathbb {P} (X>m+n|X\geq m)&{\overset {\text{ def }}{=}}{\frac {\mathbb {P} (\overbrace {X>m+n\cap X\geq m)} ^{=X>m+n}}{\mathbb {P} (X\geq m)}}\\&{\overset {\text{ def }}{=}}{\frac {{\cancel {p}}\left((1-p)^{m+n+1}+(1-p)^{m+n+2}+\dotsb \right)}{{\cancel {p}}\left((1-p)^{m}+(1-p)^{m+1}+\dotsb \right)}}\\&={\frac {(1-p)^{{\cancel {m}}+n+1}{\cancel {/{\big (}1-(1-p){\big )}}}}{{\cancel {(1-p)^{m}}}{\cancel {/{\big (}1-(1-p){\big )}}}}}&{\text{by geometric series formula}}\\&=(1-p)^{n+1}\cdot {\frac {\color {darkgreen}p}{\color {blue}p}}\\&={\color {darkgreen}p}\cdot {\frac {(1-p)^{n+1}}{\color {blue}1-(1-p)}}\\&={\color {darkgreen}p}\left((1-p)^{n+1}+(1-p)^{n+2}+\dotsb \right)&{\text{by geometric series formula}}\\&{\overset {\text{ def }}{=}}\mathbb {P} (X>n)&{\text{since }}X>n\Leftrightarrow X=n+1,n+2,\dotsc .\\\end{aligned}}}
特別是, X > m + n ∩ X ≥ m = X > m + n {\displaystyle X>m+n\cap X\geq m=X>m+n} 因為 X > m + n ⏟ X = m + n + 1 , m + n + 2 , … ⊊ X ≥ m ⏟ X = m , m + 1 , … {\displaystyle \underbrace {X>m+n} _{X=m+n+1,m+n+2,\dotsc }\subsetneq \underbrace {X\geq m} _{X=m,m+1,\dotsc }} .
◻ {\displaystyle \Box }
Consider a sequence of independent Bernoulli trials with success probability p {\displaystyle {\color {darkgreen}p}} . We would like to calculate the probability P ( { x failures before k th success } ) {\displaystyle \mathbb {P} (\{{\color {red}x}{\text{ failures before }}{\color {darkgreen}k}{\text{th success}}\})} . By considering this sequence of outcomes: F ⋯ F ⏟ x 1 failures S F ⋯ F ⏟ x 2 failures S ⋯ F ⋯ F ⏟ x k failures ⏞ x + k − 1 trials S ⏞ k th success , x 1 + x 2 + ⋯ + x k = x , {\displaystyle \overbrace {{\color {red}\underbrace {F\cdots F} _{x_{1}{\text{ failures}}}}{\color {darkgreen}S}{\color {red}\underbrace {F\cdots F} _{x_{2}{\text{ failures}}}}{\color {darkgreen}S}\cdots {\color {red}\underbrace {F\cdots F} _{x_{k}{\text{ failures}}}}} ^{{\color {red}x}+{\color {darkgreen}k}-1{\text{ trials}}}{\color {darkgreen}\overbrace {S} ^{k{\text{th success}}}},\quad {\color {red}x_{1}}+{\color {red}x_{2}}+\dotsb +{\color {red}x_{k}}={\color {red}x},} we can calculate that P ( { x failures before k th success } ) = ( 1 − p ) x p k , x ∈ supp ( X ) = { 0 , 1 , 2 , … } . {\displaystyle \mathbb {P} (\{{\color {red}x}{\text{ failures before }}{\color {darkgreen}k}{\text{th success}}\})={\color {red}(1-{\color {darkgreen}p})^{x}}{\color {darkgreen}p^{k}},\quad {\color {red}x}\in \operatorname {supp} (X)=\{0,1,2,\dotsc \}.} Since the probability of other sequences with some of x {\displaystyle {\color {red}x}} failures occuring in other trials (and some of k − 1 {\displaystyle {\color {darkgreen}k}-1} successes (excluding the k {\displaystyle {\color {darkgreen}k}} th success, which must occur in the last trial) occuring in other trials), is the same , and there are ( x + k − 1 x ) {\displaystyle {\binom {{\color {red}x}+{\color {darkgreen}k}-1}{\color {red}x}}} (or ( x + k − 1 k − 1 ) {\displaystyle {\binom {{\color {red}x}+{\color {darkgreen}k}-1}{{\color {green}k}-1}}} , which is the same numerically) distinct possible sequences [ 6] , P ( { x failures before k th success } ) = ( x + k − 1 x ) ( 1 − p ) x p k , x ∈ supp ( X ) = { 0 , 1 , 2 , … } . {\displaystyle \mathbb {P} (\{{\color {red}x}{\text{ failures before }}{\color {darkgreen}k}{\text{th success}}\})={\binom {{\color {red}x}+{\color {darkgreen}k}-1}{\color {red}x}}{\color {red}(1-{\color {darkgreen}p})^{x}}{\color {darkgreen}p^{k}},\quad {\color {red}x}\in \operatorname {supp} (X)=\{0,1,2,\dotsc \}.} This is the pmf of a random variable following the negative binomial distribution .
定義. (負二項分佈)
NB ( 10 , 0.9 ) , NB ( 10 , 0.8 ) , NB ( 10 , 0.5 ) {\displaystyle {\color {darkblue}\operatorname {NB} (10,0.9)},{\color {red}\operatorname {NB} (10,0.8)},{\color {darkorange}\operatorname {NB} (10,0.5)}} 和 NB ( 10 , 0.3 ) {\displaystyle {\color {darkgreen}\operatorname {NB} (10,0.3)}} 的 pmf。
隨機變數 X {\displaystyle X} 遵循 負二項分佈 ,其 成功機率 為 p {\displaystyle {\color {darkgreen}p}} ,記為 X ∼ NB ( k , p ) {\displaystyle X\sim \operatorname {NB} ({\color {darkgreen}k,p})} ,如果它的 pmf 為 f ( x ; k , p ) = ( x + k − 1 x ) ( 1 − p ) x p k , x ∈ supp ( X ) = { 0 , 1 , 2 , … } . {\displaystyle f({\color {red}x};{\color {darkgreen}k,p})={\binom {{\color {red}x}+{\color {darkgreen}k}-1}{\color {red}x}}{\color {red}(1-{\color {darkgreen}p})^{x}}{\color {darkgreen}p^{k}},\quad {\color {red}x}\in \operatorname {supp} (X)=\{0,1,2,\dotsc \}.}
NB ( 10 , 0.9 ) , NB ( 10 , 0.8 ) , NB ( 10 , 0.5 ) {\displaystyle {\color {royalblue}\operatorname {NB} (10,0.9)},{\color {red}\operatorname {NB} (10,0.8)},{\color {darkorange}\operatorname {NB} (10,0.5)}} 和 NB ( 10 , 0.3 ) {\displaystyle {\color {darkgreen}\operatorname {NB} (10,0.3)}} 的 cdf。
考慮從總體大小為 N {\displaystyle N} 的總體中,不放回地抽取大小為 n {\displaystyle n} 的樣本,該總體包含 K {\displaystyle K} 個型別 1 的物件和 N − K {\displaystyle N-K} 個其他型別的物件。那麼,機率 P ( { k type 1 objects are found when n objects are drawn from N objects } ) = ( K k ) ⏟ type 1 ( N − K n − k ) ⏞ another type / ( N n ) ⏟ all outcomes , k ∈ { max { n − N + K , 0 } , … , min { K , n } } {\displaystyle \mathbb {P} (\{k{\text{ type 1 objects are found when }}n{\text{ objects are drawn from }}N{\text{ objects}}\})=\underbrace {\binom {K}{k}} _{\text{type 1}}\overbrace {\binom {N-K}{n-k}} ^{\text{another type}}{\bigg /}\underbrace {\binom {N}{n}} _{\text{all outcomes}},\quad k\in {\big \{}\max\{n-N+K,0\},\dotsc ,\min {\{K,n\}}{\big \}}} [ 7] .
( K k ) {\displaystyle {\binom {K}{k}}} : 從 K {\displaystyle K} 個(可區分的)型別 1 的物件中,不放回地選擇 k {\displaystyle k} 個物件的無序選擇;
( N − K n − k ) {\displaystyle {\binom {N-K}{n-k}}} : 從 N − K {\displaystyle N-K} 個(可區分的)其他型別的物件中,不放回地選擇 n − k {\displaystyle n-k} 個物件的無序選擇;
( N n ) {\displaystyle {\binom {N}{n}}} : 從 N {\displaystyle N} 個(可區分的)物件中,不放回地選擇 n {\displaystyle n} 個物件的無序選擇。
這是一個遵循 超幾何分佈 的隨機變數的 pmf。
定義。 (超幾何分佈)
HypGeo ( 500 , 50 , 100 ) , HypGeo ( 500 , 60 , 200 ) {\displaystyle {\color {blue}\operatorname {HypGeo} (500,50,100)},{\color {darkgreen}\operatorname {HypGeo} (500,60,200)}} 和 HypGeo ( 500 , 70 , 300 ) {\displaystyle {\color {red}\operatorname {HypGeo} (500,70,300)}} 的機率質量函式。
隨機變數 X {\displaystyle X} 服從 超幾何分佈 ,其中從包含 K {\displaystyle K} 個型別 1 物件和 N − K {\displaystyle N-K} 個其他型別物件的集合中抽取 n {\displaystyle n} 個物件,記為 X ∼ HypGeo ( N , K , n ) {\displaystyle X\sim \operatorname {HypGeo} (N,K,n)} ,如果它的機率質量函式是 f ( k ; N , K , n ) = ( K k ) ( N − K n − k ) / ( N n ) , k ∈ supp ( X ) = { max { n − N + K , 0 } , … , min { K , n } } . {\displaystyle f(k;N,K,n)={\binom {K}{k}}{\binom {N-K}{n-k}}{\bigg /}{\binom {N}{n}},\quad k\in \operatorname {supp} (X)={\big \{}\max\{n-N+K,0\},\dotsc ,\min {\{K,n\}}{\big \}}.} 。
HypGeo ( 500 , 50 , 100 ) , HypGeo ( 500 , 60 , 200 ) {\displaystyle {\color {blue}\operatorname {HypGeo} (500,50,100)},{\color {darkgreen}\operatorname {HypGeo} (500,60,200)}} 和 HypGeo ( 500 , 70 , 300 ) {\displaystyle {\color {red}\operatorname {HypGeo} (500,70,300)}} 的累積分佈函式。
備註。
機率質量函式有點類似於 超幾何 級數[ 8] ,因此得名 “超幾何 分佈”。
這種型別的分佈是所有具有有限支撐的離散分佈的推廣,例如伯努利分佈和超幾何分佈。
這種型別分佈的另一個特例是 離散均勻分佈 ,它類似於 連續均勻分佈 (將在後面討論)。
定義。 (有限離散分佈) 隨機變數 X {\displaystyle X} 服從向量 x = ( x 1 , … , x n ) T {\displaystyle \mathbf {x} =(x_{1},\dotsc ,x_{n})^{T}} 和機率向量 p = ( p 1 , … , p n ) T , p 1 , … , and p n ≥ 0 , p 1 + ⋯ + p n = 1 {\displaystyle \mathbf {p} =(p_{1},\dotsc ,p_{n})^{T},\quad p_{1},\dotsc ,{\text{ and }}p_{n}\geq 0,p_{1}+\dotsb +p_{n}=1} 的 有限離散分佈 ,記作 X ∼ FD ( x , p ) {\displaystyle X\sim \operatorname {FD} (\mathbf {x} ,\mathbf {p} )} ,如果它的機率質量函式為 f ( x i ; p ) = p i , i = 1 , … , or n . {\displaystyle f(x_{i};\mathbf {p} )=p_{i},\quad i=1,\dotsc ,{\text{ or }}n.}
備註。
對於均值和方差,我們可以直接根據定義進行計算。有限離散分佈沒有特殊的公式。
定義。 (離散均勻分佈) 離散均勻分佈 ,記作 D U { x 1 , … , x n } {\displaystyle \operatorname {D} {\mathcal {U}}\{x_{1},\dotsc ,x_{n}\}} ,是指 FD ( x , p ) , p = ( 1 n , … , 1 n ⏟ n times ) T {\displaystyle \operatorname {FD} (\mathbf {x} ,\mathbf {p} ),\quad \mathbf {p} ={\bigg (}\underbrace {{\frac {1}{n}},\dotsc ,{\frac {1}{n}}} _{n{\text{ times}}}{\bigg )}^{T}} .
備註。
它的機率質量函式為 f ( x i ) = 1 n , i = 1 , … , or n . {\displaystyle f(x_{i})={\frac {1}{n}},\quad i=1,\dotsc ,{\text{ or }}n.}
示例。 假設隨機變數 X ∼ FD ( ( 1 , 2 , 3 ) T , ( 0.2 , 0.3 , 0.5 ) T ) {\displaystyle X\sim \operatorname {FD} {\big (}(1,2,3)^{T},(0.2,0.3,0.5)^{T}{\big )}} 。 然後, P ( X = 1 ) = 0.2 , P ( X = 2 ) = 0.3 , and P ( X = 3 ) = 0.5. {\displaystyle \mathbb {P} (X=1)=0.2,\mathbb {P} (X=2)=0.3,{\text{ and }}\mathbb {P} (X=3)=0.5.} 機率質量函式的示意圖
|
| *
| |
| * |
| * | |
| | | |
*----*----*----*-------
1 2 3
示例。 假設隨機變數 X ∼ D U { 1 , 2 , 3 } {\displaystyle X\sim \operatorname {D} {\mathcal {U}}\{1,2,3\}} 。 然後, P ( X = 1 ) = P ( X = 2 ) = P ( X = 3 ) = 1 3 . {\displaystyle \mathbb {P} (X=1)=\mathbb {P} (X=2)=\mathbb {P} (X=3)={\frac {1}{3}}.} 機率質量函式的示意圖
|
|
|
| * * *
| | | |
| | | |
*----*----*----*-------
1 2 3
練習。
連續均勻分佈 是“無偏好”的模型,即其支撐集上所有長度相同的區間都具有相同的機率 [ 9] (可以從對應於連續均勻分佈的機率密度函式中看出)。還存在離散 均勻分佈,但它不如連續 均勻分佈重要。因此,從現在開始,簡稱為“均勻分佈”是指連續 分佈,而不是離散分佈。
定義。 (均勻分佈)
U [ a , b ] {\displaystyle {\color {dodgerblue}{\mathcal {U}}[a,b]}} .
如果隨機變數 X {\displaystyle X} 遵循 均勻分佈 ,用 X ∼ U [ a , b ] {\displaystyle X\sim {\mathcal {U}}[a,b]} 表示,如果其 pdf 為 f ( x ) = 1 / ( b − a ) , x ∈ supp ( X ) = [ a , b ] , and a ≤ b . {\displaystyle f(x)=1/(b-a),\quad x\in \operatorname {supp} (X)=[a,b],{\text{ and }}a\leq b.}
備註。
U [ a , b ] {\displaystyle {\mathcal {U}}[a,b]} 的支援也可以是 [ a , b ) , ( a , b ] {\displaystyle [a,b),(a,b]} 或 ( a , b ) {\displaystyle (a,b)} ,不會影響相關事件的機率,因為使用 pdf 在一個 單一 點上計算的機率總是 零 。
U [ 0 , 1 ] {\displaystyle {\mathcal {U}}[0,1]} 是 標準均勻分佈 。
命題。
U [ a , b ] {\displaystyle {\color {dodgerblue}{\mathcal {U}}[a,b]}} 的 cdf。
(均勻分佈的 cdf) U [ a , b ] {\displaystyle {\mathcal {U}}[a,b]} 的 cdf 為 F ( x ) = { 0 , x < a ; ( x − a ) / ( b − a ) , a ≤ x ≤ b ; 1 , x > b . {\displaystyle F(x)={\begin{cases}0,&x<a;\\(x-a)/(b-a),&a\leq x\leq b;\\1,&x>b.\end{cases}}}
證明。 F ( x ) = ∫ − ∞ x 1 { a ≤ x ≤ b } b − a d y = 1 b − a ∫ a x 1 { a ≤ x ≤ b } d y = { 0 / ( b − a ) , x < a ; [ y ] a x / ( b − a ) , a ≤ x ≤ b ; [ y ] a b / ( b − a ) , x > b . {\displaystyle F(x)=\int _{-\infty }^{x}{\frac {\mathbf {1} \{a\leq x\leq b\}}{b-a}}\,dy={\frac {1}{b-a}}\int _{a}^{x}\mathbf {1} \{a\leq x\leq b\}\,dy={\begin{cases}0/(b-a),&x<a;\\[][y]_{a}^{x}/(b-a),&a\leq x\leq b;\\[][y]_{a}^{b}/(b-a),&x>b.\end{cases}}} 然後,結果就出來了。
◻ {\displaystyle \Box }
帶有速率引數 λ {\displaystyle \lambda } 的 指數 分佈通常用於描述速率為 λ {\displaystyle \lambda } 的罕見事件的 到達時間間隔 。
與 泊松 分佈相比,指數 分佈描述了罕見事件的到達時間間隔,而 泊松 分佈描述了在固定時間間隔內罕見事件發生的 數量 。
根據 速率 的定義,當 速率 ↑ {\displaystyle \uparrow } 時,到達時間間隔 ↓ {\displaystyle \downarrow } (即,罕見事件的頻率 ↑ {\displaystyle \uparrow } )。
因此,我們希望當 λ ↑ {\displaystyle \lambda \uparrow } 時,pdf 更偏向左側(即,當 λ ↑ {\displaystyle \lambda \uparrow } 時,pdf 對較小的 x {\displaystyle x} 有更高的值),以便當 λ ↑ {\displaystyle \lambda \uparrow } 時,包含較小 x {\displaystyle x} 值的區間的 pdf 下的面積 ↑ {\displaystyle \uparrow } 。
此外,由於速率 λ {\displaystyle \lambda } 恆定,到達時間間隔不太可能出現更高的值。因此,直觀地說,我們也希望 pdf 是一個嚴格的 遞減 函式,以便當 x ↑ {\displaystyle x\uparrow } 時,所涉及的機率(pdf 在某個區間的下的面積) ↓ {\displaystyle \downarrow } 。
如我們所見,指數分佈的 pdf 滿足這兩個性質。
證明。 假設 X ∼ Exp ( λ ) {\displaystyle X\sim \operatorname {Exp} (\lambda )} . X {\displaystyle X} 的累積分佈函式為 F ( x ) = ∫ − ∞ x λ e − λ y 1 { y ≥ 0 } d y = { ∫ 0 x λ e − λ y d y , x ≥ 0 ; 0 , x < 0 ( When x < 0 , x ∉ supp ( X ) , so F ( x ) = P ( X ≤ x ) = 0 ) = 1 { x ≥ 0 } λ ∫ 0 x e − λ y d y = 1 { x ≥ 0 } λ − λ [ e − λ y ] 0 x = − 1 { x ≥ 0 } ( e − λ x − 1 ) = ( 1 − e − λ x ) 1 { x ≥ 0 } . {\displaystyle {\begin{aligned}F(x)&=\int _{-\infty }^{x}\lambda e^{-\lambda y}\mathbf {1} \{y\geq 0\}\,dy\\&={\begin{cases}\int _{0}^{x}\lambda e^{-\lambda y}\,dy,&x\geq 0;\\0,&x<0\\\end{cases}}&\left({\text{When }}x<0,x\notin \operatorname {supp} (X),{\text{ so }}F(x)=\mathbb {P} (X\leq x)=0\right)\\&=\mathbf {1} \{x\geq 0\}\lambda \int _{0}^{x}e^{-\lambda y}\,dy\\&=\mathbf {1} \{x\geq 0\}{\frac {\lambda }{-\lambda }}[e^{-\lambda }y]_{0}^{x}\\&=-\mathbf {1} \{x\geq 0\}(e^{-\lambda x}-1)\\&=(1-e^{-\lambda x})\mathbf {1} \{x\geq 0\}.\\\end{aligned}}}
◻ {\displaystyle \Box }
證明。 P ( X > s + t | X > s ) = def P ( X > s + t ∩ X > s ) P ( X > s ) = P ( X > s + t ) P ( X > s ) = 1 − ( 1 − e − λ ( s + t ) ) 1 − ( 1 − e − λ s ) = e − λ ( s + t ) e − λ s = e − λ t = P ( X > t ) . {\displaystyle \mathbb {P} (X>s+t|X>s){\overset {\text{ def }}{=}}{\frac {\mathbb {P} (X>s+t\cap X>s)}{\mathbb {P} (X>s)}}={\frac {\mathbb {P} (X>s+t)}{\mathbb {P} (X>s)}}={\frac {1-(1-e^{-\lambda (s+t)})}{1-(1-e^{-\lambda s})}}={\frac {e^{-\lambda (s+t)}}{e^{-\lambda s}}}=e^{-\lambda t}=\mathbb {P} (X>t).}
◻ {\displaystyle \Box }
Gamma 分佈是廣義的指數 分佈,從某種意義上說,我們也可以改變形狀 的指數 分佈的 pdf。
定義。 (Gamma 分佈)
Gamma ( 1 , 1 ) , Gamma ( 2 , 1 ) , Gamma ( 3 , 1 ) {\displaystyle {\color {red}\operatorname {Gamma} (1,1)},{\color {green}\operatorname {Gamma} (2,1)},{\color {blue}\operatorname {Gamma} (3,1)}} 和 Gamma ( 3 , 0.5 ) {\displaystyle {\color {magenta}\operatorname {Gamma} (3,0.5)}} 的 pdf。
隨機變數 X {\displaystyle X} 服從 伽馬分佈 ,其中 形狀 引數 α {\displaystyle \alpha } 為正數,速率 引數 λ {\displaystyle \lambda } 為正數,記為 X ∼ Gamma ( α , λ ) {\displaystyle X\sim \operatorname {Gamma} (\alpha ,\lambda )} ,如果其機率密度函式為 f ( x ) = λ α x α − 1 e − λ x Γ ( α ) , x ∈ supp ( X ) = [ 0 , ∞ ) . {\displaystyle f(x)={\frac {\lambda ^{\alpha }x^{\alpha -1}e^{-\lambda x}}{\Gamma (\alpha )}},\quad x\in \operatorname {supp} (X)=[0,\infty ).}
Gamma ( 1 , 1 ) , Gamma ( 2 , 1 ) , Gamma ( 3 , 1 ) {\displaystyle {\color {red}\operatorname {Gamma} (1,1)},{\color {green}\operatorname {Gamma} (2,1)},{\color {blue}\operatorname {Gamma} (3,1)}} 和 Gamma ( 3 , 0.5 ) {\displaystyle {\color {magenta}\operatorname {Gamma} (3,0.5)}} 的累積分佈函式。
貝塔 分佈是 U [ 0 , 1 ] {\displaystyle {\mathcal {U}}[0,1]} 的推廣,因為我們可以使用 兩個形狀引數 來改變機率密度函式的 形狀 。
定義。 (貝塔分佈)
以下是 Beta ( 0.5 , 0.5 ) , Beta ( 5 , 1 ) , Beta ( 1 , 3 ) {\displaystyle {\color {red}\operatorname {Beta} (0.5,0.5)},{\color {royalblue}\operatorname {Beta} (5,1)},{\color {green}\operatorname {Beta} (1,3)}} , Beta ( 2 , 2 ) {\displaystyle {\color {purple}\operatorname {Beta} (2,2)}} 和 Beta ( 2 , 5 ) {\displaystyle {\color {darkorange}\operatorname {Beta} (2,5)}} 的 PDF 檔案。
隨機變數 X {\displaystyle X} 遵循 beta 分佈 ,其正形狀引數為 α {\displaystyle \alpha } 和 β {\displaystyle \beta } ,記為 X ∼ Beta ( α , β ) {\displaystyle X\sim \operatorname {Beta} (\alpha ,\beta )} ,如果其 PDF 為 f ( x ) = Γ ( α + β ) Γ ( α ) Γ ( β ) x α − 1 ( 1 − x ) β − 1 , x ∈ supp ( X ) = [ 0 , 1 ] . {\displaystyle f(x)={\frac {\Gamma (\alpha +\beta )}{\Gamma (\alpha )\Gamma (\beta )}}x^{\alpha -1}(1-x)^{\beta -1},\quad x\in \operatorname {supp} (X)=[0,1].}
以下是 Beta ( 0.5 , 0.5 ) , Beta ( 5 , 1 ) , Beta ( 1 , 3 ) {\displaystyle {\color {red}\operatorname {Beta} (0.5,0.5)},{\color {royalblue}\operatorname {Beta} (5,1)},{\color {green}\operatorname {Beta} (1,3)}} , Beta ( 2 , 2 ) {\displaystyle {\color {purple}\operatorname {Beta} (2,2)}} 和 Beta ( 2 , 5 ) {\displaystyle {\color {darkorange}\operatorname {Beta} (2,5)}} 的 CDF 檔案。
備註。
Beta ( 1 , 1 ) ≡ U [ 0 , 1 ] {\displaystyle \operatorname {Beta} (1,1)\equiv {\mathcal {U}}[0,1]} ,因為 Beta ( 1 , 1 ) {\displaystyle \operatorname {Beta} (1,1)} 的 PDF 為
f ( x ) = Γ ( 2 ) ⏞ = 1 ! = 1 Γ ( 1 ) ⏟ = 0 ! = 1 Γ ( 1 ) x 1 − 1 ( 1 − x ) 1 − 1 1 { 0 ≤ x ≤ 1 } = 1 { 0 ≤ x ≤ 1 } , {\displaystyle f(x)={\frac {\overbrace {\Gamma (2)} ^{=1!=1}}{\underbrace {\Gamma (1)} _{=0!=1}\Gamma (1)}}x^{1-1}(1-x)^{1-1}\mathbf {1} \{0\leq x\leq 1\}=\mathbf {1} \{0\leq x\leq 1\},}
這是 U [ 0 , 1 ] {\displaystyle {\mathcal {U}}[0,1]} 的 pdf。
柯西分佈是一種 重尾 分佈 [ 10] 。因此,它是一個“病態”分佈,因為它的某些性質違反直覺,例如,儘管它的均值和方差在直接觀察其圖形時 似乎 是定義的,但它卻並沒有定義均值和方差。
備註。
此定義指的是柯西分佈的一個 特例 。更準確地說,柯西分佈的完整定義中還包括 尺度 引數,而這裡 pdf 中的尺度引數被設定為 1。
Pdf 關於 θ {\displaystyle \theta } 對稱,因為 f ( θ + x ) = f ( θ − x ) {\displaystyle f(\theta +x)=f(\theta -x)} .
正態分佈或高斯分佈是一個美麗的事物,它出現在自然界的許多地方。這可能是因為樣本均值或樣本和經常 近似 遵循 正態 分佈,這是由 中心極限定理 決定的。因此,正態 分佈在統計學中非常重要。
定義。 (正態分佈)
N ( 0 , 0.2 ) , N ( 0 , 1 ) , N ( 0 , 5 ) {\displaystyle {\color {blue}{\mathcal {N}}(0,0.2)},{\color {red}{\mathcal {N}}(0,1)},{\color {darkorange}{\mathcal {N}}(0,5)}} 和 N ( − 2 , 0.5 ) {\displaystyle {\color {darkgreen}{\mathcal {N}}(-2,0.5)}} 的 pdf。
隨機變數 X {\displaystyle X} 服從 正態分佈 ,其 均值 為 μ {\displaystyle \mu } ,方差 為 σ 2 {\displaystyle \sigma ^{2}} ,記作 X ∼ N ( μ , σ 2 ) {\displaystyle X\sim {\mathcal {N}}(\mu ,\sigma ^{2})} ,如果其機率密度函式為 f ( x ) = 1 2 π σ 2 exp ( − ( x − μ ) 2 2 σ 2 ) , x ∈ supp ( X ) = R . {\displaystyle f(x)={\frac {1}{\sqrt {2\pi \sigma ^{2}}}}\exp \left(-{\frac {(x-\mu )^{2}}{2\sigma ^{2}}}\right),\quad x\in \operatorname {supp} (X)=\mathbb {R} .}
N ( 0 , 0.2 ) , N ( 0 , 1 ) , N ( 0 , 5 ) {\displaystyle {\color {blue}{\mathcal {N}}(0,0.2)},{\color {red}{\mathcal {N}}(0,1)},{\color {darkorange}{\mathcal {N}}(0,5)}} 和 N ( − 2 , 0.5 ) {\displaystyle {\color {darkgreen}{\mathcal {N}}(-2,0.5)}} 的累積分佈函式。
以下分佈在統計學中尤為重要,它們都與正態分佈有關。我們將簡要介紹它們。
卡方 分佈是伽馬分佈的一個特例,也與標準正態 分佈有關。
定義。 (卡方分佈)
的 pdf χ 1 2 , χ 2 2 , χ 3 2 , χ 4 2 , χ 6 2 {\displaystyle {\color {darkorange}\chi _{1}^{2}},{\color {green}\chi _{2}^{2}},{\color {royalblue}\chi _{3}^{2}},{\color {blue}\chi _{4}^{2}},{\color {purple}\chi _{6}^{2}}} 和 χ 9 2 {\displaystyle {\color {red}\chi _{9}^{2}}} 。
具有正的自由度的卡方分佈 ν {\displaystyle {\color {blue}\nu }} ,表示為 χ ν 2 {\displaystyle \chi _{\color {blue}\nu }^{2}} ,是 Z 1 2 + ⋯ + Z ν 2 {\displaystyle Z_{1}^{2}+\dotsb +Z_{\color {blue}\nu }^{2}} 的分佈,其中 Z 1 , … , Z ν {\displaystyle Z_{1},\dotsc ,Z_{\color {blue}\nu }} 是獨立同分布的,並且它們都遵循 N ( 0 , 1 ) {\displaystyle {\mathcal {N}}(0,1)} 。
的 cdf χ 1 2 , χ 2 2 , χ 3 2 , χ 4 2 , χ 6 2 {\displaystyle {\color {darkorange}\chi _{1}^{2}},{\color {green}\chi _{2}^{2}},{\color {royalblue}\chi _{3}^{2}},{\color {blue}\chi _{4}^{2}},{\color {purple}\chi _{6}^{2}}} 和 χ 9 2 {\displaystyle {\color {red}\chi _{9}^{2}}} 。
學生t分佈 與 卡方 分佈和 正態 分佈有關。
定義. (學生 t {\displaystyle t} 分佈)
t 1 , t 2 , t 5 {\displaystyle {\color {darkorange}t_{1}},{\color {purple}t_{2}},{\color {royalblue}t_{5}}} 和 t ∞ {\displaystyle t_{\infty }} 的pdf。
帶有 ν {\displaystyle {\color {blue}\nu }} 個自由度的 學生 t {\displaystyle t} -分佈 ,記為 t ν {\displaystyle t_{\color {blue}\nu }} ,是 Z Y / ν {\displaystyle {\frac {Z}{\sqrt {Y/{\color {blue}\nu }}}}} 的分佈,其中 Y ∼ χ ν 2 {\displaystyle Y\sim \chi _{\color {blue}\nu }^{2}} 且 Z ∼ N ( 0 , 1 ) {\displaystyle Z\sim {\mathcal {N}}(0,1)} .
t 1 , t 2 , t 5 {\displaystyle {\color {darkorange}t_{1}},{\color {purple}t_{2}},{\color {royalblue}t_{5}}} 和 t ∞ {\displaystyle t_{\infty }} 的累積分佈函式。
F {\displaystyle F} 分佈在某種程度上是廣義的學生 t {\displaystyle t} 分佈,因為它多了一個可變引數來表示另一個自由度。
定義。 ( F {\displaystyle F} 分佈) 具有 ν 1 {\displaystyle {\color {red}\nu _{1}}} 和 ν 2 {\displaystyle {\color {blue}\nu _{2}}} 自由度的 F {\displaystyle F} -分佈 ,記為 F ν 1 , ν 2 {\displaystyle F_{{\color {red}\nu _{1}},{\color {blue}\nu _{2}}}} ,是 X 1 / ν 1 X 2 / ν 2 {\displaystyle {\frac {X_{1}/{\color {red}\nu _{1}}}{X_{2}/{\color {blue}\nu _{2}}}}} 的分佈,其中 X 1 ∼ χ ν 1 2 {\displaystyle X_{1}\sim \chi _{\color {red}\nu _{1}}^{2}} 且 X 2 ∼ χ ν 2 2 {\displaystyle X_{2}\sim \chi _{\color {blue}\nu _{2}}^{2}} .
F 1 , 1 , F 2 , 1 , F 5 , 2 , F 10 , 1 {\displaystyle {\color {red}F_{1,1}},F_{2,1},{\color {blue}F_{5,2}},{\color {green}F_{10,1}}} 和 F 100 , 100 {\displaystyle {\color {dimgray}F_{100,100}}} 的 PDF。
F 1 , 1 , F 2 , 1 , F 5 , 2 , F 10 , 1 {\displaystyle {\color {red}F_{1,1}},F_{2,1},{\color {blue}F_{5,2}},{\color {green}F_{10,1}}} 和 F 100 , 100 {\displaystyle {\color {dimgray}F_{100,100}}} 的累積分佈函式。
如果您想了解卡方分佈 、學生 t {\displaystyle t} -分佈 和 F {\displaystyle F} -分佈 在統計學中的用途,您可以簡要瀏覽一下,例如,統計學/區間估計 (置信區間構建中的應用)和 統計學/假設檢驗 (假設檢驗中的應用)。
多項式分佈是廣義 二項式分佈,因為每次試驗的結果不止兩種。
假設有 n {\displaystyle n} 個物件要分配到 k {\displaystyle k} 個單元格,每個物件獨立分配到一個且僅一個 單元格,分配到第 i {\displaystyle i} 個單元格的機率為 p i {\displaystyle p_{i}} ( i = 1 , 2 , … , k {\displaystyle i=1,2,\dotsc ,k} ) [ 12] 。設 X i {\displaystyle X_{i}} 為分配到第 i {\displaystyle i} 個單元格的物件數量。我們想計算機率 P ( X = def ( X 1 , … , X k ) T = x = def ( x 1 , … , x k ) T ) {\displaystyle \mathbb {P} {\big (}\mathbf {X} {\overset {\text{ def }}{=}}(X_{1},\dotsc ,X_{k})^{T}=\mathbf {x} {\overset {\text{ def }}{=}}(x_{1},\dotsc ,x_{k})^{T}{\big )}} ,即第 i {\displaystyle i} 個單元格有 x i {\displaystyle x_{i}} 個物件的機率。
我們可以將每個分配視為一個獨立的試驗,有 k {\displaystyle k} 種結果(因為它只能分配到 k {\displaystyle k} 個單元格中的一個)。我們可以認識到,對 n {\displaystyle n} 個物件的分配是將 n {\displaystyle n} 個物件劃分為 k {\displaystyle k} 組。因此,有 ( n x 1 , … , x k ) {\displaystyle {\binom {n}{x_{1},\dotsc ,x_{k}}}} 種分配方式。
所以, P ( X = x ) = ( n x 1 , … , x k ) p 1 x 1 ⋯ p k x k . {\displaystyle \mathbb {P} (\mathbf {X} =\mathbf {x} )={\binom {n}{x_{1},\dotsc ,x_{k}}}p_{1}^{x_{1}}\dotsb p_{k}^{x_{k}}.} 特別地,將 x i {\displaystyle x_{i}} 個物件分配到第 i {\displaystyle i} 個單元格的機率是 p i x i {\displaystyle p_{i}^{x_{i}}} ,根據獨立性,因此將 n {\displaystyle n} 個物件分配到 k {\displaystyle k} 個單元格的特定分配情況的機率為 p 1 x 1 ⋯ p k x k {\displaystyle p_{1}^{x_{1}}\dotsb p_{k}^{x_{k}}} ,根據獨立性。
定義. (多項式分佈) 一個隨機向量 X = ( X 1 , … , X k ) T {\displaystyle \mathbf {X} =(X_{1},\dotsc ,X_{k})^{T}} 遵循多項式分佈 ,其中有 n {\displaystyle n} 次試驗和機率向量 p = ( p 1 , … , p k ) T {\displaystyle \mathbf {p} =(p_{1},\dotsc ,p_{k})^{T}} ,記為 X ∼ Multinom ( n , p ) {\displaystyle \mathbf {X} \sim \operatorname {Multinom} (n,\mathbf {p} )} ,如果其聯合機率質量函式為 f X ( x 1 , … , x k ; n , p ) = ( n x 1 , … , x k ) p 1 x 1 ⋯ p k x k , x 1 , … , x k ≥ 0 , and x 1 + ⋯ + x k = n . {\displaystyle f_{\mathbf {X} }(x_{1},\dotsc ,x_{k};n,\mathbf {p} )={\binom {n}{x_{1},\dotsc ,x_{k}}}p_{1}^{x_{1}}\dotsb p_{k}^{x_{k}},\quad x_{1},\dotsc ,x_{k}\geq 0,{\text{ and }}x_{1}+\dotsb +x_{k}=n.}
備註。
Multinom ( n , p ) ≡ Binom ( n , p ) {\displaystyle \operatorname {Multinom} (n,\mathbf {p} )\equiv \operatorname {Binom} (n,p)} 如果 p = ( p , 1 − p ) T {\displaystyle \mathbf {p} =(p,1-p)^{T}} .
在這種情況下,如果 ( X 1 , X 2 ) T ∼ Multinom ( n , p ) {\displaystyle (X_{1},X_{2})^{T}\sim \operatorname {Multinom} (n,\mathbf {p} )} , X 1 {\displaystyle X_{1}} 是二項式分佈的成功次數(而 X 2 ( = n − X 1 ) {\displaystyle X_{2}(=n-X_{1})} 是失敗次數)。
此外, X i ∼ Binom ( n , p i ) {\displaystyle X_{i}\sim \operatorname {Binom} (n,p_{i})} 。可以從將物件分配到第 i {\displaystyle i} 個單元格作為“成功”來看出,對於每個單個物件的分配[ 13] 。然後,成功的機率為 p i {\displaystyle p_{i}} 。
多元 正態分佈,顧名思義,是正態分佈(單變數)的多變數(以及推廣)版本。
Definition. (Multivariate normal distribution) A random vector X = ( X 1 , … , X k ) T {\displaystyle \mathbf {X} =(X_{1},\dotsc ,X_{k})^{T}} follows the k {\displaystyle k} -dimensional normal distribution with mean vector μ {\displaystyle {\boldsymbol {\mu }}} and covariance matrix Σ {\displaystyle {\boldsymbol {\Sigma }}} , denoted by X ∼ N k ( μ , Σ ) {\displaystyle \mathbf {X} \sim {\mathcal {N}}_{k}({\boldsymbol {\mu }},{\boldsymbol {\Sigma }})} [ 14] if its joint pdf is f X ( x 1 , … , x k ; μ , Σ ) = exp ( − ( x − μ ) T Σ − 1 ( x − μ ) / 2 ) ( 2 π ) k det Σ , x = ( x 1 , … , x k ) T ∈ R k {\displaystyle f_{\mathbf {X} }(x_{1},\dotsc ,x_{k};{\boldsymbol {\mu }},{\boldsymbol {\Sigma }})={\frac {\exp \left(-(\mathbf {x} -{\boldsymbol {\mu }})^{T}{\boldsymbol {\Sigma }}^{-1}(\mathbf {x} -{\boldsymbol {\mu }})/2\right)}{\sqrt {(2\pi )^{k}\det {\boldsymbol {\Sigma }}}}},\quad \mathbf {x} =(x_{1},\dotsc ,x_{k})^{T}\in \mathbb {R} ^{k}} in which μ = ( μ 1 , … , μ k ) T = ( E [ X 1 ] , … , E [ X k ] ) T {\displaystyle {\boldsymbol {\mu }}=(\mu _{1},\dotsc ,\mu _{k})^{T}=(\mathbb {E} [X_{1}],\dotsc ,\mathbb {E} [X_{k}])^{T}} is the mean vector , and Σ = ( Cov ( X 1 , X 1 ) ⋯ Cov ( X 1 , X k ) ⋮ ⋱ ⋮ Cov ( X k , X 1 ) ⋯ Cov ( X k , X k ) ) = ( σ 1 2 ⋯ Cov ( X 1 , X k ) ⋮ ⋱ ⋮ Cov ( X k , X 1 ) ⋯ σ k 2 ) {\displaystyle {\boldsymbol {\Sigma }}={\begin{pmatrix}\operatorname {Cov} (X_{1},X_{1})&\cdots &\operatorname {Cov} (X_{1},X_{k})\\\vdots &\ddots &\vdots \\\operatorname {Cov} (X_{k},X_{1})&\cdots &\operatorname {Cov} (X_{k},X_{k})\end{pmatrix}}={\begin{pmatrix}\sigma _{1}^{2}&\cdots &\operatorname {Cov} (X_{1},X_{k})\\\vdots &\ddots &\vdots \\\operatorname {Cov} (X_{k},X_{1})&\cdots &\sigma _{k}^{2}\end{pmatrix}}} is the covariance matrix (with size k × k {\displaystyle k\times k} ).
備註。
情況 k = 2 {\displaystyle k=2} 的分佈更常用,它被稱為雙變數正態 分佈。
一個替代且等效的定義是 X = ( X 1 , … , X k ) T ∼ N k ( μ , Σ ) {\displaystyle \mathbf {X} =(X_{1},\dotsc ,X_{k})^{T}\sim {\mathcal {N}}_{k}({\boldsymbol {\mu }},{\boldsymbol {\Sigma }})} ,如果
X 1 = a 11 Z 1 + ⋯ + a 1 n Z n + μ 1 ; ⋮ X k = a k 1 Z 1 + ⋯ + a k n Z n + μ k , {\displaystyle {\begin{aligned}X_{1}&=a_{11}Z_{1}+\dotsb +a_{1n}Z_{n}+\mu _{1};\\\vdots \\X_{k}&=a_{k1}Z_{1}+\dotsb +a_{kn}Z_{n}+\mu _{k},\\\end{aligned}}}
對於一些常數 a 11 , … , a 1 n , … , a k 1 , … , a k n , μ 1 , … , μ k {\displaystyle a_{11},\dotsc ,a_{1n},\dotsc ,a_{k1},\dotsc ,a_{kn},\mu _{1},\dotsc ,\mu _{k}} ,以及 Z 1 , … , Z n {\displaystyle Z_{1},\dotsc ,Z_{n}} 是 n {\displaystyle n} 個獨立同分布的標準正態隨機變數。
利用上述結果, X i {\displaystyle X_{i}} 所服從的邊緣 分佈為 N ( μ i , σ i 2 ) , i = 1 , 2 , … , or k {\displaystyle {\mathcal {N}}(\mu _{i},\sigma _{i}^{2}),\quad i=1,2,\dotsc ,{\text{ or }}k} ,正如預期的那樣。
根據獨立正態隨機變數之和的命題以及正態隨機變數線性變換的分佈(參見機率/隨機變數的變換 章節),均值為 0 + ⋯ + 0 + μ i = μ i {\displaystyle 0+\dotsb +0+\mu _{i}=\mu _{i}} ,方差為 a i 1 2 + ⋯ + a i n 2 {\displaystyle a_{i1}^{2}+\dotsb +a_{in}^{2}} (根據定義,這等於 σ i 2 {\displaystyle \sigma _{i}^{2}} )。
命題。 (雙變數正態分佈的聯合機率密度函式) N 2 ( μ , Σ ) {\displaystyle {\mathcal {N}}_{2}({\boldsymbol {\mu }},{\boldsymbol {\Sigma }})} 的聯合機率密度函式為 f ( x , y ) = 1 2 π σ X σ Y 1 − ρ 2 exp ( − 1 2 ( 1 − ρ 2 ) ( ( x − μ X σ X ) 2 − 2 ρ ( x − μ X σ X ) ( y − μ Y σ Y ) + ( y − μ Y σ Y ) 2 ) ) , ( x , y ) T ∈ R 2 {\displaystyle f(x,y)={\frac {1}{2\pi \sigma _{X}\sigma _{Y}{\sqrt {1-\rho ^{2}}}}}\exp \left(-{\frac {1}{2(1-\rho ^{2})}}\left(\left({\frac {x-\mu _{X}}{\sigma _{X}}}\right)^{2}-2\rho \left({\frac {x-\mu _{X}}{\sigma _{X}}}\right)\left({\frac {y-\mu _{Y}}{\sigma _{Y}}}\right)+\left({\frac {y-\mu _{Y}}{\sigma _{Y}}}\right)^{2}\right)\right),\quad (x,y)^{T}\in \mathbb {R} ^{2}}
其中
ρ = ρ ( X , Y ) {\displaystyle \rho =\rho (X,Y)} 且
σ X , σ Y {\displaystyle \sigma _{X},\sigma _{Y}} 為正數。
雙變數正態分佈示例圖
證明。 對於雙變數正態分佈,
均值向量 為 μ = ( μ X , μ Y ) {\displaystyle {\boldsymbol {\mu }}=(\mu _{X},\mu _{Y})} ;
該 協方差矩陣 是 Σ = ( Cov ( X , X ) Cov ( X , Y ) Cov ( Y , X ) Cov ( Y , Y ) ) = ( Var ( X ) Cov ( X , Y ) Cov ( X , Y ) Var ( Y ) ) = ( σ X 2 ρ σ X σ Y ρ σ X σ Y σ Y 2 ) . {\displaystyle {\boldsymbol {\Sigma }}={\begin{pmatrix}\operatorname {Cov} (X,X)&\operatorname {Cov} (X,Y)\\\operatorname {Cov} (Y,X)&\operatorname {Cov} (Y,Y)\end{pmatrix}}={\begin{pmatrix}\operatorname {Var} (X)&\operatorname {Cov} (X,Y)\\\operatorname {Cov} (X,Y)&\operatorname {Var} (Y)\\\end{pmatrix}}={\begin{pmatrix}\sigma _{X}^{2}&\rho \sigma _{X}\sigma _{Y}\\\rho \sigma _{X}\sigma _{Y}&\sigma _{Y}^{2}\\\end{pmatrix}}.}
因此,
( x − μ ) T Σ − 1 ( x − μ ) = 1 det Σ ( ( x − μ X , y − μ Y ) T ) T ( σ Y 2 − ρ σ X σ Y − ρ σ X σ Y σ X 2 ) ( x − μ X , y − μ Y ) T ) = 1 det Σ ( x − μ X y − μ Y ) ( σ Y 2 − ρ σ X σ Y − ρ σ X σ Y σ X 2 ) ( x − μ X y − μ Y ) = 1 det Σ ( ( x − μ X ) σ Y 2 − ( y − μ Y ) ρ σ X σ Y − ( x − μ X ) ρ σ X σ Y + ( y − μ Y ) σ X 2 ) ( x − μ X y − μ Y ) = 1 det Σ ⏟ σ X 2 σ Y 2 − ( ρ σ X σ Y ) 2 ( ( x − μ X ) 2 σ Y 2 − ( x − μ X ) ( y − μ Y ) ρ σ X σ Y − ( x − μ X ) ( y − μ Y ) ρ σ X σ Y ⏟ = − 2 ρ ( x − μ X ) ( y − μ Y ) σ X σ Y + ( y − μ Y ) 2 σ X 2 ) = ( x − μ X ) 2 σ Y 2 − 2 ρ ( x − μ X ) ( y − μ Y ) σ X σ Y + ( y − μ Y ) 2 σ X 2 σ X 2 σ Y 2 ( 1 − ρ ) 2 = 1 1 − ρ 2 ( ( x − μ X σ X ) 2 − 2 ρ ( ( x − μ X ) ( y − μ Y ) σ X σ Y ) + ( y − μ Y σ Y ) 2 ) . {\displaystyle {\begin{aligned}(\mathbf {x} -{\boldsymbol {\mu }})^{T}{\boldsymbol {\Sigma }}^{-1}(\mathbf {x} -{\boldsymbol {\mu }})&={\frac {1}{\det {\boldsymbol {\Sigma }}}}\left((x-\mu _{X},y-\mu _{Y})^{T}\right)^{T}{\begin{pmatrix}\sigma _{Y}^{2}&-\rho \sigma _{X}\sigma _{Y}\\-\rho \sigma _{X}\sigma _{Y}&\sigma _{X}^{2}\\\end{pmatrix}}(x-\mu _{X},y-\mu _{Y})^{T})\\&={\frac {1}{\det {\boldsymbol {\Sigma }}}}{\begin{pmatrix}{\color {blue}x-\mu _{X}}&{\color {red}y-\mu _{Y}}\end{pmatrix}}{\begin{pmatrix}{\color {darkgreen}\sigma _{Y}^{2}}&{\color {darkorange}-\rho \sigma _{X}\sigma _{Y}}\\{\color {purple}-\rho \sigma _{X}\sigma _{Y}}&{\color {maroon}\sigma _{X}^{2}}\\\end{pmatrix}}{\begin{pmatrix}x-\mu _{X}\\y-\mu _{Y}\end{pmatrix}}\\&={\frac {1}{\det {\boldsymbol {\Sigma }}}}{\begin{pmatrix}{\color {blue}(x-\mu _{X})}{\color {darkgreen}\sigma _{Y}^{2}}{\color {purple}-}{\color {red}(y-\mu _{Y})}{\color {purple}\rho \sigma _{X}\sigma _{Y}}&{\color {darkorange}-}{\color {blue}(x-\mu _{X})}{\color {darkorange}\rho \sigma _{X}\sigma _{Y}}+{\color {red}(y-\mu _{Y})}{\color {maroon}\sigma _{X}^{2}}\end{pmatrix}}{\begin{pmatrix}{\color {deeppink}x-\mu _{X}}\\{\color {deeppink}y-\mu _{Y}}\end{pmatrix}}\\&={\frac {1}{\underbrace {\det {\boldsymbol {\Sigma }}} _{\sigma _{X}^{2}\sigma _{Y}^{2}-(\rho \sigma _{X}\sigma _{Y})^{2}}}}{\big (}(x-\mu _{X})^{\color {deeppink}2}\sigma _{Y}^{2}\underbrace {-{\color {deeppink}(x-\mu _{X})}(y-\mu _{Y})\rho \sigma _{X}\sigma _{Y}-(x-\mu _{X}){\color {deeppink}(y-\mu _{Y})}\rho \sigma _{X}\sigma _{Y}} _{=-2\rho (x-\mu _{X})(y-\mu _{Y})\sigma _{X}\sigma _{Y}}+(y-\mu _{Y})^{\color {deeppink}2}\sigma _{X}^{2}{\big )}\\&={\frac {(x-\mu _{X})^{2}\sigma _{Y}^{2}-2\rho (x-\mu _{X})(y-\mu _{Y})\sigma _{X}\sigma _{Y}+(y-\mu _{Y})^{2}\sigma _{X}^{2}}{\sigma _{X}^{2}\sigma _{Y}^{2}(1-\rho )^{2}}}\\&={\frac {1}{1-\rho ^{2}}}\left(\left({\frac {x-\mu _{X}}{\sigma _{X}}}\right)^{2}-2\rho \left({\frac {(x-\mu _{X})(y-\mu _{Y})}{\sigma _{X}\sigma _{Y}}}\right)+\left({\frac {y-\mu _{Y}}{\sigma _{Y}}}\right)^{2}\right).\end{aligned}}}
f ( x , y ) = 1 ( 2 π ) 2 det Σ exp ( − 1 2 ⋅ 1 1 − ρ 2 ( ( x − μ X σ X ) 2 − 2 ρ ( ( x − μ X ) ( y − μ Y ) σ X σ Y ) + ( y − μ Y σ Y ) 2 ) ) = 1 2 π σ X 2 σ Y 2 ( 1 − ρ 2 ) exp ( − 1 2 ( 1 − ρ 2 ) ( ( x − μ X σ X ) 2 − 2 ρ ( ( x − μ X ) ( y − μ Y ) σ X σ Y ) + ( y − μ Y σ Y ) 2 ) ) = 1 2 π σ X σ Y 1 − ρ 2 exp ( − 1 2 ( 1 − ρ 2 ) ( ( x − μ X σ X ) 2 − 2 ρ ( x − μ X σ X ) ( y − μ Y σ Y ) + ( y − μ Y σ Y ) 2 ) ) . {\displaystyle {\begin{aligned}f(x,y)&={\frac {1}{\sqrt {(2\pi )^{2}\det {\boldsymbol {\Sigma }}}}}\exp \left(-{\frac {1}{2}}\cdot {\frac {1}{1-\rho ^{2}}}\left(\left({\frac {x-\mu _{X}}{\sigma _{X}}}\right)^{2}-2\rho \left({\frac {(x-\mu _{X})(y-\mu _{Y})}{\sigma _{X}\sigma _{Y}}}\right)+\left({\frac {y-\mu _{Y}}{\sigma _{Y}}}\right)^{2}\right)\right)\\&={\frac {1}{2\pi {\sqrt {\sigma _{X}^{2}\sigma _{Y}^{2}(1-\rho ^{2})}}}}\exp \left({\frac {-1}{2(1-\rho ^{2})}}\left(\left({\frac {x-\mu _{X}}{\sigma _{X}}}\right)^{2}-2\rho \left({\frac {(x-\mu _{X})(y-\mu _{Y})}{\sigma _{X}\sigma _{Y}}}\right)+\left({\frac {y-\mu _{Y}}{\sigma _{Y}}}\right)^{2}\right)\right)\\&={\frac {1}{2\pi \sigma _{X}\sigma _{Y}{\sqrt {1-\rho ^{2}}}}}\exp \left({\frac {-1}{2(1-\rho ^{2})}}\left(\left({\frac {x-\mu _{X}}{\sigma _{X}}}\right)^{2}-2\rho \left({\frac {x-\mu _{X}}{\sigma _{X}}}\right)\left({\frac {y-\mu _{Y}}{\sigma _{Y}}}\right)+\left({\frac {y-\mu _{Y}}{\sigma _{Y}}}\right)^{2}\right)\right).\\\end{aligned}}}
◻ {\displaystyle \Box }
↑ 或者,我們可以將事件定義為 { i th Bernoulli trial is a failure } . {\displaystyle \{i{\text{th Bernoulli trial is a failure}}\}.}
↑ 'indpt.' 代表獨立。
↑ 這是因為存在對(可區分和有序)的無序選擇 r {\displaystyle {\color {darkgreen}r}} 次試驗以獲得 '成功' ,從 n {\displaystyle {\color {blue}n}} 次試驗中進行不放回抽樣(然後剩餘的位置用於 '失敗' )。
↑ 將罕見事件的發生視為'成功',而罕見事件的未發生則視為'失敗'。
↑ 與二項分佈的結果不同,每個 x {\displaystyle {\color {red}x}} 只有一個 可能的 序列。
↑ 從 x + k − 1 {\displaystyle {\color {red}x}+{\color {darkgreen}k}-1} 次試驗中進行 x {\displaystyle {\color {red}x}} 次 '失敗' (或 k − 1 {\displaystyle {\color {darkgreen}k}-1} 次 '成功' )的無序選擇。
↑ 對 k {\displaystyle k} 的限制是為了使二項式係數有定義,即該表示式 '有意義'。在實踐中,我們很少直接使用這個條件。相反,我們通常直接確定 x {\displaystyle x} 的特定值是否 '有意義'。
↑ 這超出了本書的範圍。
↑ 機率 '在區間上均勻分佈'。
↑ 與其他 輕尾 分佈(例如正態分佈)相比,服從 柯西 分佈的隨機變數具有相對較高的機率取 極端值 。在圖形上,pdf 的 '尾部'(即左端和右端)。
↑ 對於 a < 0 {\displaystyle a<0} 的情況類似(不等號方向相反,最終我們將有兩個負號相互抵消)。同樣,當 a = 0 {\displaystyle a=0} 時,隨機變數變為非隨機常數,因此我們對此情況不感興趣。
↑ 那麼, p 1 + p 2 + ⋯ + p k = 1 {\displaystyle p_{1}+p_{2}+\dotsb +p_{k}=1} 。
↑ 如果該物件被分配到除 i {\displaystyle i} 格以外的格,那麼它就 '失敗'。
↑ 對於 N {\displaystyle {\mathcal {N}}} 的下標 k {\displaystyle k} 是為了強調該分佈是 k {\displaystyle k} 維的,是可選的。