home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / R-0.49-MI / R-0.49-I / help / base / Binomial < prev    next >
Encoding:
Text File  |  1997-04-23  |  964 b   |  40 lines

  1.     
  2.     _T_h_e _B_i_n_o_m_i_a_l _D_i_s_t_r_i_b_u_t_i_o_n
  3.     
  4.          dbinom(x, n, p)
  5.          pbinom(x, n, p)
  6.          qbinom(prob, n, p)
  7.          rbinom(nobs, n, p)
  8.     
  9.     _A_r_g_u_m_e_n_t_s:
  10.     
  11.                x : vector of quantiles.
  12.     
  13.             prob : vector of probabilities.
  14.     
  15.             nobs : number of observations to generate.
  16.     
  17.                n : number of trials.
  18.     
  19.                p : probability of success on each trial.
  20.     
  21.     _V_a_l_u_e:
  22.     
  23.          These functions provide information about the binomial
  24.          distribution with parameters n and p.  dbinom gives the
  25.          density, pbinom gives the distribution function qbinom
  26.          gives the quantile function and rbinom generates random
  27.          deviates.
  28.     
  29.          The binomial distribution has density
  30.     
  31.                    p(x) = Choose(n,x) p^x (1-p)^(n-x)
  32.     
  33.          for x = 0, ..., n.
  34.     
  35.     _E_x_a_m_p_l_e_s:
  36.     
  37.          # Compute P(45 < X < 55) for X Binomial(100,0.5)
  38.          sum(dbinom(46:54, 100, 0.5))
  39.     
  40.