本文簡要介紹 python 語言中 scipy.stats.mstats.sem
的用法。
用法:
scipy.stats.mstats.sem(a, axis=0, ddof=1)#
計算輸入數組平均值的標準誤差。
有時也稱為測量標準誤差。
- a: array_like
包含返回標準錯誤的值的數組。
- axis: int 或無,可選
如果軸為無,則首先解開。如果axis是一個整數,這將是要操作的軸。默認為 0。
- ddof: 整數,可選
三角洲degrees-of-freedom。相對於總體方差估計,在有限樣本中調整偏差的自由度。默認為 1。
- s: ndarray 或浮點數
樣本中平均值的標準誤差,沿輸入軸。
參數 ::
返回 ::
注意:
默認值為ddof在 scipy 0.15.0 中進行了更改以與scipy.stats.sem以及最常用的定義(如 R 文檔中的定義)。
例子:
沿第一個軸查找標準誤差:
>>> import numpy as np >>> from scipy import stats >>> a = np.arange(20).reshape(5,4) >>> print(stats.mstats.sem(a)) [2.8284271247461903 2.8284271247461903 2.8284271247461903 2.8284271247461903]
使用 n 個自由度在整個數組中查找標準誤差:
>>> print(stats.mstats.sem(a, axis=None, ddof=0)) 1.2893796958227628
相關用法
- Python SciPy mstats.sen_seasonal_slopes用法及代碼示例
- 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.kruskalwallis用法及代碼示例
- 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.kruskal用法及代碼示例
- 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.find_repeats用法及代碼示例
- Python SciPy matlab.loadmat用法及代碼示例
- Python SciPy misc.ascent用法及代碼示例
注:本文由純淨天空篩選整理自scipy.org大神的英文原創作品 scipy.stats.mstats.sem。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。