Description Usage Arguments Value Author(s) References See Also Examples

Calculates p-values for hypothesis tests of a single binomial proportion.

1 2 | ```
binTest(n, y, p.hyp, alternative = "two.sided",
method = "Exact")
``` |

`n` |
single integer value, number of trials (number of individuals under observation) |

`y` |
single integer value, number of successes (number of individuals showing the trait of interest) |

`p.hyp` |
single numeric value between 0 and 1, specifying the hypothetical threshold proportion to test against |

`alternative` |
character string defining the alternative hypothesis, either 'two.sided', 'less' or 'greater' |

`method` |
character string defining the test method to be used:
can be one of |

A list containing:

`p.value` |
the p value of the test |

`estimate ` |
the estimated proportion |

`p.hyp` |
as input |

`alternative` |
as input |

`method` |
as input |

Frank Schaarschmidt

*Santner, T.J. and Duffy, D.E. (1989)* The statistical analysis of discrete data. Springer Verlag New York Berlin Heidelberg. Chapter 2.1.

`binom.test(stats)` for the exact test and corresponding confindence interval

1 2 3 4 5 6 | ```
# 200 seeds are taken from a seed lot.
# 2 are found to be defective.
# H0: p >= 0.02 shall be rejected in favor of HA: p < 0.02.
# The exact test shall be used for decision:
binTest(n=200, y=2, p.hyp=0.02, alternative="less", method="Exact" )
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.