User Tools

Site Tools


b:head_first_statistics:poisson_distribution

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
b:head_first_statistics:poisson_distribution [2025/10/07 06:52] – [Broken Cookies case] hkimscilb:head_first_statistics:poisson_distribution [2025/10/07 08:42] (current) – [Poisson Distribution] hkimscil
Line 46: Line 46:
 \end{eqnarray*} \end{eqnarray*}
  
 +<code>
 +> dpois(3, 2)
 +[1] 0.180447
 +>
 +
 +</code>
 ====== What does the Poisson distribution look like? ====== ====== What does the Poisson distribution look like? ======
  
Line 354: Line 360:
 </WRAP> </WRAP>
  
-===== Exercise =====+====== Exercise ======
 <WRAP box> <WRAP box>
 Here are some scenarios. Your job is to say which distribution each of them follows, say what the expectation and variance are, and find any required probabilities.  Here are some scenarios. Your job is to say which distribution each of them follows, say what the expectation and variance are, and find any required probabilities. 
Line 378: Line 384:
 \end{eqnarray*} \end{eqnarray*}
  
-r을 이용한다면 ''pbinom'' 을 이용한다.+r을 이용한다면 ''pbinom'' 혹은 ''dbinom'' 을 이용한다.
  
 <code> <code>
 > pbinom(q=2, 10, 0.3) > pbinom(q=2, 10, 0.3)
 [1] 0.3827828 [1] 0.3827828
-> </code>+ 
 +> sum(dbinom(0:2, 10, 0.3)) 
 +[1] 0.3827828 
 +>  
 + 
 +</code>
  
 손으로 계산을 한다고 하면,  손으로 계산을 한다고 하면, 
Line 389: Line 400:
  
 \begin{eqnarray*} \begin{eqnarray*}
-P(X = 0) & = & {10 \choose 0} * 0.3^0 * 0.7^10 \\+P(X = 0) & = & {10 \choose 0} * 0.3^0 * 0.7^{10\\
 & = & 1 * 1 * 0.028 \\ & = & 1 * 1 * 0.028 \\
 & = & 0.028  & = & 0.028 
Line 420: Line 431:
 \begin{eqnarray*} \begin{eqnarray*}
 P(X=0) & = & \frac {e^{-1}{1^0}}{0!} \\ P(X=0) & = & \frac {e^{-1}{1^0}}{0!} \\
-& = & \frac {e^-1 * 1}{1} \\+& = & \frac {e^{-1* 1}{1} \\
 & = & .368  & = & .368 
 \end{eqnarray*} \end{eqnarray*}
 </WRAP> </WRAP>
 +
 +<code>
 +> dpois(0, 1)
 +[1] 0.3678794
 +
 +> ppois(0, 1)
 +[1] 0.3678794
 +
 +</code>
  
 <WRAP box> <WRAP box>
Line 440: Line 460:
 & = & 0.488 & = & 0.488
 \end{eqnarray*} \end{eqnarray*}
 +
 +<code>
 +> sum(dgeom(0:2,0.2))
 +[1] 0.488
 +>   
 +> pgeom(2, 0.2)
 +[1] 0.488
 +
 +
 +</code>
 +
  
 기대값과 분산은 각각 $1/p$, $q/p^2$ 이므로 $5$와 $20$. 기대값과 분산은 각각 $1/p$, $q/p^2$ 이므로 $5$와 $20$.
 </WRAP>  </WRAP> 
  
b/head_first_statistics/poisson_distribution.1759787562.txt.gz · Last modified: by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki