tencent cloud

Cloud Log Service

Mathematical Statistical Function

Download
聚焦模式
字号
最后更新时间: 2026-06-25 09:49:00
本文档由 AI 翻译
This document introduces the basic syntax and examples of mathematical statistical functions.

Basic syntax

Function
Description

corr(key1, key2)

Returns the correlation coefficient of two columns. The calculation result range is [0,1].

covar_pop(key1, key2)

Returns the population covariance of two columns.

covar_samp(key1, key2)

Returns the sample covariance of two columns.

regr_intercept(key1, key2)

Returns linear regression intercept of input values. key1 is the dependent value. key2 is the independent value.

regr_slope(key1, key2)

Returns linear regression slope of input values. key1 is the dependent value. key2 is the independent value.

stddev(key)

Returns the sample standard deviation of the key column. This function is equivalent to the stddev_samp function.

stddev_samp(key)

Returns the sample standard deviation of the key column.

stddev_pop(key)

Returns the population standard deviation of the key column.

variance(key)

Returns the sample variance of the key column. This function is equivalent to the var_samp function.

var_samp(key)

Returns the sample variance of the key column.

var_pop(key)

Returns the population variance of the key column.

Example

Returns the correlation between data in the timeCost (response time) and SamplingRate (sampling rate) columns:
* | select corr(timeCost,SamplingRate)



帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈