本文介绍了没有数组的scipy.stats.ttest_ind(python)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经进行了许多计算,以估计两个样本的μ,σ和N.由于许多近似值,我没有期望作为scipy.stats.ttest_ind输入的数组.除非我弄错了,我只需要μ,σ和N即可进行韦氏t检验.有没有办法在python中做到这一点?
I have done a number of calculations to estimate μ, σ and N for my two samples. Due to a number of approximations I don't have the arrays that are expected as input to scipy.stats.ttest_ind. Unless I am mistaken I only need μ, σ and N to do a welch's t test. Is there a way to do this in python?
推荐答案
作为更新
此功能自版本0.16.0起在scipy.stats
中可用
The function is now available in scipy.stats
, since version 0.16.0
http://docs. scipy.org/doc/scipy-0.16.0/reference/generation/scipy.stats.ttest_ind_from_stats.html
scipy.stats.ttest_ind_from_stats(mean1, std1, nobs1, mean2, std2, nobs2, equal_var=True)
T-test for means of two independent samples from descriptive statistics.
This is a two-sided test for the null hypothesis that 2 independent samples have identical average (expected) values.
这篇关于没有数组的scipy.stats.ttest_ind(python)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!