- 0隻:$ P\left ( 0, 4 \right )=\frac{e^{-4} 4^{0}}{0!} \approx 1.83\% $
- 1隻:$ P\left ( 1, 4 \right )=\frac{e^{-4} 4^{1}}{1!} \approx 7.33\% $
- 2隻:$ P\left ( 2, 4 \right )=\frac{e^{-4} 4^{2}}{2!} \approx 14.65\% $
- 3隻:$ P\left ( 3, 4 \right )=\frac{e^{-4} 4^{3}}{3!} \approx 19.54\% $
- 4隻:$ P\left ( 4, 4 \right )=\frac{e^{-4} 4^{4}}{4!} \approx 19.54\% $
- 5隻:$ P\left ( 0, 4 \right )=\frac{e^{-4} 4^{5}}{5!} \approx 15.63\% $
- 6隻:$ P\left ( 1, 4 \right )=\frac{e^{-4} 4^{6}}{6!} \approx 10.42\% $
- 7隻:$ P\left ( 2, 4 \right )=\frac{e^{-4} 4^{7}}{7!} \approx 5.95\% $
- 8隻:$ P\left ( 3, 4 \right )=\frac{e^{-4} 4^{8}}{8!} \approx 2.98\% $
- 9隻:$ P\left ( 4, 4 \right )=\frac{e^{-4} 4^{9}}{9!} \approx 1.32\% $
- 10隻:$ P\left ( 4, 4 \right )=\frac{e^{-4} 4^{10}}{10!} \approx 0.53\% $
上述的出現機率根據《泊松分佈(Poisson Distribution)》公式計算得出,計算方法是用R語言,程式碼如下:
> p <- function(x, l) {return( exp(-l) * l^x / factorial(x) )}
> for (i in seq(0,10,1)) { print(paste(i, round(p(i,4),4))) }
[1] "0 0.0183"
[1] "1 0.0733"
[1] "2 0.1465"
[1] "3 0.1954"
[1] "4 0.1954"
[1] "5 0.1563"
[1] "6 0.1042"
[1] "7 0.0595"
[1] "8 0.0298"
[1] "9 0.0132"
[1] "10 0.0053"
> 1-p(0,4)
[1] 0.9816844
_EOF_
沒有留言:
張貼留言