CORR

Description

Syntax

double corr(x, y)

Calculate the Pearson correlation coefficient, which is returned as the covariance of x and y divided by the product of the standard deviations of x and y. If the standard deviation of x or y is 0, the result will be 0.

example

1. mysql> select corr(x,y) from baseall;
2. +---------------------+
3. | corr(x, y)          |
4. +---------------------+
5. | 0.89442719099991586 |
6. +---------------------+
7. 1 row in set (0.21 sec)

keywords

CORR