Sharedbinom.ipynbOpen in CoCalc
Author: Matt Thomas
Views : 1
In [1]:
library(repr) # Change plot size to 4 x 4 options(repr.plot.width=4, repr.plot.height=4)
In [3]:
dbinom(8,17,.35)
0.113383412400983
In [4]:
x <- seq(0,50) y <- dbinom(x,50,0.2) plot(x,y,type="h")
In [6]:
dbinom(2,3,.5)
0.375
In [13]:
hist(rbinom(1000,17,.35))
In [40]:
x <- [1:50]
In [4]:
qbinom(.4,17,.35)
5
In [3]:
pbinom(5,17,.35)
0.419698771325631
In [ ]: