Library: | distribs |
See also: | cdfgeom |
Quantlet: | pdfgeom | |
Description: | computes the probability function of a geometric distribution Ge(p) at a grid x |
Usage: | ret = pdfgeom (x, p) | |
Input: | ||
x | array of integer numbers (0 <= x), input values | |
p | scalar or array of the same dimension as x, 0<p<1, parameter of the distribution | |
Output: | ||
ret | array, computed probabilities |
library("distribs") pdfgeom(0:4, 0.5)
Contents of ret [1,] 0.5 [2,] 0.25 [3,] 0.125 [4,] 0.0625 [5,] 0.03125
library("distribs") (0:4)~pdfgeom(0:4, 0.3)
Contents of _tmp [1,] 0 0.3 [2,] 1 0.21 [3,] 2 0.147 [4,] 3 0.1029 [5,] 4 0.07203