Python 推論基礎
Paul Savala
Assistant Professor of Mathematics


$n_1 = \text{Sample size of group one}$
$n_2 = \text{Sample size of group two}$
$s_1 = \text{Standard deviation of group one}$
$s_2 = \text{Standard deviation of group two}$
$\overline{x}_1 = \text{Mean of group one}$
$\overline{x}_2 = \text{Mean of group two}$
$s = \displaystyle\sqrt{\frac{\frac{(n_1-1)s_1^2 + (n_2-1)s_2^2}{}}{n_1 + n_2 - 2}}$
Cohen's $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 推論基礎