Reputation: 453
I am trying to determine if the default t-test in sci-py is Welch's t-test or the student's t-test. I can't find an answer anywhere. I used the following code to do my t-test analysis. If it is not Welch's, can anyone advise me how to do Welch's
t_test = scipy.stats.ttest_ind(a, b, axis=0)
Thanks Emma
Upvotes: 4
Views: 900
Reputation:
The difference between those two tests is the assumption regarding equal variances. Welch's test does not assume equal variances. If you pass equal_var=False
to your t-test (scipy.stats.ttest_ind(a, b, equal_var=False, axis=0)
it will conduct Welch's test.
From the docs:
equal_var : bool, optional If True (default), perform a standard independent 2 sample test that assumes equal population variances. If False, perform Welch’s t-test, which does not assume equal population variance.
Upvotes: 5