User Tools

Site Tools


geometric_distributions_exercise

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
geometric_distributions_exercise [2024/10/09 13:15] hkimscilgeometric_distributions_exercise [2024/10/09 13:37] (current) hkimscil
Line 45: Line 45:
 > sum(s) > sum(s)
 [1] 0.9993446 [1] 0.9993446
 +
 +</code>
 +그런데 위의 누적확률을 구하는 펑션이 있다. 
 +<code>
 +> # pgeom(q=r-1, p=p)
 +> pgeom(r-1, p)
 +[1] 0.9993446
 +
 +</code>
 +그러면, 누적확률이 0.994일 때 필요한 시도횟수는 얼마일까? 아래는 최소한 6번은 (5+1, R에서의 5는 0에서 시작해서 1씩 증가해서 5에 도달하는 것을 의미한다. 따라서 6회이다) 시도해야 한다는 답을 얻은 것이다. 
 +<code>
 +> qgeom(0.994, p)
 +[1] 5
 +> </code>
 +다른 예. 위에서 우리는 0.9993446은 r = 8일 때 (8번시도) 나오는 확률임을 알고 있다. 따라서, 답은 7+1. 만약에 0.9993446보다 큰 값을 갖을 경우는 9번이 필요하게 된다. 
 +<code>
 +> qgeom(0.9993446, p)
 +[1] 7
 +
 +> qgeom(0.9993447, p)
 +[1] 8
  
 </code> </code>
geometric_distributions_exercise.1728447355.txt.gz · Last modified: 2024/10/09 13:15 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki