# 【統計學】05 連續分佈 [TOC] --- ### Definition Distribution of a continuous random variable $X$ describes the behavior of $X$ by specifying the <span style="color:blue">**density**</span> of $X$ which is obtained by first stacking teh replicates of the continuous random variable over the real line and then making <span style="color:green">the area under the density curve equals 1</span>. <br> ### Abstract 在本文會討論以下七種連續分布 (但其實只有前三種) : - **$\text{Uniform}(\alpha, \beta)$ (均勻分佈)** 在 interval $(\alpha, \beta)$ 之間,隨機變數與附近任何值是相同的。 The density curve is a rectangle, <span style="color:green">range : $(\alpha, \beta)$</span> - **$\text{Normal}(\mu, \sigma^2)$ (常態分佈)** The density curve is a symmetric(對稱的) bell-shaped curve(鈴鐺型曲線)which has inflection points at $\mu \pm \sigma$. 數個隨機變數的加總可能會構成 Normal distribution. <span style="color:green">Range : $(-\infty, \infty)$</span> - **$\text{Gamma}(\alpha, \beta)$ and $\underbrace{\text{Exponential}(\beta)}_{Gamma(\alpha = 1, \beta)}$** 經常用在電器元件壽命和路程所需時間,指數分佈是唯一具有 <span style="color:blue">memoryless property (無記憶性)</span> 的連續分佈。和 Poisson process 有異曲同工之關係. <span style="color:green">Range : $(0, \infty)$</span> - **$\text{Chi-square}(v)$** 在統計推論中是很重要的樣本分佈。<span style="color:green">Range : $(0, \infty)$</span> $\text{Chi-square}(v) \equiv \text{Gamma}(\alpha = v/2, \ \beta = 2) \text{ and Chi-square} \equiv \text{Exponential}(\beta = 2)$. - **$\text{Beta}(\alpha, \beta)$** $\text{Uniform}(0, 1) \equiv \text{Beta}(\alpha = 1, \beta = 1) \implies$ 當隨機機率在 0 到 1 之間是可能被建構 by Beta distribution, <span style="color:green">range : $(0, 1)$ </span> - **$\text{Log-normal}(\mu, \sigma^2)$** $\text{If } ln(X) \sim \text{Normal}(\mu, \sigma^2) \text{, then } X \sim \text{Log-normal}(\mu, \sigma^2)$, <span style="color:green">range : $(0, \infty)$</span> - **$\text{Weibull}(\alpha, \beta)$** 這項分佈也經常被用在電子元件的生命週期,且更彈性因為沒有無記憶性。與 Gamma 分佈不同的是,Weibull 分佈的 CDF 具有封閉性,失敗率也可能是時間的遞增或遞減函數。<span style="color:green">Range : $(0, \infty)$</span> <br><br> <img src='https://analyticsbuddhu.files.wordpress.com/2017/02/overview-prob-distr.png'><br><br> --- ## Part 1. Uniform distribution ==<span style="color:red">$X \sim \text{Uniform}(\alpha, \beta)$</span>== #### Range : $X \in (\alpha, \beta)$ #### Density Function $$ f(x) = \left\{ \begin{array}{l} \frac{1}{\beta - \alpha} \text{ , if } \alpha < x < \beta \\ 0 \text{ , otherwise} \end{array} \right. $$ #### Expected Value and Variance $E(X) = \frac{\alpha + \beta}{2} \ \text{ and } \ Var(X) = \frac{(\beta - \alpha)^2}{12}$ <br> --- ## Part 2. Central Limit Theorem 中央極限定理 又稱樣本平均數抽樣分佈或平均數之標準誤 ( distribution of sample means / standard error of the mean, **SE(X)** ) #### Properties - 樣本平均數抽樣分佈會趨近常態分佈 - 樣本平均數抽樣分佈之平均數會等於母群體平均數 - 樣本平均數抽樣分佈的標準差,又稱<span style="color:blue">「平均數之標準誤」,會等於母群體標準差除以樣本數 n 的平方根</span> $\implies n \text{ increasing and } SE(X) \text{ decreasing}$ 中央極限定理中指出,當取樣數n夠大時,樣本平均數抽樣分佈可表示為一常態分佈。可使用 Z-score 來得知某樣本平均數在此樣本平均數抽樣分佈中的相對位置。 ### 2.1 Z-score (standard score) 將觀察值減去其母體平均數後再除以其母體標準差所得的值,即將觀察值與母體平均數之間的距離,以標準差為單位來計算。轉換過程稱為Z轉換(Z-transformation)或標準化(standardization)。 Z-score 的平均數為 $0$,標準差為 $1$ <br> > [About Central Limit Theorem 優質影片介紹](https://youtu.be/zeJD6dqJ5lo?si=1SZt8iw1rNsTwrrg) <br> --- ## Part 3. Normal distribution 基於<span style="color:blue">Central Limit Theorem (中央極限定理)</span>,變數總和會趨近常態分佈。 ==<span style="color:red">$X \sim \text{Normal}(\mu, \sigma^2)$</span>== #### Range : $-\infty < x < \infty$ #### Density function $$ f_X(x) = \dfrac{1}{\sqrt{2\pi}\sigma} e^{-(0.5)(\frac{x - \mu}{\sigma})^2} \text{ , } -\infty < x < \infty $$ <br> ### 2.1 Expected Value and Variance <span style="color:red">$E(X) = \mu$</span> $\text{ and }$ <span style="color:red">$Var(X) = \sigma^2$</span> > Standardize &nbsp; $X \to$ &nbsp; Let $Z = \frac{X-\mu}{\sigma}$ &nbsp; , then $Z$ is the 「standard normal」 random variable with density $f_Z(z) = \frac{1}{\sqrt{2\pi}} e^{-(0.5)z^2}\ \ , -\infty < \infty$ > > $\implies E(Z) = 0 \text{ to show } E(X) = \mu$ > $\implies Var(Z) = 1 \text{ to show } Var(X) = \sigma^2$ <br> --- ## Part 3. Gamma and Exponential distribution - [Exponential and Gamma Distributions](https://stats.libretexts.org/Courses/Saint_Mary%27s_College_Notre_Dame/MATH_345__-_Probability_(Kuter)/4%3A_Continuous_Random_Variables/4.5%3A_Exponential_and_Gamma_Distributions) <br> ---