b:head_first_statistics:geometric_binomial_and_poisson_distributions
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
b:head_first_statistics:geometric_binomial_and_poisson_distributions [2023/10/17 18:31] – [Broken Cookies case] hkimscil | b:head_first_statistics:geometric_binomial_and_poisson_distributions [2023/10/19 19:00] (current) – [Geometric Binomial and Poisson Distributions] hkimscil | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Geometric Binomial and Poisson Distributions ====== | ====== Geometric Binomial and Poisson Distributions ====== | ||
+ | 정리 | ||
+ | \begin{align*} | ||
+ | \text{Geometric Distribution: | ||
+ | p(X = k) & = q^{k-1} \cdot p \\ | ||
+ | E\left[ X \right] & = \frac{1}{p} \\ | ||
+ | V\left[ X \right] & = \frac{q}{p^2} \\ | ||
+ | \\ | ||
+ | \text{Binomial Distribution: | ||
+ | p(X = r) & = \binom{n}{r} \cdot p^{r} \cdot q^{n-r} \\ | ||
+ | E\left[ X \right] & = {n}{p} \\ | ||
+ | V\left[ X \right] & = {n}{p}{q} \\ | ||
+ | \\ | ||
+ | \text{Poisson Distribution: | ||
+ | P(X=r) & = e^{- \lambda} \cdot \dfrac{\lambda^{r}} {r!} \\ | ||
+ | E\left[ X \right] & = \lambda \\ | ||
+ | V\left[ X \right] & = \lambda \\ | ||
+ | \end{align*} | ||
+ | |||
===== Geometric Distributions ===== | ===== Geometric Distributions ===== | ||
Line 924: | Line 942: | ||
==== From a scratch (Proof of Binomial Expected Value) ==== | ==== From a scratch (Proof of Binomial Expected Value) ==== | ||
- | see [[:The Binomial | + | [[:Mean and Variance of Binomial |
- | + | ||
- | \begin{eqnarray*} | + | |
- | \text{The binomial theorem} & & \\ | + | |
- | (a + b)^{m} & = & \sum^{m}_{y=0}{{m}\choose{y}} a^{y} b^{m-y} \\ | + | |
- | \end{eqnarray*} | + | |
- | + | ||
- | 위의 식이 복잡해 보이지만 m = 3 일때의 이항정리식을 말한다 | + | |
- | \begin{align*} | + | |
- | \sum^{m}_{y=0}{{m}\choose{y}} a^{y} b^{m-y} \text{, m = 3} \\ | + | |
- | \end{align*} | + | |
- | + | ||
- | \begin{align*} | + | |
- | \sum^{3}_{y=0}{{3}\choose{y}} a^{y} b^{3-y} | + | |
- | & = {{3}\choose{0}} a^{0} b^{3-0} | + | |
- | + {{3}\choose{1}} a^{1} b^{3-1} | + | |
- | + {{3}\choose{2}} a^{2} b^{3-2} | + | |
- | + {{3}\choose{3}} a^{y} b^{3-3} | + | |
- | & = 1*a^0*b^3 | + | |
- | + 3*a^1*b^2 | + | |
- | + 3*a^2*b^1 | + | |
- | + 1*a^3*b^0 | + | |
- | & = a^3 | + | |
- | + 3 a^2 b^1 | + | |
- | + 3 a^1 b^2 | + | |
- | + b^3 \\ | + | |
- | \end{align*} | + | |
- | + | ||
- | + | ||
- | ==== For Mean ==== | + | |
- | \begin{eqnarray*} | + | |
- | E(X) & = & \sum_{x}x p(x) \\ | + | |
- | & = & \sum_{x=0}^{n} x {{n}\choose {x}} p^x(1-p)^{n-x} | + | |
- | & = & \sum_{x=0}^{n} x \frac{n!}{x!(n-x)!} p^x(1-p)^{n-x} | + | |
- | \text{note that } x! = x(x-1)! \\ | + | |
- | & = & \sum_{x=1}^{n} \frac{n!}{(x-1)!(n-x)!} p^x(1-p)^{n-x} | + | |
- | \text{cause we know that E(x) = np,} \\ | + | |
- | \text{we extract np outside from summation} \\ | + | |
- | \text{note that } p^x = p * p^{x-1} \\ | + | |
- | \text{and } n! = n * (n-1)! \\ | + | |
- | & = & \sum_{x=1}^{n} \frac{\underline{n}*(n-1)!}{(x-1)!(n-x)!} (\underline{p}*p^{x-1})(1-p)^{n-x} | + | |
- | \text{we take out the underlined part} \\ | + | |
- | \text{(that is, np) out of the sigma part } \\ | + | |
- | & = & np \sum_{x=1}^{n} \frac{(n-1)!}{(x-1)!(n-x)!} p^{x-1}(1-p)^{n-x} | + | |
- | & = & np \underline{ \sum_{x=1}^{n} {\frac{(n-1)!}{(x-1)!(n-x)!} p^{x-1}(1-p)^{n-x}}} | + | |
- | \text{we want to check the underlined} \\ | + | |
- | \text{part is equal to one so that np is left out} \\ | + | |
- | n-x = (n-1)-(x-1) \\ | + | |
- | & = & np \sum_{x=1}^{n} \frac{(n-1)!}{(x-1)!((n-1)-(x-1))!} p^{x-1}(1-p)^{(n-1)-(x-1)} | + | |
- | m = n - 1 \\ | + | |
- | y = x - 1 \\ | + | |
- | & = & np \sum_{y=0}^{m} \frac{(m)!}{(y)!(m-y))!} p^{y}(1-p)^{(m-y)} | + | |
- | & = & np \sum_{y=0}^{m} \frac{(m)!}{(y)!(m-y))!} p^{y}(1-p)^{(m-y)} | + | |
- | & = & np \sum_{y=0}^{m} {{m}\choose {y}} p^{y}(1-p)^{(m-y)} | + | |
- | \text{Recall that} \\ | + | |
- | \sum^{m}_{y=0}{{m}\choose{y}} a^{y} b^{m-y} = (a + b)^{m} \\ | + | |
- | & = & np (p + (1-p))^m | + | |
- | & = & np (1)^m \\ | + | |
- | & = & np \\ | + | |
- | \end{eqnarray*} | + | |
- | + | ||
- | ==== For variance ==== | + | |
- | \begin{align*} | + | |
- | Var(X) & = E[(X-\mu)^2] \\ | + | |
- | & = \sum_{x}(x-\mu)^2p(x) \\ | + | |
- | \text{We also know that: } \\ | + | |
- | E[(X-\mu)^2] & = E(X^2) - [E(X)]^2 \\ | + | |
- | \end{align*} | + | |
- | + | ||
- | \begin{align*} | + | |
- | E(X^2) & = \sum_{x=0}^{n} x^2 {{n}\choose{x}} p^x (1-p)^{n-x} \\ | + | |
- | & = \sum_{x=0}^{n} x^2 \frac{n!}{x!(n-x)!} p^x (1-p)^{n-x} \\ | + | |
- | \end{align*} | + | |
- | + | ||
- | 그런데 $E(X^2)$ 대신 $E[X(X-1)]$을 생각해보면 | + | |
- | + | ||
- | \begin{align*} | + | |
- | E[X(X-1)] & = \sum_{x=0}^{n} x(x-1) \frac{n!}{x!(n-x)!} p^x (1-p)^{n-x} \\ | + | |
- | & = \sum_{x=2}^{n} \frac{n!}{(x-2)!(n-x)!} p^x (1-p)^{n-x} \\ | + | |
- | & = n(n-1)p^2 \sum_{x=2}^{n} \frac{(n-2)!}{(x-2)!(n-x)!} p^{x-2} (1-p)^{n-x} \\ | + | |
- | \text{cause} \\ | + | |
- | n - x = (n - 2)-(x - 2) \\ | + | |
- | & = n(n-1)p^2 \sum_{x=2}^{n} \frac{(n-2)!}{(x-2)!((n-2)-(x-2))!} p^{x-2} (1-p)^{(n-2)-(x-2)} \\ | + | |
- | m = n - 2 \\ | + | |
- | y = x - 2 \\ | + | |
- | & = n(n-1)p^2 \sum_{y=0}^{m} \frac{m!}{y!((m-y))!} p^{y} (1-p)^{(m-y)} \\ | + | |
- | & = n(n-1)p^2 \underline {\sum_{y=0}^{m} \frac{m!}{y!((m-y))!} p^{y} (1-p)^{m-y} } \\ | + | |
- | & = n(n-1)p^2 \underline {\sum_{y=0}^{m} {{m}\choose{y}} p^{y} (1-p)^{m-y} } \\ | + | |
- | + | ||
- | \text {we know that the underline part is} \\ | + | |
- | (p+(1-p))^m = 1^m \\ | + | |
- | & = n(n-1)p^2 (p + (1-p))^m \\ | + | |
- | & = n(n-1)p^2 \\ | + | |
- | \end{align*} | + | |
- | . . . . | + | |
- | \begin{align*} | + | |
- | E[X(X - 1)] & = n(n-1)p^2 \\ | + | |
- | E[X^2 - X] & = n(n-1)p^2 \\ | + | |
- | E[X^2]- E[X] & = n(n-1)p^2 \\ | + | |
- | E[X^2]- np & = n(n-1)p^2 \\ | + | |
- | E[X^2]& = n(n-1)p^2 + np \\ | + | |
- | \\ | + | |
- | \end{align*} | + | |
- | + | ||
- | \begin{align*} | + | |
- | Var(X) & = E[X^2] - [E(X)]^2 | + | |
- | & = \left[n(n-1)p^2 + np \right] - \left[np \right]^2 | + | |
- | & = np[(n-1)p + 1 - np] \\ | + | |
- | & = np[np - p + 1 - np] \\ | + | |
- | & = np(1 - p) \\ | + | |
- | & = npq \\ | + | |
- | \\ | + | |
- | \end{align*} | + | |
- | + | ||
- | + | ||
====== Poisson Distribution ====== | ====== Poisson Distribution ====== | ||
$$X \sim Po(\lambda)$$ | $$X \sim Po(\lambda)$$ |
b/head_first_statistics/geometric_binomial_and_poisson_distributions.1697535119.txt.gz · Last modified: 2023/10/17 18:31 by hkimscil