chisq.bin | R Documentation |
This function performs a chi-square goodness of fit test for a binomial distribution.
chisq.bin(x, f, n = NULL, p = NULL)
x |
The observed values. |
f |
The observed counts. |
n |
Binomial parameter n. |
p |
Binomial parameter pi. |
If p
is not specified, then it is estimated from the data.
If there are categories with expected counts less than 5 or less than 1 a warning
is shown.
It returns a table with the contribution to the chi-square statistic for each category, the chi-square statistic, the degrees of freedom, and the p-value.
Raúl Eyzaguirre.
x <- 0:6
f <- c(334, 369, 191, 63, 22, 12, 9)
chisq.bin(x, f, n = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.