Created
March 18, 2020 18:26
-
-
Save NyaGarcia/2201b14464e7af9f52943f2246d9cf8c to your computer and use it in GitHub Desktop.
Performing the pearson chi-square test for independence between gears and cylinders with Monte Carlo simulation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> chisq.test(mtcars$gear, mtcars$cyl, simulate.p.value = TRUE) | |
Pearson's Chi-squared test with simulated p-value (based on 2000 | |
replicates) | |
data: mtcars$gear and mtcars$cyl | |
X-squared = 18.036, df = NA, p-value = 0.0004998 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment