Last active
March 7, 2016 18:13
-
-
Save cyrilobolonsky/e73dd6b82bdde5a834e3 to your computer and use it in GitHub Desktop.
A #glfintech R turorial on statistics discussing hypothesis tests - parametric tests (z-test, t-test and ANOVA) and non-parametric tests (Mann-Whitney Test, Wilcoxon Rank-sum test, Wilcoxon Signed-rank Test, Kruskal Wallis Test).
This file contains 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
#Shapiro test shows whether the variables have a normal distribution | |
shapiro.test(lifeexpf) | |
shapiro.test(lifeexpm) | |
shapiro.test(birth_rt) | |
shapiro.test(death_rt) | |
shapiro.test(world[,2]) | |
shapiro.test(world[,3]) | |
shapiro.test(world[,5]) | |
#We are alomst 100% sure that NONE of the variables follows a normal distribution. | |
#Chi-squared test shows whether two variables are independent | |
chisq.test(region,death_rt) | |
#We are 99,96% sure that Ho is wrong and that the two variables are NOT independent. Hence, the death rate depends upon the region. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment