Library: | distribs |
See also: | cdfn2 pdfn2 cdfb2 pdfb2 cdfbin2 pdfbin2 cdfchi2 pdfchi2 cdff2 pdff2 cdft2 pdft2 |
Quantlet: | cdfbin2 | |
Description: | Cdfbin2 returns the values of the binomial distribution function with parameters n and p for the elements of an array. |
Usage: | y=cdfbin2(x,n,p) | |
Input: | ||
x | input array | |
n | a scalar or an array of the same dimension as x containing the parameter n for binomial distribution | |
p | a scalar or an array of the same dimension as x containing the parameter p for binomial distribution | |
Output: | ||
y | output array, it contains the values of the specified binomial distribution function for the elements of array x |
library("distribs") a=0:20 cdfbin2(a, 20, 0.3)
Contents of y [ 1,] 0.00079792 [ 2,] 0.0076373 [ 3,] 0.035483 [ 4,] 0.10709 [ 5,] 0.23751 [ 6,] 0.41637 [ 7,] 0.60801 [ 8,] 0.77227 [ 9,] 0.88667 [10,] 0.95204 [11,] 0.98286 [12,] 0.99486 [13,] 0.99872 [14,] 0.99974 [15,] 0.99996 [16,] 0.99999 [17,] 1 [18,] 1 [19,] 1 [20,] 1 [21,] 1