To be able to conduct a t-test it is important:
That the independent- as well as the dependent variable is measured on a nominal or ordinal scale.
That the independent variable is measured on an interval- or ratio scale and the dependent variable is measured on a nominal- or ordinal scale.
That the independent- as well as the dependent variable is measured on an interval- or ratio scale.
That the dependent variable is measured on an interval- or ratio scale and the independent variable is measured on a nominal- or ordinal scale.