chisquared | R Documentation |
This function calculates the chi-squared statistic between two groups.
chisquared(x = NULL, y = NULL, learn = FALSE, interactive = FALSE)
x |
Optional first vector (not needed for interactive mode) |
y |
Optional second vector (not needed for interactive mode) |
learn |
Logical, if TRUE shows step-by-step explanation |
interactive |
Logical, if TRUE enables interactive practice mode |
The chi-squared statistic (for non-interactive mode)
x <- c(70,75,74,72,68,59)
y <- c(74,77,70,80,72,76)
# Simple calculation
chisquared(x, y)
# Learning mode
chisquared(x, y, learn = TRUE)
# Interactive mode
if(interactive()){
chisquared(interactive = TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.