Foundations of Inference in Python
Paul Savala
Assistant Professor of Mathematics
Statistical relationship between two variables
r, p_value = stats.pearsonr(chicago_rents, usa_rents)
print(r)
0.939
print(p_value < 0.05)
TRUE
Conclusion: Rent prices between USA and Chicago are correlated
$R^2:$ Percent of variation explained
print(r**2)
0.883
Foundations of Inference in Python