Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
Switch services using the Version drop-down list. Learn more about navigation.
Applies to: ✅ Microsoft Fabric ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
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 |