correl

statistics

Calculates correlation coefficient between two arrays

Syntax

correl(array1, array2)

Parameters

array1 (array)

The first array of values

array2 (array)

The second array of values

Returns

number

The correlation coefficient between -1 and 1

Examples

Correlation between x and y columns
Input:
correl(.x, .y)
Output:
0.87
Temperature vs sales correlation
Input:
correl(.temperature, .sales)
Output:
0.65

The correl() function calculates the correlation coefficient between two arrays of values, measuring the strength and direction of their linear relationship. Returns a value between -1 (perfect negative correlation) and 1 (perfect positive correlation).

Usage

Use correl() for finding relationships between variables, identifying patterns, and understanding how different metrics influence each other.

Related Functions