定義。 (伯努利試驗)伯努利試驗 是一種只有兩個 可能結果的實驗,即成功和失敗。
備註。
'成功'和'失敗'僅作為標籤,即我們可以將實驗中的任意一個結果定義為'成功'。
定義。 (伯努利試驗的獨立性)令 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 } ,如上一節所述。現在考慮一個特定的結果序列,其中在 n {\displaystyle {\color {blue}n}} 次試驗中有 r {\displaystyle {\color {darkgreen}r}} 次成功: 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)}} 的機率質量函式。
一個隨機變數 X {\displaystyle X} 服從引數為正數 λ {\displaystyle \lambda } 的 泊松分佈 ,記為 X ∼ Pois ( λ ) {\displaystyle X\sim \operatorname {Pois} (\lambda )} ,如果它的機率質量函式為 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)}} 的累積分佈函式。
備註。
因此,對於較大的 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 } )是一個 等比數列 ,因此得名 “幾何 分佈”。
對於另一種定義,pmf 則為 ( 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 ) ) 由幾何級數公式 = ( 1 − p ) n + 1 ⋅ p p = p ⋅ ( 1 − p ) n + 1 1 − ( 1 − p ) = p ( ( 1 − p ) n + 1 + ( 1 − p ) n + 2 + ⋯ ) 由幾何級數公式 = def P ( X > n ) 因為 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)}} 的機率質量函式。
一個隨機變數 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} 個物件的無序選擇。
這是遵循 超幾何分佈 的隨機變數的機率質量函式。
定義。 (超幾何分佈)
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] (可以從對應連續均勻分佈的機率密度函式 (pdf) 中看出)。 此外還有 離散 均勻分佈,但它不像 連續 均勻分佈那麼重要。因此,從現在開始,簡稱為“均勻分佈”指的是 連續 均勻分佈,而不是離散均勻分佈。
定義。 (均勻分佈)
U [ a , b ] {\displaystyle {\color {dodgerblue}{\mathcal {U}}[a,b]}} 的機率密度函式 (pdf)。
一個隨機變數 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)。
(均勻分佈的累積分佈函式) U [ a , b ] {\displaystyle {\mathcal {U}}[a,b]} 的累積分佈函式為 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 在較小的 x {\displaystyle x} 處具有更高的值,當 λ ↑ {\displaystyle \lambda \uparrow } )時,pdf 在包含較小 x {\displaystyle x} 值的區間的面積 ↑ {\displaystyle \uparrow } 當 λ ↑ {\displaystyle \lambda \uparrow } 。
此外,由於在固定速率 λ {\displaystyle \lambda } 下,到達時間間隔越長髮生的可能性越小。因此,直觀地,我們也希望 pdf 是一個嚴格的 遞減 函式,這樣發生的機率(pdf 在某個區間內的面積) ↓ {\displaystyle \downarrow } 當 x ↑ {\displaystyle x\uparrow } 。
我們可以看到,指數分佈的 pdf 滿足這兩個性質。
證明: 假設 X ∼ Exp ( λ ) {\displaystyle X\sim \operatorname {Exp} (\lambda )} 。 X {\displaystyle X} 的累積分佈函式 (CDF) 為 F ( x ) = ∫ − ∞ x λ e − λ y 1 { y ≥ 0 } d y = { ∫ 0 x λ e − λ y d y , x ≥ 0 ; 0 , x < 0 ( 當 x < 0 , x ∉ supp ( X ) , 因此 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{當 }}x<0,x\notin \operatorname {supp} (X),{\text{ 因此 }}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 }
伽馬 分佈是廣義的 指數 分佈,從某種意義上說,我們也可以改變 形狀 的 指數 分佈的 pdf。
定義。 (伽馬分佈)
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 )} ,如果其 PDF 為 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)}} 的 CDF。
貝塔 分佈是 U [ 0 , 1 ] {\displaystyle {\mathcal {U}}[0,1]} 的推廣,因為我們可以透過使用 兩個形狀引數 來改變 PDF 的 形狀 。
定義。 (貝塔分佈)
以下為 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]} 的機率密度函式。
柯西分佈是 重尾 分佈 [ 10] 。因此,它是一個“病態”分佈,因為它具有一些反直覺的性質,例如,儘管它的均值和方差從其影像直接看似乎是定義好的,但實際上它的均值和方差是未定義的。
備註。
這個定義指的是柯西分佈的 特例 。更準確地說,柯西分佈的完整定義中還包含一個 尺度 引數,這裡機率密度函式中的尺度引數被設定為 1。
由於 f ( θ + x ) = f ( θ − x ) {\displaystyle f(\theta +x)=f(\theta -x)} ,所以機率密度函式關於 θ {\displaystyle \theta } 對稱。
正態分佈或高斯分佈是自然界中常見的現象,非常奇妙。這可能是因為根據 中心極限定理 ,樣本均值或樣本總和通常 近似 服從 正態 分佈。因此,正態分佈在統計學中非常重要。
定義。 (正態分佈)
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})} ,則其 PDF 為 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)}} 的 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}}} .
具有正的自由度 ν {\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)} .
的累積分佈函式 χ 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 {\displaystyle t} -分佈 與 卡方 分佈和 正態 分佈有關。
定義。 (學生 t {\displaystyle t} -分佈)
的 pdf t 1 , t 2 , t 5 {\displaystyle {\color {darkorange}t_{1}},{\color {purple}t_{2}},{\color {royalblue}t_{5}}} 和 t ∞ {\displaystyle t_{\infty }} .
具有 ν {\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 分佈是廣義的學生 t 分佈,因為它的引數比學生 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}}} 的機率密度函式。
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} -分佈 在統計學中的應用,可以參考 Statistics/Interval Estimation (置信區間構建中的應用)和 Statistics/Hypothesis Testing (假設檢驗中的應用)。
多項式分佈是 推廣的 二項式分佈,區別在於每次試驗的結果不止兩種。
假設有 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.' 代表獨立。
↑ 這是因為從 n {\displaystyle {\color {blue}n}} 次試驗中(然後剩下的位置用於 '失敗' )對(可區分且有序的) r {\displaystyle {\color {darkgreen}r}} 次試驗進行無放回的無序選擇,以獲得 '成功' 。
↑ 罕見事件的發生被視為 '成功',罕見事件的未發生被視為 '失敗'。
↑ 與二項分佈的結果不同,每個 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} 維的,並且是可選的。