I have letter grades (A through F) for two groups of students (Group 1 and 2) who both took the same classes at the same time. None of the students overlap in either of the groups. I have this data for about 11 separate courses. In some courses the number of students in Group 1 > Group 2 (1117 vs 126). How do I tell if the grade distributions between these groups are significantly different? (I want to see if the overall performance b/w the groups is similar enough to say there is no difference between them.)
I did a Kolmogorov-Smirnov two-sample test using ks.test
{stats} and ks.boot
{Matching}, but I became concerned that the data should be weighed for the different grades? Or does that not matter in K-S because it's just looking at the distributions coming from the same parent and weights make no sense? Also is K-S no good for categorical data?
I tried Welch's two-sample t-test using t.test
{stats}. but again, I became concerned about weighted means, esp. for a t-test it seemed important to include? -- so then I ran wtd.t.test
{weights} which seemed good for awhile, until I realized it was giving low p's in cases where the group sizes were different (1117 vs 126; 1915 vs. 1371 (still not sure if that is much different?)).
I'm now wondering if chi-squared is what I needed all along for the binned data...I ran chisq.test(cbind(x,y))
{stats} and it is giving me low p-values for groups that weren't sig. before...again, should I worry about including weights? Or should I trust chisq.test
?
my data looks like:
x <- c(526,577,537,141,77,1,3,37,16) #Group1
y <- c(401,424,376,85,33,1,2,41,8) #Group2
weights <- c(4,3,2,1,0,0,0,0,0) #A-F, and others like W for withdraw, I incomplete, etc.