Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

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

Example:
library("distribs")
pdfgeom(0:4, 0.5)

Result:
Contents of ret
[1,]      0.5
[2,]     0.25
[3,]    0.125
[4,]   0.0625
[5,]  0.03125
Example:
library("distribs")
(0:4)~pdfgeom(0:4, 0.3)

Result:
Contents of _tmp
[1,]        0      0.3
[2,]        1     0.21
[3,]        2    0.147
[4,]        3   0.1029
[5,]        4  0.07203



Author: P. Cizek, 20030108 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006