chi_statistic <- function(prob){
# calculate
chi_statistic <- sum((prob$expected_prob - prob$real_prob)^2 /
prob$expected_prob)
return (chi_statistic)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.