Foundations of Inference in 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{(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's $d = 0.6$
Medium-to-large effect size
r, p_value = stats.pearsonr( btc_sp_df['Close_BTC'], btc_sp_df['Close_SP500'] )
print(r**2)
0.82
$R^2:$ Percent of variation in one variable explained by knowing the other
Cramer's $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 = 3394
v = np.sqrt((chi2 / n) / dof)
v = 0.52
Cramer's V = 0.52, Degrees of Freedom = 1
Foundations of Inference in Python