Hi there,
I want to compare the group with Quintile 1 and Quintile 5 regarding higherdegree ( a dummy varible) and conducting t-test between them.

My code is below but the t-test value is invalid.

Could you please give me some suggestions?

tab QuiABC HighDegree1

| HighDegree
| 1
QuiABC | 1 | Total
-----------+-----------+----------
1 | 45 | 45
2 | 30 | 30
3 | 38 | 38
4 | 30 | 30
5 | 76 | 76
-----------+-----------+----------
Total | 219 | 219

.
. ttest HighDegree1 if inlist(QuiABC, 1, 5), by(QuiABC)

Two-sample t test with equal variances
------------------------------------------------------------------------------
Group | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------+--------------------------------------------------------------------
1 | 45 1 0 0 1 1
5 | 76 1 0 0 1 1
---------+--------------------------------------------------------------------
combined | 121 1 0 0 1 1
---------+--------------------------------------------------------------------
diff | 0 0 0 0
------------------------------------------------------------------------------
diff = mean(1) - mean(5) t = .
Ho: diff = 0 degrees of freedom = 119

Ha: diff < 0 Ha: diff != 0 Ha: diff > 0
Pr(T < t) = . Pr(|T| > |t|) = . Pr(T > t) = .