I would like to calculate the degree of variance between to lists of floats of unequal size expressed in a p-value.
I tried a two-sided t-test as in the example below using python. But answers that don't use python are just as welcome!
from scipy.stats import ttest_ind
import numpy as np
# len(list1) = 324
list1 = list(np.random.uniform(low=0.0, high=8.25266, size=(324,)))
# len(list2) = 2954
list2 = list(np.random.uniform(low=0.0, high=7.12928, size=(2954,)))
ttest_ind(list1, list2)
Out[1]: Ttest_indResult(statistic=2.584318054915878, pvalue=0.0098000615059825)
But as you see already the p-value between two randomly generated lists of floats is always statistically significant. So my question is: Is a two-sided t-test the right way to calculate statistical significance between two sets of floats of unequal size and if not what would be more appropriate?