binom.test               package:stats               R Documentation

_E_x_a_c_t _B_i_n_o_m_i_a_l _T_e_s_t

_D_e_s_c_r_i_p_t_i_o_n:

     Performs an exact test of a simple null hypothesis about the
     probability of success in a Bernoulli experiment.

_U_s_a_g_e:

     binom.test(x, n, p = 0.5,
                alternative = c("two.sided", "less", "greater"),
                conf.level = 0.95)

_A_r_g_u_m_e_n_t_s:

       x: number of successes, or a vector of length 2 giving the
          numbers of successes and failures, respectively.

       n: number of trials; ignored if 'x' has length 2.

       p: hypothesized probability of success.

alternative: indicates the alternative hypothesis and must be one of
          '"two.sided"', '"greater"' or '"less"'. You can specify just
          the initial letter.

conf.level: confidence level for the returned confidence interval.

_D_e_t_a_i_l_s:

     Confidence intervals are obtained by a procedure first given in
     Clopper and Pearson (1934).  This guarantees that the confidence
     level is at least 'conf.level', but in general does not give the
     shortest-length confidence intervals.

_V_a_l_u_e:

     A list with class '"htest"' containing the following components: 

statistic: the number of successes.

parameter: the number of trials.

 p.value: the p-value of the test.

conf.int: a confidence interval for the probability of success.

estimate: the estimated probability of success.

null.value: the probability of success under the null, 'p'.

alternative: a character string describing the alternative hypothesis.

  method: the character string '"Exact binomial test"'.

data.name: a character string giving the names of the data.

_R_e_f_e_r_e_n_c_e_s:

     Clopper, C. J. & Pearson, E. S. (1934). The use of confidence or
     fiducial limits illustrated in the case of the binomial.
     _Biometrika_, *26*, 404-413.

     William J. Conover (1971), _Practical nonparametric statistics_.
     New York: John Wiley & Sons. Pages 97-104.

     Myles Hollander & Douglas A. Wolfe (1973), _Nonparametric
     Statistical Methods._ New York: John Wiley & Sons. Pages 15-22.

_S_e_e _A_l_s_o:

     'prop.test' for a general (approximate) test for equal or given
     proportions.

_E_x_a_m_p_l_e_s:

     ## Conover (1971), p. 97f.
     ## Under (the assumption of) simple Mendelian inheritance, a cross
     ##  between plants of two particular genotypes produces progeny 1/4 of
     ##  which are "dwarf" and 3/4 of which are "giant", respectively.
     ##  In an experiment to determine if this assumption is reasonable, a
     ##  cross results in progeny having 243 dwarf and 682 giant plants.
     ##  If "giant" is taken as success, the null hypothesis is that p =
     ##  3/4 and the alternative that p != 3/4.
     binom.test(c(682, 243), p = 3/4)
     binom.test(682, 682 + 243, p = 3/4)   # The same.
     ## => Data are in agreement with the null hypothesis.

