View source: R/SDS100_get_statistics.R
get_chisqr_stat | R Documentation |
Calculates the chi-square statistic
get_chisqr_stat(observed_counts, expected_proportions)
observed_counts |
A vector of observed count data. |
expected_proportions |
A vector indicating the expected probability that data comes from a given group. |
set.seed(100)
observed_counts <- c(138, 99, 106, 115, 104, 164)
expected_proportions = c(1/6, 1/6, 1/6, 1/6, 1/6, 1/6)
get_chisqr_stat(observed_counts, expected_proportions)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.