series_pearson_correlation()

Calculates the pearson correlation coefficient of two numeric series inputs.

See: Pearson correlation coefficient.

Syntax

series_pearson_correlation(series1, series2)

Learn more about syntax conventions.

Parameters

Name Type Required Description
series1, series2 dynamic ✔️ The arrays of numeric values for calculating the correlation coefficient.

Returns

The calculated Pearson correlation coefficient between the two inputs. Any non-numeric element or nonexisting element (arrays of different sizes) yields a null result.

Example

range s1 from 1 to 5 step 1
| extend s2 = 2 * s1 // Perfect correlation
| summarize s1 = make_list(s1), s2 = make_list(s2)
| extend correlation_coefficient = series_pearson_correlation(s1, s2)

Output

s1 s2 correlation_coefficient
[1,2,3,4,5] [2,4,6,8,10] 1