| Geom-class {distr} | R Documentation |
The geometric distribution with prob = p has density
p(x) = p (1-p)^x
for x = 0, 1, 2, ...
C.f. rgeom
Objects can be created by calls of the form Geom(prob).
This object is a geometric distribution.
img:"Naturals":
The space of the image of this distribution has got dimension 1
and the name "Natural Space".param:"GeomParameter":
the parameter of this distribution (prob), declared at its
instantiationr:"function":
generates random numbers (calls function rgeom)d:"function":
density function (calls function dgeom)p:"function":
cumulative function (calls function pgeom)q:"function":
inverse of the cumulative function (calls function qgeom).
The quantile is defined as the smallest value x such that
F(x) >= p, where F is the distribution function.support:"numeric":
a (sorted) vector containing the support of the discrete density
function
Class "DiscreteDistribution", directly.
Class "Nbinom", directly.
Class "UnivariateDistribution", by class "DiscreteDistribution".
Class "Distribution", by class "DiscreteDistribution".
By means of setIs, R ``knows'' that a distribution object obj of class "Geom" also is
a negative Binomial distribution with parameters size = 1, prob = prob(obj)
signature(.Object = "Geom"): initialize methodsignature(object = "Geom"):
returns the slot prob of the parameter of the distributionsignature(object = "Geom"):
modifies the slot prob of the parameter of the distribution
Working with a computer, we use a finite interval as support which carries at least mass 1-getdistrOption("TruncQuantile").
Thomas Stabla statho3@web.de,
Florian Camphausen fcampi@gmx.de,
Peter Ruckdeschel Peter.Ruckdeschel@uni-bayreuth.de,
Matthias Kohl Matthias.Kohl@stamats.de
Nbinom-class
GeomParameter-class
DiscreteDistribution-class
Naturals-class
rgeom
G <- Geom(prob = 0.5) # G is a geometric distribution with prob = 0.5. r(G)(1) # one random number generated from this distribution, e.g. 0 d(G)(1) # Density of this distribution is 0.25 for x = 1. p(G)(1) # Probability that x<1 is 0.75. q(G)(.1) # x = 0 is the smallest value x such that p(G)(x) >= 0.1. prob(G) # prob of this distribution is 0.5. prob(G) <- 0.6 # prob of this distribution is now 0.6. as(G,"Nbinom") G+G+G