tencent cloud

All product documents
Cloud Log Service
Mathematical Statistical Function
Last updated: 2024-03-20 11:47:49
Mathematical Statistical Function
Last updated: 2024-03-20 11:47:49
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)

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon