I have two numpy arrays with different sizes that I would like to run a t-test on directly in python to see the p-value.
Asked
Active
Viewed 2,218 times
1 Answers
6
You can use Scipy Library, you can install it using 'pip install scipy'
from scipy import stats
print(stats.ttest_ind(arr1, arr2))
It returns tuple of calculated t-statistic and two-tailed p-value

Cute Panda
- 1,468
- 1
- 6
- 11
-
1confirmed that this works on elements of different lengths – Kermit Dec 08 '22 at 14:46