I have two dataframes of samples both are from different populations (df1
and df2
)
I am trying to get the t and p-value. Here's what I have done:
In [1]: import scipy.stats as stats
stats.ttest_ind(a=df1, b=df2)
Out [1]: Ttest_indResult(statistic=-2.071536903102, pvalue=0.0385310564401)
What this input produce are the t and p-value for the null hypothesis: .
In contrast, what I am trying to do is to get the t and p-value for the null hypothesis that there is a particular means difference which is a particular number, for instance, 0.3
,
Is there any function in any library that can handle this?