geometric_distribution
This is an old revision of the document!
Table of Contents
Geometric Distribution
기하분포
\begin{align*} \text{Geometric Distribution: } \;\;\; \text{X} & \thicksim Geo(p) \\ p(X = k) & = q^{k-1} \cdot p \\ E\left[ X \right] & = \frac{1}{p} \\ V\left[ X \right] & = \frac{q}{p^2} \\ \\ \end{align*}
Proof of mean and variance of geometric distribution
dgeom in r
> dgeom(4, .2) [1] 0.08192 > dgeom(0:4, .2) [1] 0.20000 0.16000 0.12800 0.10240 0.08192 > sum(dgeom(0:4, .2)) [1] 0.67232
pgeom
> pgeom(4, .2, lower.tail=T) [1] 0.67232 > > pgeom(4, .2, lower.tail=F) [1] 0.32768 > > sum(dgeom(5:1000000, .2)) [1] 0.32768 > > > pgeom(4, .2, lower.tail=T)+pgeom(4, .2, lower.tail=F) [1] 1
qgeom
> qgeom(.5, .2) [1] 3 > pgeom(3, .2) [1] 0.5904 > qgeom(.6, .2) [1] 4 > > qgeom(1, .2) [1] Inf > qgeom(.2, .2) [1] 0 > > qgeom(.16, .2) [1] 0 > qgeom(.36, .2) [1] 1 >
rgeom
성공 확률이 .2 일 때 몇번 만에 성공할지 랜덤하게 구하는 것을 다섯 번 하라.
> rgeom(5, .2) [1] 5 6 5 0 8 >
e.g.,
The probability that another snowboarder will make it down the slope without falling over is 0.4. Your job is to play like you’re the snowboarder and work out the following probabilities for your slope success.
- The probability that you will be successful on your second attempt, while failing on your first.
- The probability that you will be successful in 4 attempts or fewer.
- The probability that you will need more than 4 attempts to be successful.
- The number of attempts you expect you’ll need to make before being successful.
- The variance of the number of attempts.
- $P(X = 2) = p * q^{2-1}$
- $P(X \le 4) = 1 - q^{4}$
- $P(X > 4) = q^{4}$
- $E(X) = \displaystyle \frac{1}{p}$
- $Var(X) = \displaystyle \frac{q}{p^{2}}$
geometric_distribution.1760120583.txt.gz · Last modified: by hkimscil