Calculates r, the Pearson product-moment correlation coefficient of a dataset. Learn more
In Google Sheets, the PEARSON function is used to calculate the Pearson correlation coefficient between two sets of data.
The Pearson correlation coefficient, also known as Pearson's r or simply the correlation coefficient, measures the strength and direction of the linear relationship between two variables.
The syntax of the PEARSON function in Google Sheets is as follows:
PEARSON(datay, datax)
Here, datay and datax are the two sets of data for which you want to calculate the correlation coefficient. Both datay and datax can be ranges, arrays, or references to cells that contain numeric values.
Please note that the PEARSON function assumes that the two sets of data have the same length. If they have a different number of values, the function will return an error.