本文簡要介紹 python 語言中 scipy.stats.mstats.kruskalwallis
的用法。
用法:
scipy.stats.mstats.kruskalwallis(*args)#
計算獨立樣本的Kruskal-Wallis H-test
- sample1, sample2, …: array_like
具有樣本測量值的兩個或多個數組可以作為參數給出。
- statistic: 浮點數
Kruskal-Wallis H 統計數據,已針對平局進行了校正
- pvalue: 浮點數
使用 H 具有卡方分布的假設進行檢驗的 p 值
參數 ::
返回 ::
注意:
有關
kruskal
的更多詳細信息,請參閱scipy.stats.kruskal
。例子:
>>> from scipy.stats.mstats import kruskal
測試了來自三個不同品牌電池的隨機樣本,以查看充電持續多長時間。結果如下:
>>> a = [6.3, 5.4, 5.7, 5.2, 5.0] >>> b = [6.9, 7.0, 6.1, 7.9] >>> c = [7.2, 6.9, 6.1, 6.5]
檢驗所有品牌持續時間的分布函數相同的假設。使用 5% 的顯著性水平。
>>> kruskal(a, b, c) KruskalResult(statistic=7.113812154696133, pvalue=0.028526948491942164)
由於返回的 p 值小於 5% 的臨界值,因此在 5% 顯著性水平下拒絕原假設。
相關用法
- Python SciPy mstats.kruskal用法及代碼示例
- Python SciPy mstats.trim用法及代碼示例
- Python SciPy mstats.winsorize用法及代碼示例
- Python SciPy mstats.argstoarray用法及代碼示例
- Python SciPy mstats.trima用法及代碼示例
- Python SciPy mstats.tmin用法及代碼示例
- Python SciPy mstats.tmax用法及代碼示例
- Python SciPy mstats.sem用法及代碼示例
- Python SciPy mstats.zscore用法及代碼示例
- Python SciPy mstats.zmap用法及代碼示例
- Python SciPy mstats.mode用法及代碼示例
- Python SciPy mstats.hmean用法及代碼示例
- Python SciPy mstats.variation用法及代碼示例
- Python SciPy mstats.compare_medians_ms用法及代碼示例
- Python SciPy mstats.gmean用法及代碼示例
- Python SciPy mstats.pearsonr用法及代碼示例
- Python SciPy mstats.tmean用法及代碼示例
- Python SciPy mstats.mquantiles用法及代碼示例
- Python SciPy mstats.count_tied_groups用法及代碼示例
- Python SciPy mstats.chisquare用法及代碼示例
- Python SciPy mstats.describe用法及代碼示例
- Python SciPy mstats.sen_seasonal_slopes用法及代碼示例
- Python SciPy mstats.find_repeats用法及代碼示例
- Python SciPy matlab.loadmat用法及代碼示例
- Python SciPy misc.ascent用法及代碼示例
注:本文由純淨天空篩選整理自scipy.org大神的英文原創作品 scipy.stats.mstats.kruskalwallis。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。