Pois-class               package:distr               R Documentation

_C_l_a_s_s "_P_o_i_s"

_D_e_s_c_r_i_p_t_i_o_n:

     The Poisson distribution has density

                   p(x) = lambda^x exp(-lambda)/x!

     for x = 0, 1, 2, ....  The mean and variance are E(X) = Var(X) =
     lambda.

     C.f. 'rpois'

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form 'Pois(lambda)'. This
     object is a Poisson distribution.

_S_l_o_t_s:

     '_i_m_g': Object of class '"Naturals"': The space of the image of
          this distribution has got dimension 1 and the name "Natural
          Space".

     '_p_a_r_a_m': Object of class '"PoisParameter"': the parameter of this
          distribution (lambda), declared at its instantiation

     '_r': Object of class '"function"': generates random numbers (calls
          function rpois)

     '_d': Object of class '"function"': density function (calls
          function dpois)

     '_p': Object of class '"function"': cumulative function (calls
          function ppois)

     '_q': Object of class '"function"': inverse of the cumulative
          function (calls function qpois). The quantile is defined as
          the smallest value x such that F(x) >= p, where F is the
          distribution function.

     '_s_u_p_p_o_r_t': Object of class '"numeric"': a (sorted) vector
          containing the support of the discrete density function

_E_x_t_e_n_d_s:

     Class '"DiscreteDistribution"', directly. Class
     '"UnivariateDistribution"', by class '"DiscreteDistribution"'.
     Class '"Distribution"', by class '"DiscreteDistribution"'.

_M_e_t_h_o_d_s:

     + 'signature(e1 = "Pois", e2 = "Pois")': For the Poisson
          distribution the exact convolution formula is implemented
          thereby improving the general numerical approximation.

     _i_n_i_t_i_a_l_i_z_e 'signature(.Object = "Pois")': initialize method

     _l_a_m_b_d_a 'signature(object = "Pois")': returns the slot lambda of
          the parameter of the distribution

     _l_a_m_b_d_a<- 'signature(object = "Pois")': modifies the slot lambda of
          the parameter of the distribution

_N_o_t_e:

     Working with a computer, we use a finite interval as support which
     carries at least mass (1-TruncQuantile).

_A_u_t_h_o_r(_s):

     Thomas Stabla Thomas.Stabla@uni-bayreuth.de,
      Florian Camphausen Florian.Camphausen@uni-bayreuth.de,
      Peter Ruckdeschel Peter.Ruckdeschel@uni-bayreuth.de,
      Matthias Kohl Matthias.Kohl@uni-bayreuth.de

_S_e_e _A_l_s_o:

     'PoisParameter-class' 'DiscreteDistribution-class'
     'Naturals-class' 'rpois'

_E_x_a_m_p_l_e_s:

     P <- Pois(lambda = 1) # P is a Poisson distribution with lambda = 1.
     r(P)(1) # one random number generated from this distribution, e.g. 1
     d(P)(1) # Density of this distribution is 0.3678794 for x = 1.
     p(P)(0.4) # Probability that x < 0.4 is 0.3678794.
     q(P)(.1) # x = 0 is the smallest value x such that p(B)(x) >= 0.1.
     lambda(P) # lambda of this distribution is 1.
     lambda(P) <- 2 # lambda of this distribution is now 2.
     R <- Pois(lambda = 3) # R is a Poisson distribution with lambda = 2.
     S <- P + R # R is a Poisson distribution with lambda = 5(=2+3).

