# Comparing the mean of two non-random sub-groups

Students are assigned to group A or B based on two aspects: a grade from an exam and an evaluation of their teacher. Students with both a high grade and a positive evaluation get into group A, other students in group B. I know that the grade is much more influential than the teacher’s evaluation.

I have the exam grades of 1,000 students. I also know whether students are assigned to group A or B.

I want to know whether the average grade of students in group A is higher than the average grade in group B.

$\text{Grade}_i=\alpha+\beta*\text{DumA}_i+\epsilon_i$

where $\text{Grade}_i$ is the grade of student i. $\text{DumA}_i$ equals 1 if student i is in group A and 0 otherwise.

Do students in group A have a higher grade if Alfa is significant according to a standard t-test? Note that students in group A tend to have a higher grade since assignment is mostly based on the grade. It seems to me that the dummy is endogenous and thus the estimate of Alfa is incorrect. Is my interpretation correct?

Does this mean that it is not possible to compare the mean of the two groups? Are there any alternatives?

Any thoughts are very much appreciated!

You could also use your regression, but the means would be significantly different if $\beta_1$ is significant. $\alpha$ would be the mean of students in the group that was coded 0.