geometric_distribution
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
geometric_distribution [2025/10/11 03:11] – hkimscil | geometric_distribution [2025/10/11 06:23] (current) – hkimscil | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Geometric Distribution ====== | ====== Geometric Distribution ====== | ||
+ | 기하분포 | ||
+ | |||
+ | \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} \\ | ||
+ | \\ | ||
+ | \end{align*} | ||
+ | |||
+ | ====== Proof of mean and variance of geometric distribution ====== | ||
+ | [[:Mean and Variance of Geometric Distribution]] | ||
+ | |||
+ | |||
{{youtube> | {{youtube> | ||
+ | \\ | ||
+ | \\ | ||
+ | <WRAP clear/> | ||
+ | ====== dgeom in r ====== | ||
< | < | ||
> dgeom(4, .2) | > dgeom(4, .2) | ||
Line 11: | Line 29: | ||
</ | </ | ||
+ | ====== pgeom ====== | ||
< | < | ||
> pgeom(4, .2, lower.tail=T) | > pgeom(4, .2, lower.tail=T) | ||
Line 24: | Line 43: | ||
> pgeom(4, .2, lower.tail=T)+pgeom(4, | > pgeom(4, .2, lower.tail=T)+pgeom(4, | ||
[1] 1 | [1] 1 | ||
- | |||
</ | </ | ||
+ | ====== qgeom ====== | ||
< | < | ||
> qgeom(.5, .2) | > qgeom(.5, .2) | ||
Line 39: | Line 58: | ||
> qgeom(.2, .2) | > qgeom(.2, .2) | ||
[1] 0 | [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., ====== | ||
+ | <WRAP box> | ||
+ | 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.1760119860.txt.gz · Last modified: by hkimscil