corr
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| GetCorrelations | 1 | |
| Pearson | 1 | A wrapper to the Correlations.GetPearson()) base method. |
03 Members
Double()(), corr)| Name | Type | Description |
|---|---|---|
mat | Double()() | - |
cor | corr | - |
Double(), Double())A wrapper to the Correlations.GetPearson() base method.
The Pearson correlation coefficient, often denoted by r, is a measure of the linear relationship between two continuous variables. It was developed by Karl Pearson from a related idea introduced by Francis Galton in the 1880s. The coefficient is calculated using the covariance of the two variables divided by the product of their standard deviations.
Here's a breakdown of the key aspects of the Pearson correlation:
Range: The value of the Pearson correlation coefficient ranges from -1 to 1.
- 1 indicates a perfect positive linear relationship: as one variable increases, the other variable also increases in a perfectly linear manner.
- -1 indicates a perfect negative linear relationship: as one variable increases, the other variable decreases in a perfectly linear manner.
- 0 indicates no linear relationship between the variables.
Symmetry: The Pearson correlation is symmetric, meaning that the correlation of X with Y is the same as the correlation of Y with X. Scale Independence: The Pearson correlation is not affected by changes in the scale of the variables. For example, if you multiply all values of one variable by a constant, the correlation coefficient remains the same. Unit-Free: The correlation coefficient is a unit-free measure, which means that it does not have any units of measurement attached to it. Sensitivity to Outliers: The Pearson correlation coefficient can be sensitive to outliers, which are extreme values that differ significantly from other observations. Outliers can have a disproportionate effect on the calculation of the correlation coefficient. Assumptions:
- The relationship between the variables is linear.
- Both variables are continuous and normally distributed.
- The data is homoscedastic, meaning that the variance of the residuals (differences between observed and predicted values) is constant across all levels of the independent variable.
Interpretation:
- A correlation close to 1 or -1 suggests a strong linear relationship.
- A correlation close to 0 suggests a weak linear relationship.
- The sign of the correlation coefficient indicates the direction of the relationship: positive means that as one variable increases, the other tends to increase, and negative means that as one variable increases, the other tends to decrease.
Limitations:
- It only measures linear relationships and may not capture non-linear relationships effectively.
- It does not imply causation; a high correlation between two variables does not mean that one causes the other.
- It can be misleading in the presence of outliers or when the data does not meet the assumptions of normality and homoscedasticity.
The Pearson correlation coefficient is a useful statistical tool for assessing the strength and direction of the linear relationship between two continuous variables, but it should be used with an understanding of its assumptions and limitations.
| Name | Type | Description |
|---|---|---|
x | Double() | - |
y | Double() | - |