【數學】張宇概率論九講筆記

隨機事件與概率

在這裏插入圖片描述
1. A n r = n ( n 1 ) ( n r + 1 ) n r C n r = n ! ( n r ) ! r ! = A n r r ! n r 2. P ( A B ) = P ( A ) + P ( B ) P ( A B ) P ( A B ) = P ( A ) P ( A B ) P ( A B ) + P ( A ) P ( B A ) P ( A ) = i = 1 n P ( B i ) P ( A B i ) P ( A j B ) = P ( A j B ) P ( B ) = P ( A j ) P ( B A j ) i = 1 n P ( A i ) P ( B A i ) 3. P ( B A ) = P ( A B ) P ( A )       P ( A B ) = P ( A ) P ( B A ) 4. P ( A B ) = P ( A ) P ( B ) 5. P ( X = k ) = C N K p k ( 1 p ) n k \begin{aligned} 1.&\color{red}{排列組合}\\ &排列A_n^r=n(n-1)\cdots(n-r+1)\\ &從n個不同的元素中任取r個,按一定順序排成一列\\ &組合C_n^r=\frac{n!}{(n-r)!r!}=\frac{A_n^r}{r!}\\ &從n個不同的元素中任取r個,不計順序排成一組\\ 2.&\color{red}{五大公式}\\ &加法公式:P(A\cup B)=P(A)+P(B)-P(AB)\\ &減法公式:P(A-B)=P(A)-P(AB)\\ &乘法公式:P(AB)+P(A)P(B|A)\\ &全概率公式:P(A)=\sum_{i=1}^nP(B_i)P(A|B_i)\\ &逆概率公式:P(A_j|B)=\frac{P(A_jB)}{P(B)}=\frac{P(A_j)P(B|A_j)}{\sum_{i=1}^nP(A_i)P(B|A_i)}\\ 3.&\color{red}{條件概率}\\ &P(B|A)=\frac{P(AB)}{P(A)}\implies P(AB)=P(A)\cdot P(B|A)\\ 4.&\color{red}{獨立}\\ &P(AB)=P(A)P(B)\\ 5.&\color{red}{伯努利試驗}\\ &P(X=k)=C_N^Kp^k(1-p)^{n-k}\\ \end{aligned}

一維隨機變量及分佈

在這裏插入圖片描述

分佈函數的性質

1. lim x F ( x ) = 0 , F ( ) = 0 , lim x + F ( x ) = 1 , F ( + ) = 1 2. F ( x ) 調 3. F ( x ) F ( x + 0 ) = F ( x ) x D P ( x D ) = D f ( x ) d x \begin{aligned} &1.\lim_{x\to-\infty}F(x)=0,記爲F(-\infty)=0,\lim_{x\to+\infty}F(x)=1,記爲F(+\infty)=1\\ &2.F(x)是單調非減函數\\ &3.F(x)是右連續函數,F(x+0)=F(x)\\ &若x\in D爲一隨機事件,則其概率爲P(x\in D)=\int_Df(x)dx\\ \end{aligned}

離散型隨機變量的分佈律與分佈函數

x 1 2 3 P 0.1 0.5 0.4 F ( x ) = { 0 , x < 1 0.1 , 1 x < 2 0.6 , 2 x < 3 1 , 3 x \begin{aligned} & \begin{array}{c|c|c|c} x & 1 & 2 & 3 \\ \hline P & 0.1 & 0.5 & 0.4 \end{array}\\ &F(x)=\begin{cases}0,x<1\\0.1,1\leq x<2\\0.6,2\leq x<3\\1,3\leq x\end{cases} \end{aligned}

連續型隨機變量的性質

1. f ( x ) 0 2. + f ( x ) d x = 1 3. x 1 < x 2 , P ( x 1 < x x 2 ) = x 1 x 2 f ( t ) d t 4. f ( x ) F ( x ) = f ( x ) { 0 + x n e x d x = n ! + e x 2 d x = π \begin{aligned} &1.f(x)\geq0\\ &2.\int_{-\infty}^{+\infty}f(x)dx=1\\ &3.對於\forall x_1< x_2,P(x_1< x\leq x_2)=\int_{x_1}^{x_2}f(t)dt\\ &4.f(x)在連續點處可導,即F'(x)=f(x)\\ &常考的兩個積分\begin{cases}\int_0^{+\infty}x^ne^{-x}dx=n!\\\int_{-\infty}^{+\infty}e^{-x^2}dx=\sqrt\pi\end{cases} \end{aligned}

常見分佈

0 1 P ( X = k ) = C n k p k ( 1 p ) n k P ( X = k ) = λ k e λ k ! 0 1 X B ( 1 , p ) X B ( n , p ) X P ( λ ) p p λ n k n k E X p n p λ D X p ( 1 p ) n p ( 1 p ) λ f ( x ) = { 1 b a , a x b 0 , f ( x ) = { λ e λ x , x > 0 0 , x 0 ( λ > 0 ) f ( x ) = 1 2 π σ e ( x μ ) 2 2 σ 2 X U [ a , b ] X E ( λ ) X N ( μ , σ 2 ) a , b λ μ , σ 使 E X a + b 2 1 λ μ D X ( b a ) 2 12 1 σ 2 σ 2 P ( x > t ) = e λ t ( t > 0 ) X N ( 0 , 1 ) φ ( x ) = 1 2 π e x 2 2 \begin{aligned} &\color{red}{離散型}\\ & \begin{array}{c|c|c|c} 定義 & 0與1 & P(X=k)=C_n^kp^k(1-p)^{n-k} & P(X=k)=\frac{\lambda^ke^{-\lambda}}{k!} \\ \hline 稱呼 & 0-1分佈 & 二項分佈 & 泊松分佈 \\\hline 記號 & X\sim B(1,p) & X\sim B(n,p) & X\sim P(\lambda) \\\hline 參數 & p & p & \lambda\\\hline 背景 & 一次伯努利試驗成功或失敗的次數 & n次伯努利試驗成功k次,失敗n-k次 & 例如每天收到電話、短信的次數\\\hline EX & p & np & \lambda \\\hline DX & p(1-p) & np(1-p) & \lambda \\ \end{array}\\ &\color{red}{連續型}\\ & \begin{array}{c|c|c|c} 定義 & f(x)=\begin{cases}\frac1{b-a},a\leq x\leq b\\0,其他\end{cases} & f(x)=\begin{cases}\lambda e^{-\lambda x},x>0\\0,x\leq 0\end{cases}(\lambda>0) & f(x)=\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{(x-\mu)^2}{2\sigma^2}} \\ \hline 稱呼 & 均勻分佈 & 指數分佈 & 正態分佈 \\\hline 記號 & X\sim U[a,b] & X\sim E(\lambda) & X\sim N(\mu,\sigma^2) \\\hline 參數 & a,b & \lambda & \mu,\sigma\\\hline 背景 & 等公交、地鐵、電梯 & 反映使用壽命、生命特徵的現象 & 考試成績的分佈\\\hline EX & \frac{a+b}2 & \frac1\lambda & \mu \\\hline DX & \frac{(b-a)^2}{12} & \frac1{\sigma^2} & \sigma^2 \\\hline 特殊 & & P(x>t)=e^{-\lambda t}(t>0) & X\sim N(0,1)\to\varphi(x)=\frac1{\sqrt{2\pi}}e^{-\frac{x^2}2} \end{array} \end{aligned}

期望方差

: E ( x ) = + x d [ F ( x ) ] = { i x i p i , X x f ( x ) d x , X X g ( x ) E ( g ( X ) ) = { i g ( x i ) p i , X g ( x ) f ( x ) d x , X : E ( c ) = C E ( c X ) = C E ( X ) E ( X + Y ) = E ( X ) + E ( Y ) E ( X Y ) = E ( X ) E ( Y ) : D ( X ) = E [ X E ( X ) ] 2 = { i [ x i E ( X ) ] 2 p i , X + [ x E ( X ) ] 2 f ( x ) d x , X : D ( c ) = 0 D ( c X ) = C 2 D ( X ) D ( X + Y ) = D ( X ) + D ( Y ) 2 E { [ X E ( X ) ] [ Y E ( Y ) ] } D ( X ) = e ( X 2 ) [ E ( X ) ] 2 D ( X + Y ) = D ( X ) + D ( Y ) ( ) \begin{aligned} 期望:&E(x)=\int_{-\infty}^{+\infty}xd[F(x)]=\begin{cases}\sum_ix_ip_i,X爲離散型隨機變量\\\int_{-\infty}^{\infty}xf(x)dx,X爲連續型隨機變量\end{cases}\\ &若隨機變量X的概率分佈已知,則隨機變量函數g(x)的數學期望爲E(g(X))=\begin{cases}\sum_ig(x_i)p_i,X爲離散型\\\int_{-\infty}^{\infty}g(x)f(x)dx,X爲連續型\end{cases}\\ 性質:&E(c)=C\quad E(cX)=CE(X)\quad E(X+Y)=E(X)+E(Y)\quad E(XY)=E(X)E(Y)\\ 方差:&D(X)=E[X-E(X)]^2=\begin{cases}\sum_i[x_i-E(X)]^2p_i,當X爲離散型時\\\int_{-\infty}^{+\infty}[x-E(X)]^2f(x)dx,當X爲連續型時\end{cases}\\ 性質:&D(c)=0\quad D(cX)=C^2D(X)\\ &D(X+Y)=D(X)+D(Y)-2E\{[X-E(X)][Y-E(Y)]\}\\ &D(X)=e(X^2)-[E(X)]^2\quad D(X+Y)=D(X)+D(Y)(獨立) \end{aligned}

宇哥筆記

隨機事件與概率

古典概型

定義

  [ ] Ω P ( A ) = A Ω [ ] 1. ( E ) 2. Ω ω [ ] P ( ) = 1 2 \begin{aligned} \ [定義]&若\Omega中有有限個、等可能的樣本點,稱爲古典概型\\ &即P(A)=\frac{A中樣本點個數}{\Omega中樣本點數}\\ [注]&1.試驗(E)同條件下可重複;試驗結果不止一個;試驗前不知哪個結果會出現\\ &2.\Omega——樣本空間——所有可能結果;\omega——樣本點\\ [例]&P(擲出奇數點)=\frac12\\ \end{aligned}

隨機分配(佔位)

  [ ] n N ( n N ) ( 1 ) A = { n } ( 2 ) B = { n } ( 1 ) P ( A ) = n ( n 1 ) ( n 2 ) 1 N n = n ! N n ( 2 ) P ( B ) = C N n n ! N n [ ] : 12 365 ( 1 ) A = { }       P ( A ) = 12 ! 36 5 12 ( 2 ) B = { }       P ( B ) = C 365 12 12 ! 36 5 12 B = { }       P ( B ) = 1 P ( B ) \begin{aligned} \ [例]&\color{maroon}設n個球隨機放入N(n\leq N)個盒子中,每個盒子可放任意多個球,求\\ &\color{maroon}(1)A=\{某指定n個盒子各有一球\}\\ &\color{maroon}(2)B=\{恰有n個盒子各有一球\}\\ &(1)P(A)=\frac{n\cdot(n-1)(n-2)\cdots1}{N^n}=\frac{n!}{N^n}\\ &(2)P(B)=\frac{C_N^n\cdot n!}{N^n}\\ [注]&類比:12個人,每個人在365天出生等可能\\ &(1)A=\{生日分別爲每個月的第一天\}\implies P(A)=\frac{12!}{365^{12}}\\ &(2)B=\{生日全不相同\}\implies P(B)=\frac{C_{365}^{12}\cdot 12!}{365^{12}}\\ &\quad \overline{B}=\{至少兩個人生日相同\}\implies P(\overline{B})=1-P(B)\\ \end{aligned}

簡單隨機抽樣

  [ ] 5 3 2 ( 1 ) 2 ( 2 ) 2 ( 3 ) 2 2 ( 1 ) P 1 = 5 2 2 2 5 2 = 21 25 ( 2 ) P 2 = 5 4 2 1 5 4 = 9 10 ( 3 ) P 3 = C 5 2 C 2 2 C 5 2 = 9 10 [ ] k k \begin{aligned} \ [例]&\color{maroon}袋中有5個球,3白2黑\\ &\color{maroon}(1)先後有放回取2個球\\ &\color{maroon}(2)先後無放回取2個球\\ &\color{maroon}(3)任取2個球\\ &\color{maroon}求取的2球中至少一個白球的概率\\ &\color{maroon}算‘兩球全黑’,用總數減去它\\ &(1)P_1=\frac{5^2-2^2}{5^2}=\frac{21}{25}\\ &(2)P_2=\frac{5\cdot4-2\cdot1}{5\cdot4}=\frac{9}{10}\\ &(3)P_3=\frac{C_5^2-C_2^2}{C_5^2}=\frac{9}{10}\\ [注]&'先後無放回取k個球'與'任取k個球'概率相等,後者好算\\ \end{aligned}

幾何概型

  [ ] Ω Ω A A A , P ( A ) = A Ω [ ] A P ( A ) = A Ω [ ] x , y 1 x y 1 0.09 . S A = 0.1 0.9 [ 1 x 0.09 x ] d x = 0.8 x 2 2 0.1 0.9 0.09 ln x 0.1 0.9 = 0.8 0.4 0.18 ln 3 0.2 P ( A ) = S A S Ω = 20 % \begin{aligned} \ [定義]&若\Omega是一個可度量的幾何區域,且樣本點落入\Omega中的某一可度量子區域A的可能性大小與A的幾何度量成正比,\\ &而與A的位置、形狀無關,稱爲幾何概型,即P(A)=\frac{A的度量}{\Omega的度量}\\ [引例]&天上掉餡餅於操場上,拿一個飯盆A去接這個餡餅,P(A)=\frac{A的面積}{\Omega的面積}\\ [例]&\color{maroon}隨機取兩個正數x,y,這兩個數中的每一個都不超過1,求x與y之和不超過1,積不小於0.09的概率.\\ &S_A=\int_{0.1}^{0.9}[1-x-\frac{0.09}{x}]dx=0.8-\frac{x^2}2|_{0.1}^{0.9}-0.09\ln x | _{0.1}^{0.9}=0.8-0.4-0.18\cdot\ln3\approx0.2\\ &P(A)=\frac{S_A}{S_\Omega}=20\% \end{aligned}

重要公式

  [ ] 1.   P ( A ) = 1 P ( A ) 2.   P ( A B ) = P ( A B ) = P ( A ) P ( A B ) ( A B ) 3.   ( 1 ) P ( A + B ) = P ( A ) + P ( B ) P ( A B ) ( 2 ) P ( A + B + C ) = P ( A ) + P ( B ) + P ( C ) P ( A B ) P ( B C ) P ( A C ) + P ( A B C ) [ ] 1. A 1 , A 2 ,   , A n ( n > 3 )       P ( i = 1 n A i ) = i = 1 n P ( A i ) 2. A 1 , A 2 ,   , A n ( n > 3 ) , A i 1 , A i 2 ,   , A i k ( k 2 ) , P ( A i 1 A i 2 A i k ) = P ( A i 1 ) P ( A i 2 ) P ( A i k )       A 1 , A 2 ,   , A n n       A , B       A , B       A , B       A , B n = 3 , A 1 , A 2 , A 3 , { P ( A 1 A 2 ) = P ( A 1 ) P ( A 2 ) P ( A 1 A 3 ) = P ( A 1 ) P ( A 3 ) P ( A 2 A 3 ) = P ( A 2 ) P ( A 3 ) P ( A 1 A 2 A 3 ) = P ( A 1 ) P ( A 2 ) P ( A 3 ) A 1 , A 2 ,   , A n P ( i = 1 n A i ) = 1 P ( i = 1 n A i ) = 1 P ( i = 1 n A i ) = 1 i = 1 n [ 1 P ( A i ) ] A 1 , A 2 ,   , A n 4.   P ( A B ) = P ( A B ) P ( B ) , P ( B ) > 0 5.   P ( A B ) = { P ( B ) P ( A B ) , P ( B ) > 0 P ( A ) P ( B A ) , P ( A ) > 0 P ( A 1 A 2 A 3 ) = P ( A 1 ) P ( A 2 A 1 ) P ( A 3 A 1 A 2 ) 6. [ ] A 1 , A 2 , A 3 , P ( B ) = P { } { 1. A 1 , A 2 , A 3 2. , B P ( B ) = P ( B Ω ) = P ( B ( A 1 A 2 A 3 ) ) = P ( B A 1 B A 2 B A 3 ) = P ( B A 1 ) + P ( B A 2 ) + P ( B A 3 ) = P ( A 1 ) P ( B A 1 ) + P ( A 2 ) P ( B A 2 ) + P ( A 3 ) P ( B A 3 ) P ( B ) = i = 1 n P ( A i ) P ( B A i ) 7.   B P ( A j B ) = P ( A j B ) P ( B ) = P ( A j ) P ( B A j ) i = 1 n P ( A i ) P ( B A i ) \begin{aligned} \ [公式]1.&對立\ P(A)=1-P(\overline{A})\\ 2.&減法\ P(A\overline{B})=P(A-B)=P(A)-P(AB)(A發生且B不發生)\\ 3.&加法\ (1)P(A+B)=P(A)+P(B)-P(AB)\\ &(2)P(A+B+C)=P(A)+P(B)+P(C)-P(AB)-P(BC)-P(AC)+P(ABC)\\ &[注]\color{grey}1.若A_1,A_2,\cdots,A_n(n>3)兩兩互斥\implies P(\bigcup_{i=1}^nA_i)=\sum_{i=1}^nP(A_i)\\ &\color{grey}2.設A_1,A_2,\cdots,A_n(n>3),若對其中任意有限個A_{i1},A_{i2},\cdots,A_{ik}(k\geq2),\\ &\color{grey}都有P(A_{i1}A_{i2}\cdots A_{ik})=P(A_{i1})P(A_{i2})\cdots P(A_{ik})\implies A_1,A_2,\cdots,A_n相互獨立\\ &\color{grey}且'夫唱婦隨',即:n個事件相互獨立\iff A,B獨立\iff\overline{A},\overline{B}獨立\iff\overline{A},B獨立\iff A,\overline{B}獨立\\ &\color{grey}n=3,A_1,A_2,A_3,有\begin{cases}P(A_1A_2)=P(A_1)P(A_2)\\P(A_1A_3)=P(A_1)P(A_3)\\P(A_2A_3)=P(A_2)P(A_3)\\P(A_1A_2A_3)=P(A_1)P(A_2)P(A_3)\end{cases}相互獨立\\ &\color{grey}若上者只成立前三條,則稱爲兩兩獨立\\ &\color{grey}於是若A_1,A_2,\cdots,A_n相互獨立,則P(\bigcup_{i=1}^nA_i)=1-P(\bigcup_{i=1}^nA_i)=1-P(\bigcap_{i=1}^n\overline{A_i})=1-\prod_{i=1}^n[1-P(A_i)]\\ &\color{grey}即\overline{A_1},\overline{A_2},\cdots,\overline{A_n}相互獨立\\ 4.&條件概率\ P(A\mid B)=\frac{P(AB)}{P(B)},P(B)>0\\ 5.&乘法\ P(AB)=\begin{cases}P(B)P(A\mid B),P(B)>0\\P(A)P(B\mid A),P(A)>0\end{cases}\\ &P(A_1A_2A_3)=P(A_1)P(A_2\mid A_1)P(A_3\mid A_1A_2)\\ 6.&全集分解公式(全概率公式)\\ &[引例]一個村子有且僅有三個小偷A_1,A_2,A_3,求P(B)=P\{失竊\}\\ &分成兩個階段\begin{cases}1.選人A_1,A_2,A_3\\2.去偷,B\end{cases}\\ &則P(B)=P(B\Omega)=P(B\cap(A_1\cup A_2\cup A_3))\\ &=P(BA_1\cup BA_2\cup BA_3)=P(BA_1)+P(BA_2)+P(BA_3)\\ &=P(A_1)P(B\mid A_1)+P(A_2)P(B\mid A_2)+P(A_3)P(B\mid A_3)\\ &故P(B)=\sum_{i=1}^nP(A_i)P(B\mid A_i)\\ 7.&貝葉斯公式(逆概率公式)\ 若B發生了,執果索因\\ &P(A_j\mid B)=\frac{P(A_jB)}{P(B)}=\frac{P(A_j)P(B\mid A_j)}{\sum_{i=1}^nP(A_i)P(B\mid A_i)} \end{aligned}

  [ 1 ] D ( A ) 0 < P ( B ) < 1 , P ( A B ) + P ( A B ) = 1 ( B ) A , B 滿 P ( B A ) = 1 , P ( A B ) = 0 ( C ) ( A B ) B = A B ( D ) A , B C P ( C ) < P ( A ) + P ( B ) 1 ( A )   P ( A B ) P ( B ) + P ( A B ) P ( B ) = P ( A B ) P ( B ) + 1 P ( A + B ) 1 P ( B ) = P ( A B ) P ( B ) + 1 P ( A ) P ( B ) + P ( A B ) 1 P ( B ) = P ( A B ) P ( A B ) P ( B ) + P ( B ) P ( A ) P ( B ) [ P ( B ) ] 2 + P ( B ) P ( A B ) P ( B ) [ 1 P ( B ) ] = 1       P ( A B ) + P ( B ) P ( A ) P ( B ) [ P ( B ) ] 2 = P ( B ) [ P ( B ) ] 2       P ( A B ) = P ( A ) P ( B ) ( B )   P ( A B ) P ( A ) = 1       P ( A B ) = P ( A )       P ( A B ) = P ( A ) P ( A B ) = 0 ( C )   ( A B ) B = ( A B ) B = ( A B ) ( B B ) = A B ( D )   P ( A B ) P ( C )       P ( A ) + P ( B ) P ( A + B ) P ( C )       P ( A ) + P ( B ) P ( A + B ) P ( A ) + P ( B ) 1       P ( C ) P ( A ) + P ( B ) 1 [ 2 ] 0.6 , 0.5 , ( 1 ) ( 2 ) ( 1 ) { 1. A A 2. = B P ( A B ) = P ( A ) P ( B A ) P ( A ) P ( B A ) + P ( A ) P ( B A ) = 1 2 0.6 1 2 0.6 + 1 2 0.5 = 6 11 ( 2 ) P ( A B ) = P ( A B ) P ( B ) = P ( A ) P ( A ) + P ( A ) P ( A A ) = 0.6 0.6 + 0.5 0.6 0.5 = 3 4 [ 3 ] 24 0 , 1 , 2 80 % , 15 % , 5 % , 4 , ( 1 ) ( 2 ) ( 1 ) A i = { i } . i = 0 , 1 , 2. P ( A 0 ) = 0.8 , P ( A 1 ) = 0.15 , P ( A 2 ) = 0.05 { 1. 2. 4 B o r B P ( B ) = P ( A 0 ) P ( B A 0 ) + P ( A 1 ) P ( B A 1 ) + P ( A 2 ) P ( B A 2 ) = 0.8 1 + 0.15 C 23 4 C 24 4 + 0.05 C 22 4 C 24 4 0.96 ( 2 ) P ( A 0 B ) = 0.8 0.96 0.83 \begin{aligned} \ [例1]&\color{maroon}以下結論,錯誤的是(D)?\\ &\color{maroon}(A)若0< P(B)< 1,P(A\mid B)+P(\overline{A}\mid\overline{B})=1\\ &\color{maroon}(B)若A,B滿足P(B\mid A)=1,則P(A-B)=0\\ &\color{maroon}(C)(A-B)\cup B=A\cup B\\ &\color{maroon}(D)若A,B同時發生時,C必發生,則P(C)< P(A)+P(B)-1\\ &(A)\ \frac{P(AB)}{P(B)}+\frac{P(\overline{A}\overline{B})}{P(\overline{B})}=\frac{P(AB)}{P(B)}+\frac{1-P(A+B)}{1-P(B)}=\frac{P(AB)}{P(B)}+\frac{1-P(A)-P(B)+P(AB)}{1-P(B)}\\ &=\frac{P(AB)-P(AB)P(B)+P(B)-P(A)P(B)-[P(B)]^2+P(B)P(AB)}{P(B)[1-P(B)]}=1\\ &\implies P(AB)+P(B)-P(A)P(B)-[P(B)]^2=P(B)-[P(B)]^2\implies P(AB)=P(A)P(B)\\ &(B)\ \frac{P(AB)}{P(A)}=1\implies P(AB)=P(A)\\ &\implies P(A-B)=P(A)-P(AB)=0\\ &(C)\ (A\overline{B})\cup B=(A\cap \overline{B})\cup B=(A\cup B)\cap(\overline{B}\cup B)=A\cup B\\ &(D)\ P(AB)\leq P(C)\implies P(A)+P(B)-P(A+B)\leq P(C)\\ &\implies P(A)+P(B)-P(A+B)\geq P(A)+P(B)-1\implies P(C)\geq P(A)+P(B)-1\\ [例2]&\color{maroon}設有甲、乙兩名運動員,甲命中目標的概率爲0.6,乙命中目標的概率爲0.5,求下列概率。\\ &\color{maroon}(1)從甲、乙中任選一人取射擊,若目標被命中,則是甲命中的概率是多少?\\ &\color{maroon}(2)甲、乙各自獨立射擊,若目標被命中,則是甲命中的概率?\\ &(1)分兩個階段\begin{cases}1.選人,A_甲,A_乙\\2.射擊,命中=B\end{cases}\\ &P(A_甲\mid B)=\frac{P(A_甲)P(B\mid A_甲)}{P(A_甲)P(B\mid A_甲)+P(A_乙)P(B\mid A_乙)}\\ &=\frac{\frac12\cdot0.6}{\frac12\cdot0.6+\frac12\cdot0.5}=\frac6{11}\\ &(2)P(A_甲\mid B)=\frac{P(A_甲B)}{P(B)}=\frac{P(A_甲)}{P(A_甲)+P(A_乙)-P(A_甲A_乙)}=\frac{0.6}{0.6+0.5-0.6\cdot0.5}=\frac34\\ [例3]&\color{maroon}每箱有24只產品,每箱含0,1,2件殘品的箱各佔80\%, 15\%, 5\%,現隨機抽一箱,隨即檢驗其中4只,\\ &\color{maroon}若未發現殘品則通過驗收,否則要逐一檢驗並更換,求\\ &\color{maroon}(1)一次通過驗收的概率\\ &\color{maroon}(2)通過驗收的箱中確無殘品的概率\\ &(1)記A_i=\{抽取的一箱中含i件殘品\}.i=0,1,2.\\ &但P(A_0)=0.8,P(A_1)=0.15,P(A_2)=0.05\\ &分階段\begin{cases}1.取箱子\\2.取4只檢驗,收爲Bor不收爲\overline{B}\end{cases}\\ &P(B)=P(A_0)P(B\mid A_0)+P(A_1)P(B\mid A_1)+P(A_2)P(B\mid A_2)\\ &=0.8\cdot1+0.15\cdot\frac{C_{23}^4}{C_{24}^4}+0.05\cdot\frac{C_{22}^4}{C_{24}^4}\approx0.96\\ &(2)P(A_0\mid B)=\frac{0.8}{0.96}\approx0.83 \end{aligned}

一維隨機變量及其分佈

隨機變量與分佈函數

( 1 ) r , v ( ) Ω = { ω } X = X ( ω ) , ω Ω ( 2 ) F ( x ) = P { X x } , < x < + . \begin{aligned} &(1)r,v(隨機變量)\quad 定義在\Omega=\{\omega\}上,取值在實數軸上的變量。即X=X(\omega),\omega\in\Omega\\ &(2)分佈函數F(x)=P\{X\leq x\},其中-\infty< x<+\infty. \end{aligned}

離散型隨機變量

  [ ] x [ ] x ( x 1 x 2 x n P 1 P 2 P n ) F ( x ) = P { X x } , r , v       \begin{aligned} \ [定義]&x取有限個或無窮可列個值\\ [分佈律]&x\sim\begin{pmatrix}x_1&x_2&\cdots&x_n&\cdots\\P_1&P_2&\cdots&P_n&\cdots\end{pmatrix}\\ &F(x)=P\{X\leq x\},離散型r,v\iff 步步高的階梯形函數\\ \end{aligned}

連續型隨機變量

  [ ] f ( x ) , 使 x ( , + ) , F ( x ) = x f ( t ) d t , x r , v . f ( x ) [ ] F ( x ) = P { X x } = { x f ( t ) d t , x i x P i , \begin{aligned} \ [定義]&若存在非負可積函數f(x),使得\forall x\in(-\infty,+\infty),有F(x)=\int_{-\infty}^xf(t)dt,則稱x爲連續型r,v.f(x)叫概率密度\\ [注]&F(x)=P\{X\leq x\}=\begin{cases}\int_{-\infty}^xf(t)dt,連續型\\\sum_{x_i\leq x}P_i,離散型\end{cases}\\ \end{aligned}

X~F(x)

X F ( x ) { P i f ( x ) ( 1 ) F ( x ) X       { 1. 調 2. F ( ) = 0 , F ( + ) = 1 3. ( ) ( 2 ) { P i }       { 1. P i 0 2. i P i = 1 ( 3 ) f ( x )       { 1. f ( x ) 0 2. + f ( x ) d x = 1 \begin{aligned} &X\sim F(x)\begin{cases}P_i\to分佈律\\f(x)\to概率密度\end{cases}\\ &(1)F(x)是某個X的分佈函數\iff\begin{cases}1.單調不減\\2.F(-\infty)=0,F(+\infty)=1\\3.右連續(等號跟着大於號)\end{cases}\\ &(2)\{P_i\}是分佈律\iff\begin{cases}1.P_i\geq0\\2.\sum_iP_i=1\end{cases}\\ &(3)f(x)是概率密度\iff\begin{cases}1.f(x)\geq0\\2.\int_{-\infty}^{+\infty}f(x)dx=1\end{cases}\\ \end{aligned}

八個常見分佈

( 1 ) ( 5 ) ( 6 ) ( 8 ) ( 1 ) 0 1 X ( 1 0 P 1 P ) ( 2 ) { 1. 2. P ( A ) = P 3. A , A , X A , P { x = k } = C n k P k ( 1 P ) n k , k = 0 , 1 ,   , n       X B ( n , P ) ( 3 ) X       P { x = k } = P 1 ( 1 P ) k 1 , k = 1 , 2 , ( 4 ) N M N M n P { x = k } = C M k C N M n k C N n ( 5 ) , P P { X = k } = λ k k ! e λ , { λ k = 0 , 1 , ( 6 ) X f ( x ) = { 1 b a , a x b 0 , , X U [ a , b ] [ ] X I X U ( I ) ( 7 ) X f ( x ) = { λ e λ x , x > 0 0 , x 0 , X E ( λ ) , λ [ ]   P { X t + s X t } = P { x s } F ( x ) = P { X x } = x f ( t ) d t = { 1 e λ x , x 0 0 , x < 0 { ( 8 ) X f ( x ) = 1 2 π σ e ( x μ ) 2 2 σ 2 , < x < + [ ] μ = 0 , σ 2 = 1       X N ( 0 , 1 ) X φ ( x ) = 1 2 π e x 2 2 X Φ ( x ) = x 1 2 π e t 2 2 d t \begin{aligned} &(1)-(5)離散型\quad(6)-(8)連續型\\ (1)&0-1分佈\quad X\sim\begin{pmatrix}1&0\\P&1-P\end{pmatrix}\\ (2)&二項分佈\quad \begin{cases}1.獨立\\2.P(A)=P\\3.只有A,\overline{A},非白即黑\end{cases}\\ &記X爲A發生的次數,P\{x=k\}=C_n^kP^k(1-P)^{n-k},k=0,1,\cdots,n\\ &\implies X\sim B(n,P)\\ (3)&幾何分佈\quad 與幾何無關,首中即停止,記X爲試驗次數\implies P\{x=k\}=P^1(1-P)^{k-1},k=1,2,\cdots\\ (4)&超幾何分佈\quad 古典概型,設N件產品,M、件正品,N-M件次品,無放回取n次,則P\{x=k\}=\frac{C_M^kC_{N-M}^{n-k}}{C_N^n}\\ (5)&泊松分佈\quad某時間段內,某場合下,源源不斷的質點來流的個數,也常用於描述稀有事件的P\\ &P\{X=k\}=\frac{\lambda^k}{k!}e^{-\lambda},\begin{cases}\lambda--強度\\k=0,1,\cdots\end{cases}\\ (6)&均勻分佈\quad 對比幾何概型,若X\sim f(x)=\begin{cases}\frac1{b-a},a\leq x\leq b\\0,其他\end{cases},稱X\sim U[a,b]\\ &[注]高檔次說法:「X在I上的任意子區間取值的概率與該子區間長度成正比」\to X\sim U(I)\\ (7)&指數分佈\quad X\sim f(x)=\begin{cases}\lambda e^{-\lambda x},x>0\\0,x\leq0\end{cases},稱X\sim E(\lambda),\lambda--失效率\\ &[注]無記憶性\ P\{X\geq t+s\mid X\geq t\}=P\{x\geq s\}\\ &F(x)=P\{X\leq x\}=\int_{-\infty}^xf(t)dt=\begin{cases}1-e^{-\lambda x},x\geq0\\0,x< 0\end{cases}\\ &\begin{cases}幾何分佈,離散性等待分佈\\指數分佈,連續性等待分佈\end{cases}\\ (8)&正態分佈\quad X\sim f(x)=\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{(x-\mu)^2}{2\sigma^2}},-\infty< x< +\infty\\ &[注]若\mu=0,\sigma^2=1\implies X\sim N(0,1)\\ &X\sim\varphi(x)=\frac1{\sqrt{2\pi}}e^{-\frac{x^2}2}\\ &X\sim\Phi(x)=\int_{-\infty}^x\frac1{\sqrt{2\pi}}e^{-\frac{t^2}2}dt\\ \end{aligned}

  [ 1 ] X F ( x ) , f ( x ) = a f 1 ( x ) + b f 2 ( x ) , f 1 ( x ) N ( 0 , σ 2 ) , f 2 ( x ) E ( λ ) F ( 0 ) = 1 8 , a = , b = 1. + f ( x ) d x = a + f 1 ( x ) d x + b + f 2 ( x ) d x       1 = a + b 2. F ( 0 ) = 0 f ( x ) d x = a 0 f 1 ( x ) d x + b 0 f 2 ( x ) d x = 1 8 a 1 2 + b 0 = 1 8       a = 1 4       b = 3 4 [ 2 ] X f ( x ) = { A e x , x > λ 0 , , λ > 0 , P { λ < X < λ + a } ( a > 0 ) + f ( x ) d x = 1       λ + A e x d x = 1       A e x + λ = A e λ = 1       A = e λ       P { λ < X < λ + a } = λ λ + a e λ e x d x = e λ [ e x ] λ + a λ = e λ ( e λ e ( λ + a ) ) = 1 e a λ a [ 3 ] X E ( λ ) , X 2 7 8 , λ = Y = { X 2 }       Y B ( 3 , P ) P = { X > 2 } = 2 + f ( x ) d x = 1 P { X 2 } = 1 F ( 2 ) = 1 [ 1 e 2 λ ] = e 2 λ P { Y 1 } = 7 8 = 1 P { Y = 0 } = 1 ( 1 P ) 3 = 1 ( 1 e 2 λ ) 3       e 2 λ = 1 2       λ = 1 2 ln 1 2 = 1 2 ln 2 [ 4 ] X E ( λ ) Y = 1 e λ x f Y ( y ) X f X ( x ) , Y = g ( X ) , f Y ( y ) 1. F Y ( y ) = P { Y y } = P { g ( X ) y } = P { X I y } = I y f x ( x ) d x 2. f Y ( y ) = F Y ( y ) 1. F Y ( y ) = P { Y y } = P { 1 e λ x y } ( 1 ) y < 0       F Y ( y ) = 0 ( 2 ) y 1       F Y ( y ) = 1 ( 3 ) 0 y 1       F Y ( y ) = P { 0 X 1 λ ln ( 1 y ) } = F X ( 1 λ ln ( 1 y ) ) = 1 e λ [ 1 λ ln ( 1 y ) ] 2. f Y ( y ) = { 1 , 0 y < 1 0 , \begin{aligned} \ [例1]&\color{maroon}設X\sim F(x),f(x)=af_1(x)+bf_2(x),f_1(x)\sim N(0,\sigma^2),f_2(x)\sim E(\lambda)\\ &\color{maroon}F(0)=\frac18,則a=\underline{\quad},b=\underline{\quad}\\ &1.\int_{-\infty}^{+\infty}f(x)dx=a\int_{-\infty}^{+\infty}f_1(x)dx+b\int_{-\infty}^{+\infty}f_2(x)dx\implies 1=a+b\\ &2.F(0)=\int_{-\infty}^0f(x)dx=a\int_{-\infty}^{0}f_1(x)dx+b\int_{-\infty}^{0}f_2(x)dx=\frac18\\ &即a\cdot\frac12+b\cdot0=\frac18\implies a=\frac14\implies b=\frac34\\ [例2]&\color{maroon}X\sim f(x)=\begin{cases}Ae^{-x},x>\lambda\\0,其他\end{cases},\lambda>0,P\{\lambda< X< \lambda+a\}(a>0)的值\\ &\int_{-\infty}^{+\infty}f(x)dx=1\implies \int_{\lambda}^{+\infty}Ae^{-x}dx=1\implies A\cdot e^{-x}\mid^\lambda_{+\infty}=Ae^{-\lambda}=1\implies A=e^{\lambda}\\ &\implies P\{\lambda< X< \lambda+a\}=\int_{\lambda}^{\lambda+a}e^{\lambda}\cdot e^{-x}dx=e^{\lambda}[e^{-x}]\mid^{\lambda}_{\lambda+a}=e^{\lambda}\cdot(e^{-\lambda}-e^{-(\lambda+a)})=1-e^{-a}\\ &故其值與\lambda無關,隨着a的增大其概率增大\\ [例3]&\color{maroon}X\sim E(\lambda),對X作三次獨立重複觀察,至少有一次觀測值大於2的概率爲\frac78,則\lambda=\underline{\quad}\\ &記Y=\{對X作三次獨立重複觀察中觀測值大於2發生的次數\}\implies Y\sim B(3,P)\\ &其中P=\{X>2\}=\int_2^{+\infty}f(x)dx=1-P\{X\leq2\}=1-F(2)=1-[1-e^{-2\lambda}]=e^{-2\lambda}\\ &由題意,得P\{Y\geq1\}=\frac78=1-P\{Y=0\}=1-(1-P)^3=1-(1-e^{-2\lambda})^3\\ &\implies e^{-2\lambda}=\frac12\implies \lambda=-\frac12\ln\frac12=\frac12\ln2\\ [例4]&\color{maroon}X\sim E(\lambda)求Y=1-e^{-\lambda x}\sim f_Y(y)\\ &X\sim f_X(x),Y=g(X),求f_Y(y)\\ &1.F_Y(y)=P\{Y\leq y\}=P\{g(X)\leq y\}=P\{X\in I_y\}=\int_{I_y}f_x(x)dx\\ &2.f_Y(y)=F_Y'(y)\\ &1.F_Y(y)=P\{Y\leq y\}=P\{1-e^{-\lambda x}\leq y\}\\ &(1)y< 0\implies F_Y(y)=0\\ &(2)y\geq1\implies F_Y(y)=1\\ &(3)0\leq y\leq1\implies F_Y(y)=P\{0\leq X\leq -\frac1{\lambda}\ln(1-y)\}=F_X(-\frac1{\lambda}\ln(1-y))=1-e^{-\lambda[-\frac1{\lambda}\ln(1-y)]}\\ &2.f_Y(y)=\begin{cases}1,0\leq y< 1\\0,其他\end{cases}\\ \end{aligned}

多元隨機變量及其分佈

概念

1. ( X , Y ) , F ( x , y ) = P { X x , Y y } , < x < + , < y < + 2. F X ( x ) = lim y + F ( x , y ) , F Y ( y ) = lim x + F ( x , y ) [ ] 1. ( X , Y ) P i j ( ) P ( X = x i Y = y i ) = P ( X = x i , Y = y j ) P ( Y = y j ) = P i j P j P ( X = 1 Y = 0 ) = P 21 P 1 = 2. ( X , Y ) f ( x , y ) ( ) f X ( x ) = + f ( x , y ) d y , f Y ( y ) = + f ( x , y ) d x f X Y ( x y ) = f ( x , y ) f Y ( y ) = 3. ( X , Y ) , X , Y       F ( x , y ) = F X ( x ) F Y ( y )       P i j = P i P j , i , j       f ( x , y ) = f X ( x ) f Y ( y ) 4. ( 1 ) ( X , Y ) f ( x , y ) = { 1 S D , ( x , y ) D 0 , ( x , y ) D ( 2 ) ( X , Y ) N ( μ 1 , μ 2 , σ 1 2 , σ 2 2 , ρ ) E X = μ 1 , E Y = μ 2 , D X = σ 1 2 , D Y = σ 2 2 , ϱ x y = ρ \begin{aligned} 1.&聯合分佈\quad 設(X,Y),F(x,y)=P\{X\leq x,Y\leq y\},-\infty< x<+\infty,-\infty< y<+\infty\\ 2.&邊緣分佈\quad F_X(x)=\lim_{y\to+\infty}F(x,y),F_Y(y)=\lim_{x\to+\infty}F(x,y)\\ [注]&1.離散型(X,Y)\sim P_{ij}(聯合分佈律)\\ &條件分佈爲P(X=x_i\mid Y=y_i)=\frac{P(X=x_i,Y=y_j)}{P(Y=y_j)}=\frac{P_{ij}}{P_{\cdot j}}\\ &P(X=1\mid Y=0)=\frac{P_{21}}{P_{\cdot 1}}\\ &條件=\frac{聯合}{邊緣}\\ &2.連續型(X,Y)\sim f(x,y)(聯合概率密度)\\ &邊緣密度爲f_X(x)=\int_{-\infty}^{+\infty}f(x,y)dy,f_Y(y)=\int_{-\infty}^{+\infty}f(x,y)dx\\ &條件密度爲f_{X\mid Y}(x\mid y)=\frac{f(x,y)}{f_Y(y)}\\ &無論離散還是連續,條件=\frac{聯合}{邊緣}\\ 3.&獨立性\quad 設(X,Y),X,Y獨立\iff F(x,y)=F_X(x)\cdot F_Y(y)\\ &\iff P_{ij}=P_{i\cdot}\cdot P_{\cdot j},\forall i,j\\ &\iff f(x,y)=f_X(x)\cdot f_Y(y)\\ 4.&兩個分佈\\ &(1)均勻分佈\quad (X,Y)\sim f(x,y)=\begin{cases}\frac1{S_D},(x,y)\in D\\0,(x,y)\notin D\end{cases}\\ &(2)正態分佈\quad (X,Y)\sim N(\mu_1,\mu_2,\sigma_1^2,\sigma_2^2,\rho)\\ &其中EX=\mu_1,EY=\mu_2,DX=\sigma_1^2,DY=\sigma_2^2,\varrho_{xy}=\rho\\ \end{aligned}

用分佈求概率

  [ 1 ] ( X , Y ) X   Y 0 1 0 a 0.4 1 0.1 b { x = 0 } { X + Y = 1 } U = m a x { X , Y } , V = m i n { X , Y } , P = { U + V = 1 } = U = m a x { X , Y } = ( X + Y ) + X Y 2 V = m i n { X , Y } = ( X + Y ) X Y 2 U + V = X + Y       P ( U + V = 1 ) = P { X + Y = 1 } = 0.5 [ 2 ] ( X , Y ) D = { ( x , y ) 1 x e 2 , 0 y 1 x } ( X , Y ) x f X ( x ) x = e S D = 1 e 2 1 x d x = ln x 1 e 2 = 2 0 = 2       ( X , Y ) f ( x , y ) = { 1 2 , ( x , y ) D 0 , ( x , y ) D f X ( x ) = { 0 1 x 1 2 d y , 1 x e 2 0 , = { 1 2 x , 1 x e 2 0 ,       f X ( e ) = 1 2 e [ 3 ] ( X , Y ) f ( x , y ) = { x , 0 < x < 1 , 0 < y < x 0 , Z = X Y f Z ( z ) ( X , Y ) f ( x , y ) , Z = g ( x , y )       f Z ( z ) 1. F Z ( z ) = P { Z z } = P { g ( X , Y ) z } = g ( x , y ) z f ( x , y ) d σ 2. f Z ( z ) = F Z ( z ) 1. F Z ( z ) = P { Z z } = P { X Y z } ( 1 ) z < 0       F Z ( z ) = 0 ( 2 ) z 1       F Z ( z ) = 1 ( 3 ) 0 z < 1       F Z ( z ) = D f ( x , y ) d σ = 0 z d x 0 x 3 x d y + z 1 d x x z x 3 x d y = 3 2 z 1 2 z 3       f Z ( z ) = { 3 2 3 2 z 2 , 0 z < 1 0 , [ 4 ] X , Y P { X = 0 } = P { X = 1 } = 1 2 , P { Y x } = x , 0 < y 1 , Z = X Y X P i , Y f Y ( y ) = { 1 , 0 < y < 1 0 , ( 1 ) X ; ( 2 ) X Y F Z ( z ) = P { Z z } = P { X Y z } = P ( X = 0 ) P ( X Y z X = 0 ) + P ( X = 1 ) P ( X Y z X = 1 ) 1 2 [ P ( 0 z ) + P ( Y z ) ] = 1 2 F Z ( z ) = { z < 0       F Z ( z ) = 0 z 1       F Z ( z ) = 1 0 z < 1       F Z ( z ) = 1 2 ( 1 + z ) \begin{aligned} \ [例1]&\color{maroon}(X,Y)\sim \begin{array}{c|cc} X\ Y & 0 & 1 \\ \hline 0 & a & 0.4 \\ 1 & 0.1 & b \\ \end{array}\\ &\color{maroon}若\{x=0\}與\{X+Y=1\}獨立,令U=max\{X,Y\},V=min\{X,Y\},則P=\{U+V=1\}=\underline{\quad}\\ &U=max\{X,Y\}=\frac{(X+Y)+\mid X-Y\mid}{2}\\ &V=min\{X,Y\}=\frac{(X+Y)-\mid X-Y\mid}2\\ &U+V=X+Y\implies P(U+V=1)=P\{X+Y=1\}=0.5\\ [例2]&\color{maroon}設(X,Y)在D=\{(x,y)\mid 1\leq x\leq e^2,0\leq y\leq \frac1x\}上服從均勻分佈\\ &\color{maroon}則(X,Y)關於x\sim f_X(x)在x=e處得值爲\underline{\quad}\\ &S_D=\int_1^{e^2}\frac1xdx=\ln x\mid^{e^2}_1=2-0=2\\ &\implies (X,Y)\sim f(x,y)=\begin{cases}\frac12,(x,y)\in D\\0,(x,y)\notin D\end{cases}\\ &求誰不積誰,不積先定限,限內畫條線,先交寫下限,後交寫上限\\ &f_X(x)=\begin{cases}\int_0^{\frac1x}\frac12dy,1\leq x\leq e^2\\0,其他\end{cases}=\begin{cases}\frac{1}{2x},1\leq x\leq e^2\\0,其他\end{cases}\\ &\implies f_X(e)=\frac1{2e}\\ [例3]&\color{maroon}(X,Y)\sim f(x,y)=\begin{cases}x,0< x< 1,0< y< x\\0,其他\end{cases},求Z=X-Y的f_{Z}(z)\\ &(X,Y)\sim f(x,y),Z=g(x,y)\implies f_Z(z)\\ &1.F_Z(z)=P\{Z\leq z\}=P\{g(X,Y)\leq z\}=\iint_{g(x,y)\leq z}f(x,y)d\sigma\\ &2.f_Z(z)=F_Z'(z)\\ &1.F_Z(z)=P\{Z\leq z\}=P\{X-Y\leq z\}\\ &(1)z<0 \implies F_Z(z)=0\\ &(2)z\geq1\implies F_Z(z)=1\\ &(3)0\leq z<1\implies F_Z(z)=\iint_Df(x,y)d\sigma=\int_0^zdx\int_0^x3xdy+\int_z^1dx\int_{x-z}^x3xdy=\frac32z-\frac12z^3\\ &\implies f_Z(z)=\begin{cases}\frac32-\frac32z^2,0\leq z<1\\0,其他\end{cases}\\ [例4]&\color{maroon}X,Y相互獨立,P\{X=0\}=P\{X=1\}=\frac12,P\{Y\leq x\}=x,0< y\leq1,求Z=XY的分佈函數\\ &X\sim P_i,Y\sim f_Y(y)=\begin{cases}1,0< y <1\\0,其他\end{cases}\\ &(1)選X;(2)作XY\\ &F_Z(z)=P\{Z\leq z\}=P\{XY\leq z\}=P(X=0)P(XY\leq z\mid X=0)+P(X=1)P(XY\leq z\mid X=1)\\ &\frac12[P(0\leq z)+P(Y\leq z)]=\frac12\\ &F_Z(z)=\begin{cases}z<0 \implies F_Z(z)=0\\z\geq1\implies F_Z(z)=1\\0\leq z<1\implies F_Z(z)=\frac12(1+z)\end{cases}\\ \end{aligned}

數字特徵

概念

數學期望與方差

1. ( 1 ) E X { X P i       E X = i x i P i X f ( x )       E X = + f ( x ) d x ( 2 ) X p i , Y = g ( X )       E Y = i g ( x i ) p i ( 3 ) X f ( x ) , Y = g ( X )       E Y = + g ( x ) f ( x ) d x ( 4 ) ( X , Y ) p i j , Z = g ( X , Y )       E Z = i j g ( x i , y i ) p i j ( 5 ) ( X , Y ) f ( x , y ) , Z = g ( X , Y )       E Z = + + g ( x , y ) f ( x , y ) d x d y 2. D X = E [ ( X E X ) 2 ] ( 1 ) { X p i       D X = E [ ( X E X ) 2 ] = i ( x i E X ) 2 p i X f ( x )       D X = E [ ( X E X ) 2 ] = + ( x E X ) 2 f ( x ) d x ( 2 ) : D X = E [ ( X E X ) 2 ] = E [ X 2 2 X E X + ( E X ) 2 ] = E ( X 2 ) 2 E X E X + ( E X ) 2 ] D X = E ( X 2 ) ( E X ) 2 3. ( 1 ) E a = a , E ( E X ) = E X ( 2 ) E ( a X + b Y ) = a E X + b E Y , E ( i = 1 n a i X i ) = i = 1 n a i E X i ( ) ( 3 ) X , Y E ( X Y ) = E X E Y ( 4 ) D a = 0 , D ( E X ) = 0 , D ( D X ) = 0 ( 5 ) X , Y D ( X ± Y ) = D X + D Y ( 6 ) D ( a X + b ) = a 2 D X , E ( a X + b ) = a E X + b ( 7 ) , D ( X ± Y ) = D X + D Y ± 2 C o v ( X , Y ) D ( i = 1 n X i ) = i = 1 n D X i + 2 1 i < j n C o v ( x i , x j ) [ ] 1.0 1 E X = p , D X = p p 2 = ( 1 p ) p , X ( 1 0 p 1 p ) 2. X B ( n , p ) , E X = n p , D X = n p ( 1 p ) 3. X P ( λ ) , E X = λ , D X = λ 4. X G e ( p ) , E X = 1 p , D X = 1 p p 2 5. X U [ a , b ] , E X = a + b 2 , D X = ( b a ) 2 12 6. X E X ( λ ) , E X = 1 λ , D X = 1 λ 2 7. X N ( μ , σ 2 ) , E X = μ , D X = σ 2 8. X χ 2 ( n ) , E X = n , D X = 2 n \begin{aligned} 1.&期望定義\\ (1)&EX\begin{cases}X\sim P_i\implies EX=\sum_ix_iP_i\\X\sim f(x)\implies EX=\int_{-\infty}^{+\infty}f(x)dx\end{cases}\\ (2)&X\sim p_i,Y=g(X)\implies EY=\sum_ig(x_i)p_i\\ (3)&X\sim f(x),Y=g(X)\implies EY=\int_{-\infty}^{+\infty}g(x)f(x)dx\\ (4)&(X,Y)\sim p_{ij},Z=g(X,Y)\implies EZ=\sum_i\sum_jg(x_i,y_i)p_{ij}\\ (5)&(X,Y)\sim f(x,y),Z=g(X,Y)\implies EZ=\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}g(x,y)f(x,y)dxdy\\ 2.&方差定義\\ &DX=E[(X-EX)^2]\\ (1)&定義法:\begin{cases}X\sim p_i\implies DX=E[(X-EX)^2]=\sum_i(x_i-EX)^2p_i\\X\sim f(x)\implies DX=E[(X-EX)^2]=\int_{-\infty}^{+\infty}(x-EX)^2f(x)dx\end{cases}\\ (2)&公式法:DX=E[(X-EX)^2]=E[X^2-2\cdot X\cdot EX+(EX)^2]=E(X^2)-2\cdot EX\cdot EX+(EX)^2]\\ &DX=E(X^2)-(EX)^2\\ 3.&性質\\ (1)&Ea=a,E(EX)=EX\\ (2)&E(aX+bY)=aEX+bEY,E(\sum_{i=1}^na_iX_i)=\sum_{i=1}^na_iEX_i(無條件)\\ (3)&若X,Y相互獨立,則E(XY)=EXEY\\ (4)&Da=0,D(EX)=0,D(DX)=0\\ (5)&若X,Y相互獨立,則D(X\pm Y)=DX+DY\\ (6)&D(aX+b)=a^2DX,E(aX+b)=aEX+b\\ (7)&一般,D(X\pm Y)=DX+DY\pm 2Cov(X,Y)\\ &D(\sum_{i=1}^nX_i)=\sum_{i=1}^nDX_i+2\sum_{1\leq i< j\leq n}Cov(x_i,x_j)\\ [注]&1.0-1分佈,EX=p,DX=p-p^2=(1-p)p,X\sim\begin{pmatrix}1&0\\p&1-p\end{pmatrix}\\ &2.X\sim B(n,p),EX=np,DX=np(1-p)\\ &3.X\sim P(\lambda),EX=\lambda,DX=\lambda\\ &4.X\sim Ge(p),EX=\frac1p,DX=\frac{1-p}{p^2}\\ &5.X\sim U[a,b],EX=\frac{a+b}2,DX=\frac{(b-a)^2}{12}\\ &6.X\sim E_X(\lambda),EX=\frac1{\lambda},DX=\frac1{\lambda^2}\\ &7.X\sim N(\mu,\sigma^2),EX=\mu,DX=\sigma^2\\ &8.X\sim \chi^2(n),EX=n,DX=2n\\ \end{aligned}

協方差與相關係數

C o v ( X , Y ) = E [ X E X ) ( Y E Y ) ] , C o v ( X , X ) = E [ ( X E X ) ( X E X ) ] = E [ ( X E X ) 2 ] = D X 1. { ( X , Y ) p i j       C o v ( X , Y ) = i j ( x i E X ) ( u i E Y ) p i j ( X , Y ) f ( x , y )       C o v ( X , Y ) = + + ( x E X ) ( y E Y ) f ( x , y ) d x d y 2. C o v ( X , Y ) = E ( X Y X E Y E X Y + E X E Y ) = E ( X Y ) E X E Y E X E Y + E X E Y = E ( X Y ) E X E Y 3. ρ X Y = C o v ( X , Y ) D X D Y { = 0       X , Y ̸ = 0       X , Y 1. C o v ( X , Y ) = C o v ( Y , X ) 2. C o v ( a X , b Y ) = a b C o v ( X , Y ) 3. C o v ( X 1 + X 2 , Y ) = C o v ( X 1 , Y ) + C o v ( X 2 , Y ) 4. ρ X Y 1 5. ρ X Y = 1       P { Y = a X + b } = 1 ( a > 0 ) , ρ X Y = 1       P { Y = a X + b } = 1 ( a < 0 ) Y = a X + b , a > 0       ρ X Y = 1 , Y = a X + b , a < 0       ρ X Y = 1 ρ X Y = 0       { C o v ( X , Y ) = 0 E ( X Y ) = E X E Y D ( X + Y ) = D X + D Y D ( X Y ) = D X + D Y X , Y       ρ X Y = 0 ( X , Y ) N ( μ , σ 2 ) , X , Y       X , Y ( ρ X Y = 0 ) \begin{aligned} &Cov(X,Y)=E[X-EX)(Y-EY)],Cov(X,X)=E[(X-EX)(X-EX)]=E[(X-EX)^2]=DX\\ &1.定義法\\ &\begin{cases}(X,Y)\sim p_{ij}\implies Cov(X,Y)=\sum_i\sum_j(x_i-EX)(u_i-EY)p_{ij}\\(X,Y)\sim f(x,y)\implies Cov(X,Y)=\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}(x-EX)(y-EY)f(x,y)dxdy\end{cases}\\ &2.公式法\\ &Cov(X,Y)=E(XY-X\cdot EY-EX\cdot Y+EX\cdot EY)\\ &=E(XY)-EX\cdot EY-EX\cdot EY+EX\cdot EY=E(XY)-EXEY\\ &3.\rho_{XY}=\frac{Cov(X,Y)}{\sqrt{DX}\sqrt{DY}}\begin{cases}=0\iff X,Y不相關\\\not=0\iff X,Y相關\end{cases}\\ 性質&1.Cov(X,Y)=Cov(Y,X)\\ &2.Cov(aX,bY)=abCov(X,Y)\\ &3.Cov(X_1+X_2,Y)=Cov(X_1,Y)+Cov(X_2,Y)\\ &4.\mid \rho_{XY}\mid\leq1\\ &5.\rho_{XY}=1\iff P\{Y=aX+b\}=1(a>0),\rho_{XY}=-1\iff P\{Y=aX+b\}=1(a<0)\\ &考試時:Y=aX+b,a>0\implies \rho_{XY}=1,Y=aX+b,a<0\implies \rho_{XY}=-1\\ 小結&五個充要條件\\ &\rho_{XY}=0\iff\begin{cases}Cov(X,Y)=0\\E(XY)=EX\cdot EY\\D(X+Y)=DX+DY\\D(X-Y)=DX+DY\end{cases}\\ &X,Y獨立\implies \rho_{XY}=0\\ &若(X,Y)\sim N(\mu,\sigma^2),則X,Y獨立\iff X,Y不相關(\rho_{XY}=0)\\ \end{aligned}

例題

  [ 1 ] x 1 , x 2 , x 3 P ( λ ) , Y = 1 3 ( x 1 + x 2 + x 3 ) , E Y 2 = E ( x 1 , x 2 , x 3 ) = 3 λ D ( x 1 , x 2 , x 3 ) = 3 λ E Y = E ( 1 3 ( x 1 , x 2 , x 3 ) ) = 1 3 3 λ = λ D Y = D ( 1 3 ( x 1 , x 2 , x 3 ) ) = 1 9 3 λ = λ E Y 2 = ( E Y ) 2 + D Y = λ 2 + λ 3 [ 2 ] X f ( x ) = { 3 8 x 2 , 0 < x < 2 0 , , E ( 1 x 2 ) = E ( 1 x 2 ) = + 1 x 2 f ( x ) d x = 0 2 1 x 2 3 8 x 2 d x = 3 4 [ 3 ] X B ( 1 , 1 2 ) , Y B ( 1 , 1 2 ) , D ( X + Y ) = 1 , ρ X Y = ρ X Y = C o v ( X , Y ) D X D Y 1 = D ( X + Y ) + D X + D Y + 2 C o v ( X , Y )       C o v ( X , Y ) = 1 4 ρ X Y = 1 4 1 2 1 2 = 1 [ 4 ] ( X , Y ) f ( x , y ) = { 1 , 0 y x 1 0 , , C o v ( X , Y ) = C o v ( X , Y ) = E X Y E X E Y E X Y = D x y f ( x , y ) d x d y = 0 E Y = E 1 Y = + + x 0 y 1 f ( x , y ) d x d y = + + y f ( x , y ) d σ = D y 1 d σ = 0 C o v ( X , Y ) = E X Y E X E Y = 0 \begin{aligned} \ [例1]&\color{maroon}設x_1,x_2,x_3相互獨立\sim P(\lambda),令Y=\frac13(x_1+x_2+x_3),則EY^2=\underline{\quad}\\ &E(x_1,x_2,x_3)=3\lambda\quad D(x_1,x_2,x_3)=3\lambda\\ &EY=E(\frac13(x_1,x_2,x_3))=\frac133\lambda=\lambda\\ &DY=D(\frac13(x_1,x_2,x_3))=\frac193\lambda=\lambda\\ &EY^2=(EY)^2+DY=\lambda^2+\frac{\lambda}3\\ [例2]&\color{maroon}X\sim f(x)=\begin{cases}\frac38x^2,0< x< 2\\0,其他\end{cases},則E(\frac1{x^2})=\underline{\quad}\\ &E(\frac1{x^2})=\int_{-\infty}^{+\infty}\frac1{x^2}f(x)dx=\int_0^2\frac1{x^2}\frac38x^2dx=\frac34\\ [例3]&\color{maroon}X\sim B(1,\frac12),Y\sim B(1,\frac12),D(X+Y)=1,則\rho_{XY}=\underline{\quad}\\ &\rho_{XY}=\frac{Cov(X,Y)}{\sqrt{DX}\sqrt{DY}}\\ &1=D(X+Y)+DX+DY+2Cov(X,Y)\implies Cov(X,Y)=\frac14\\ &\rho_{XY}=\frac{\frac14}{\frac12\cdot\frac12}=1\\ [例4]&\color{maroon}(X,Y)\sim f(x,y)=\begin{cases}1,0\leq \mid y\mid\leq x\leq1\\0,其他\end{cases},則Cov(X,Y)=\underline{\quad}\\ &Cov(X,Y)=EXY-EXEY\\ &其中EXY=\iint_Dx\cdot yf(x,y)dxdy=0\\ &EY=E\cdot1\cdot Y=\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}x^0y^1f(x,y)dxdy=\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}yf(x,y)d\sigma=\iint_Dy\cdot1d\sigma=0\\ &Cov(X,Y)=EXY-EXEY=0 \end{aligned}

大數定律與中心極限定理

依概率收斂

{ X n } r , v X r , v ( a ) ε > 0 , lim n P { X n X < ε } = 1 lim n P { X n a < ε } = 1 , { X n } X a X n X X a a [ 1 ] { X n } , X n f n ( x ) = n π ( 1 + n 2 x 2 ) , x R , X n 0 P { ε < X n < ε } = ε ε n π ( 1 + n 2 x 2 ) d x = 1 π arctan x ε ε = 2 π arctan n ε lim n 2 π arctan n ε = 1 \begin{aligned} &設\{X_n\}爲一r,v序列,X爲一r,v(或a爲常數)\\ &若\forall \varepsilon>0,恆有\lim_{n\to\infty}P\{\mid X_n-X\mid<\varepsilon\}=1或\lim_{n\to\infty}P\{\mid X_n-a\mid<\varepsilon\}=1,則稱\{X_n\}依概率收斂於X或a\\ &記:X_n\to X 或 X_a\to a\\ [例1]&\color{maroon}設\{X_n\},X_n\sim f_n(x)=\frac{n}{\pi(1+n^2x^2)},x\in R,證X_n\to0\\ &P\{-\varepsilon<X_n<\varepsilon\}=\int_{-\varepsilon}^{\varepsilon}\frac{n}{\pi(1+n^2x^2)}dx=\frac1{\pi}\arctan x\mid^{\varepsilon}_{-\varepsilon}=\frac{2}{\pi}\arctan n\varepsilon\\ &\lim_{n\to\infty}\frac2{\pi}\arctan n\varepsilon=1\\ \end{aligned}

三個定律與兩個定理

大數定律

1. { X n } ( n = 1 , 2 ,   ) 0 D X k 1 n i = 1 n X i 1 n i = 1 n E X i = E ( 1 n i = 1 n X i ) k 2. u n n A A p ( 0 < p < 1 ) , u n n p 3. { X n } E X n = μ 1 n i = 1 n X i μ [ ] 滿 1 n i = 1 n X i E ( 1 n i = 1 n X i ) \begin{aligned} 1.&切比雪夫大數定律\\ &設\{X_n\}(n=1,2,\cdots)0是相互獨立的隨機變量序列,若方差DX_k存在且一致有上界,則\\ &\frac1n\sum_{i=1}^nX_i\to\frac1n\sum_{i=1}^nEX_i=E(\frac1n\sum_{i=1}^nX_i)\\ &一致有上界皆有共同的上界,與k無關\\ 2.&伯努利大數定律\\ &設u_n是n重伯努利試驗中事件A發生的次數,在每次試驗中A發生的概率爲p(0<p < 1),則\frac{u_n}n\to p\\ 3.&辛欽大數定律\\ &設\{X_n\}是獨立同分布的隨機變量序列,若EX_n=\mu存在,則\frac1n\sum_{i=1}^nX_i\to\mu\\ [注]&在滿足一定條件的基礎上,所有大數定律都在講一個結論 \frac1n\sum_{i=1}^nX_i\to E(\frac1n\sum_{i=1}^nX_i)\\ \end{aligned}

中心極限定理

X i i i d F ( μ , σ 2 ) , μ = E X i , σ 2 = D X i       i = 1 n X i n N ( n μ , n σ 2 )       i = 1 n X i n μ n σ n N ( 0 , 1 ) , lim n P { i = 1 n X i n μ n σ x } = Φ ( x ) [ 1 ] X 1 , X 2 ,   , X n i i d P ( λ ) , lim n P { i = 1 n X i n λ n λ x } = { E ( i = 1 n X i ) = n λ D ( i = 1 n X i ) = n λ lim n P { i = 1 n X i n λ n λ x } = Φ ( x ) \begin{aligned} &不論X_i\sim^{iid}F(\mu,\sigma^2),\mu=EX_i,\sigma^2=DX_i\implies \sum_{i=1}^n X_i\sim^{n\to\infty}N(n\mu,n\sigma^2)\\ &\implies \frac{\sum_{i=1}^n X_i-n\mu}{\sqrt{n}\sigma}\sim^{n\to\infty}N(0,1),即\lim_{n\to\infty}P\left\{\frac{\sum_{i=1}^n X_i-n\mu}{\sqrt{n}\sigma}\leq x\right\} =\Phi(x)\\ [例1]&\color{maroon}假設X_1,X_2,\cdots,X_n\sim^{iid}P(\lambda),則\lim_{n\to\infty}P\{\frac{\sum_{i=1}^n X_i-n\lambda}{\sqrt{n\lambda}}\leq x\}=\underline{\quad}\\ &\begin{cases}E(\sum_{i=1}^n X_i)=n\lambda\\D(\sum_{i=1}^n X_i)=n\lambda\end{cases}\\ &\lim_{n\to\infty}P\{\frac{\sum_{i=1}^n X_i-n\lambda}{\sqrt{n\lambda}}\leq x\}=\Phi(x)\\ \end{aligned}

相關文章
相關標籤/搜索