pearson function
The pearson function returns the Pearson coefficient between column1 and column2, evaluated within groups defined by the group parameter if required.
The pearson coefficient represents the relationship between two continuous variables.
The Pearson coefficient ranges from -1 to +1, where:
-1 represents a negative correlation, and
+1 represents a positive correlation.
Function and parameters
pearson(column1, column2, group)
Parameter | Description |
---|---|
column1 | It identifies the first column to which you want to apply the formula. The column1 parameter is mandatory. |
column2 | It identifies the second column to which you want to apply the formula. The column2 parameter is mandatory. |
group | It allows you to group the results by a certain column. |
Example
The following example uses the Bike Sales dataset.
Description | Screenshot |
---|---|
The value of the Pearson coefficient is 0.902, so the result is considered positive. | |
|