Library: | graphic |
See also: | pdfbin cdfbin randbin |
Quantlet: | grbinomial | |
Description: | generates a graphical object which represents the probability function of the binomial distribution B(n,p) |
Usage: | grbin = grbinomial (n, p {, col}) | |
Input: | ||
n | scalar, number of independent trials | |
p | scalar, probability of success | |
col | color vector, optional | |
Output: | ||
grbin | graphical object |
; load the library graphic library("graphic") library("plot") ; generate a graph of B(3, 0.5) gr = grbinomial(3, 0.5) plot(gr)
shows the binomial probability function for B(3, 0.5)