Skip to content

Statistics

Brian Pho edited this page May 6, 2022 · 7 revisions

Notes

https://towardsdatascience.com/let-us-understand-the-correlation-matrix-and-covariance-matrix-d42e6b643c22

In simple words, both the terms measure the relationship and the dependency between two variables. “Covariance” indicates the direction of the linear relationship between variables. “Correlation” on the other hand measures both the strength and direction of the linear relationship between two variables. Correlation is a function of the covariance. What sets them apart is the fact that correlation values are standardized whereas, covariance values are not. You can obtain the correlation coefficient of two variables by dividing the covariance of these variables by the product of the standard deviations of the same values. If we revisit the definition of Standard Deviation, it essentially measures the absolute variability of a datasets’ distribution. When you divide the covariance values by the standard deviation, it essentially scales the value down to a limited range of -1 to +1. This is precisely the range of the correlation values.

https://scikit-learn.org/stable/modules/model_evaluation.html#r2-score-the-coefficient-of-determination

It represents the proportion of variance (of y) that has been explained by the independent variables in the model. It provides an indication of goodness of fit and therefore a measure of how well unseen samples are likely to be predicted by the model, through the proportion of explained variance. As such variance is dataset dependent, R² may not be meaningfully comparable across different datasets.

r^2 vs r for project? Use r^2 if you want accurate predictions (such as predicting stock market values). Use r if you just want a general understanding of the relationship, not necessarily for predictions.

https://towardsdatascience.com/multiple-hypothesis-testing-correction-for-data-scientist-46d3a3d1611d

R: The correlation between the predictor variable, x, and the response variable, y. R2: The proportion of the variance in the response variable that can be explained by the predictor variable in the regression model.

Websites

Clone this wiki locally