Uniform                 package:base                 R Documentation

_T_h_e _U_n_i_f_o_r_m _D_i_s_t_r_i_b_u_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     These functions provide information about the uniform distribution
     on the interval from `min' to `max'.  `dunif' gives the density,
     `punif' gives the distribution function `qunif' gives the quantile
     function and `runif' generates random deviates.

_U_s_a_g_e:

     dunif(x, min=0, max=1, log = FALSE)
     punif(q, min=0, max=1, lower.tail = TRUE, log.p = FALSE)
     qunif(p, min=0, max=1, lower.tail = TRUE, log.p = FALSE)
     runif(n, min=0, max=1)

_A_r_g_u_m_e_n_t_s:

     x,q: vector of quantiles.

       p: vector of probabilities.

       n: number of observations to generate.

 min,max: lower and upper limits of the distribution.

log, log.p: logical; if TRUE, probabilities p are given as log(p).

lower.tail: logical; if TRUE (default), probabilities are P[X <= x],
          otherwise, P[X > x].

_D_e_t_a_i_l_s:

     If `min' or `max' are not specified they assume the default values
     of `0' and `1' respectively.

     The uniform distribution has density

                          f(x) = 1/(max-min)

     for min <= x <= max.

     For the case of u := min == max, the limit case of X == u is
     assumed.

_S_e_e _A_l_s_o:

     `.Random.seed' about random number generation, `rnorm', etc for
     other distributions.

_E_x_a_m_p_l_e_s:

     u <- runif(20)

     ## The following relations always hold :
      punif(u) == u
      dunif(u) == 1
      runif(10, 2,2) == 2

     var(runif(10000))#- ~ = 1/12 = .08333

