home *** CD-ROM | disk | FTP | other *** search
-
- _T_h_e _G_e_o_m_e_t_r_i_c _D_i_s_t_r_i_b_u_t_i_o_n
-
- dgeom(x, p)
- pgeom(q, p)
- qgeom(p, p)
- rgeom(n, p)
-
- _V_a_l_u_e:
-
- These functions provide information about the geometric
- distribution with parameter p. dgeom gives the den-
- sity, pgeom gives the distribution function qgeom gives
- the quantile function and rgeom generates random devi-
- ates.
-
- The geometric distribution has density
-
- p(x) = p (1-p)^x,
-
- for x = 0, 1, 2, ...
-
- _E_x_a_m_p_l_e_s:
-
- pp <- sort(c((1:9)/10, 1 - .2^(2:8)))
- print(qg <- qgeom(pp, p = .2))
- for(i in 1:2) print(qg _ qgeom(pgeom(qg,p=.2), p=.2))
- Ni <- rgeom(20, p= 1/4); table(factor(Ni, 0:max(Ni)))
-
-