Rev 7561 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{binom.test}\alias{binom.test}\title{Exact Binomial Test}\description{Performs an exact test of the null that the probability of success ina Bernoulli experiment of length \code{n} is \code{p}, based on thenumber \code{x} of successes observed.}\usage{binom.test(x, n, p = 0.5, alternative = c("two.sided", "less", "greater"),conf.level = 0.95)}\arguments{\item{x}{number of successes.}\item{n}{number of trials.}\item{p}{probability of success.}\item{alternative}{indicates the alternative hypothesis and must beone of \code{"two.sided"}, \code{"greater"} or \code{"less"}.You can specify just the initial letter.}\item{conf.level}{confidence level for the returned confidenceinterval.}}\value{A list with class \code{"htest"} containing the following components:\item{statistic}{the number of successes, \code{x}.}\item{parameter}{the number of trials, \code{n}.}\item{p.value}{the p-value of the test.}\item{conf.int}{a confidence interval for the probability of success.}\item{estimate}{the estimated probability of success, \code{x / n}.}\item{null.value}{the probability of success under the null,\code{p}.}\item{alternative}{a character string describing the alternativehypothesis.}\item{method}{the string \code{"Exact binomial test"}.}\item{data.name}{a character string giving the names of the data.}}\references{Conover, W. J. (1971),\emph{Practical nonparametric statistics}.New York: John Wiley & Sons.Pages 97--104.Myles Hollander & Douglas A. Wolfe (1973),\emph{Nonparametric statistical inference}.New York: John Wiley & Sons.Pages 15--22.}\seealso{\code{\link{prop.test}} for a general (approximate) test for equal orgiven proportions.}\examples{## 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(682, 682 + 243, p = 3/4)## => Data are in agreement with the null hypothesis.}\keyword{htest}