| Library: | stats |
| See also: | cdfbin qfbin randbin |
| Quantlet: | pdfbin | |
| Description: | computes the probability function of a binomial distribution B(n,p) at a grid x |
| Usage: | ret = pdfbin (n, p, x) | |
| Input: | ||
| n | scalar | |
| p | scalar | |
| x | m x 1 vector of integer numbers (0<=x<=n) | |
| Output: | ||
| ret | m x 1 vector of probabilities | |
library ("stats")
pdfbin(3, 0.5, 0:3)
Contents of ret [1,] 0.125 [2,] 0.375 [3,] 0.375 [4,] 0.125
library ("stats")
(0:4)~pdfbin(4, 0.1, 0:4)
Contents of _tmp [1,] 0 0.6561 [2,] 1 0.2916 [3,] 2 0.0486 [4,] 3 0.0036 [5,] 4 0.0001
| Library: | stats |
| See also: | cdfbin qfbin randbin |