# Changes for incanter.stats/pdf-binomial

aaelony on Mon, 08 Oct 2012
```# Compute P(45 < X < 55) for X Binomial(100,0.5)
# see http://stat.ethz.ch/R-manual/R-patched/library/stats/html/Binomial.html

; In Clojure
(map #(pdf-binomial % :size 100 :prob 0.5) (range 46 55))
;(0.05795839814029805 0.066590499990982 0.07352701040670805 0.07802866410508287 0.0795892373871834 0.07802866410508287 0.07352701040670805 0.066590499990982 0.05795839814029805)

(reduce + (map #(pdf-binomial % :size 100 :prob 0.5) (range 46 55)))
; 0.6317983826733252

; In R
; > dbinom(46:54, 100, 0.5)
;[1] 0.05795840 0.06659050 0.07352701 0.07802866 0.07958924 0.07802866 0.07352701 0.06659050
;[9] 0.05795840
;> sum(dbinom(46:54, 100, 0.5))
;[1] 0.6317984
```
aaelony on Mon, 08 Oct 2012
```# Compute P(45 < X < 55) for X Binomial(100,0.5)

; In Clojure
(map #(pdf-binomial % :size 100 :prob 0.5) (range 46 55))
;(0.05795839814029805 0.066590499990982 0.07352701040670805 0.07802866410508287 0.0795892373871834 0.07802866410508287 0.07352701040670805 0.066590499990982 0.05795839814029805)

(reduce + (map #(pdf-binomial % :size 100 :prob 0.5) (range 46 55)))
; 0.6317983826733252

; In R
; > dbinom(46:54, 100, 0.5)
;[1] 0.05795840 0.06659050 0.07352701 0.07802866 0.07958924 0.07802866 0.07352701 0.06659050
;[9] 0.05795840
;> sum(dbinom(46:54, 100, 0.5))
;[1] 0.6317984
```
aaelony on Mon, 08 Oct 2012
```; In Clojure
(map #(pdf-binomial % :size 100 :prob 0.5) (range 46 55))
;(0.05795839814029805 0.066590499990982 0.07352701040670805 0.07802866410508287 0.0795892373871834 0.07802866410508287 0.07352701040670805 0.066590499990982 0.05795839814029805)

(reduce + (map #(pdf-binomial % :size 100 :prob 0.5) (range 46 55)))
; 0.6317983826733252

; In R
; > dbinom(46:54, 100, 0.5)
;[1] 0.05795840 0.06659050 0.07352701 0.07802866 0.07958924 0.07802866 0.07352701 0.06659050
;[9] 0.05795840
;> sum(dbinom(46:54, 100, 0.5))
;[1] 0.6317984
```