# NOT RUN {
# Can be parameterised with probability of success or failure
Binomial$new(prob = 0.2)
Binomial$new(qprob = 0.3)
x = Binomial$new() # Default is with prob = 0.5 and size = 10
# Update parameters
# When any parameter is updated, all others are too!
x$setParameterValue(size = 4, qprob = 0.1)
x$parameters()
# d/p/q/r
x$pdf(5)
x$cdf(5)
x$quantile(0.42)
x$rand(4)
# Statistics
x$mean()
x$variance()
summary(x)
# }
Run the code above in your browser using DataLab