I want to test if a quantitative variable is different in 2 groups.
As for what I understood so far, here is the algorithm I should use :
- if the length of my 2 subgroups are >30
- --> z-test
- else, if the variable is normal (shapiro.test() returns a p-value>0.05) and the variances are mostly equal (var.test() returns a p-value>0.05)
- --> t-test
- else
- --> wilcoxon-MW test
This is not stated clearly anywhere but just some kind of a grouping of my classes, am I doing it right ?
Where can I find clear resources on this kind of question ?