Python 推断基础
Paul Savala
Assistant Professor of Mathematics


$n_1 = \text{第一组样本量}$
$n_2 = \text{第二组样本量}$
$s_1 = \text{第一组标准差}$
$s_2 = \text{第二组标准差}$
$\overline{x}_1 = \text{第一组均值}$
$\overline{x}_2 = \text{第二组均值}$
$s = \displaystyle\sqrt{\frac{(n_1-1)s_1^2 + (n_2-1)s_2^2}{n_1 + n_2 - 2}}$
Cohen 的 $d = \displaystyle\frac{\overline{x}_1 - \overline{x}_2}{s}$
Cohen 的 $d = 0.6$
中到大效应量
r, p_value = stats.pearsonr( btc_sp_df['Close_BTC'], btc_sp_df['Close_SP500'] )print(r**2)
0.82
$R^2:$ 已知一个变量后可解释另一个变量变异的百分比

Cramer 的 $V = \displaystyle\sqrt{\frac{\chi^2/n}{d}}$
chi2, p, d, e = stats.chi2_contingency( contingency_table)dof = min(6-1, 2-1) = 1 n = 3394v = np.sqrt((chi2 / n) / dof)
v = 0.52

Cramer's V = 0.52, Degrees of Freedom = 1

Python 推断基础