chisquared {UAHDataScienceSF} | R Documentation |
Chi-squared Distribution Function
Description
This function calculates the chi-squared statistic between two groups.
Usage
chisquared(x = NULL, y = NULL, learn = FALSE, interactive = FALSE)
Arguments
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 |
Value
The chi-squared statistic (for non-interactive mode)
Examples
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)
}
[Package UAHDataScienceSF version 1.0.0 Index]