I have a dataset that looks like this:
var1 var2 var3 attribute
1 0.93 0.88 1
1 0.76 0.20 1
1 0.40 0.18 0
0 0.34 0.91 1
0 0.09 0.51 0
... ... ... ...
For each variable (var1, var2, var3, etc), I need to perfom a ttest compairing its mean when attribute = 1 vs the mean of the whole variable. How can I do this?