Correlation and Covariance (corr)

Calculate correlation coefficient, covariance, and regression line for given data. Find Pearson, Kendall, and Spearman correlation.

Correlation and Covariance

Purpose

The Correlation and Covariance function helps you understand the relationship between two sets of numbers. It calculates the correlation coefficient (Pearson, Kendall, Spearman) and covariance between the two sets of numbers.

Use Cases

  • Analyzing the relationship between two variables
  • Understanding how changes in one variable affect another
  • Predicting future values based on the relationship between the variables

How to Use

  1. Enter the numbers for the first set in the X Numbers field.
  2. Enter the numbers for the second set in the Y Numbers field.
  3. Click on the Calculate button to see the results.

Input Values

  1. X Numbers: Enter the numbers for the first set. (default unit is inch)
  2. Y Numbers: Enter the numbers for the second set. (default unit is inch)

Output Values

  1. Pearson r: The Pearson correlation coefficient between the two sets of numbers.
  2. Pearson p: The p-value associated with the Pearson correlation coefficient.
  3. Kendall tau: The Kendall correlation coefficient between the two sets of numbers.
  4. Kendall p: The p-value associated with the Kendall correlation coefficient.
  5. Spearman roh: The Spearman correlation coefficient between the two sets of numbers.
  6. Spearman p: The p-value associated with the Spearman correlation coefficient.
  7. Regression Slope: The slope of the regression line.
  8. Intercept: The intercept of the regression line.
  9. Regression line: The equation of the regression line.

Any other Instruction

  • The correlation coefficient ranges from -1 to 1, where 1 indicates a strong positive relationship, -1 indicates a strong negative relationship, and 0 indicates no relationship.
  • The p-value helps determine the significance of the correlation coefficient.

Steps of Calculation

  1. Convert the input numbers into a format suitable for calculation.
  2. Calculate the Pearson, Kendall, and Spearman correlation coefficients.
  3. Calculate the regression slope, intercept, and regression line equation.

Technical Parameter names

x_numbers, y_numbers

Return Values

Pearson r, Pearson p, Kendall tau, Kendall p, Spearman roh, Spearman p, Regression Slope, Intercept, Regression line

Example Expressions

You can use the following expressions to directly evaluate in a non-interactive manner using eva():

corr(x_numbers='10, 11, 12, 13, 14, 15, 16, 17, 18, 19', y_numbers='2, 1, 4, 5, 8, 12, 18, 25, 96, 48')
corr(x_numbers='5, 8, 10, 15, 20', y_numbers='1, 2, 3, 4, 5')

Click on Help icon to open the help page on a separate window.






Calculator: corr, Created by: super, V#0: , Variant owner: , Link