Browse Source

[ES|QL] Specify population in StdDev docs (#129225)

There are 2 types of Standard Deviation: population and
sample, this commit clarifies that the existing is population.
Larisa Motova 4 months ago
parent
commit
1333ea8883

+ 1 - 1
docs/reference/query-languages/esql/_snippets/functions/description/std_dev.md

@@ -2,5 +2,5 @@
 
 **Description**
 
-The standard deviation of a numeric field.
+The population standard deviation of a numeric field.
 

+ 1 - 1
docs/reference/query-languages/esql/_snippets/functions/examples/std_dev.md

@@ -11,7 +11,7 @@ FROM employees
 | --- |
 | 0.20637044362020449 |
 
-The expression can use inline functions. For example, to calculate the standard deviation of each employee’s maximum salary changes, first use `MV_MAX` on each row, and then use `STD_DEV` on the result
+The expression can use inline functions. For example, to calculate the population standard deviation of each employee’s maximum salary changes, first use `MV_MAX` on each row, and then use `STD_DEV` on the result
 
 ```esql
 FROM employees

+ 1 - 1
docs/reference/query-languages/esql/kibana/definition/functions/std_dev.json

@@ -2,7 +2,7 @@
   "comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
   "type" : "agg",
   "name" : "std_dev",
-  "description" : "The standard deviation of a numeric field.",
+  "description" : "The population standard deviation of a numeric field.",
   "signatures" : [
     {
       "params" : [

+ 1 - 1
docs/reference/query-languages/esql/kibana/docs/functions/std_dev.md

@@ -1,7 +1,7 @@
 % This is generated by ESQL's AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.
 
 ### STD DEV
-The standard deviation of a numeric field.
+The population standard deviation of a numeric field.
 
 ```esql
 FROM employees

+ 2 - 2
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/StdDev.java

@@ -37,12 +37,12 @@ public class StdDev extends AggregateFunction implements ToAggregator {
 
     @FunctionInfo(
         returnType = "double",
-        description = "The standard deviation of a numeric field.",
+        description = "The population standard deviation of a numeric field.",
         type = FunctionType.AGGREGATE,
         examples = {
             @Example(file = "stats", tag = "stdev"),
             @Example(
-                description = "The expression can use inline functions. For example, to calculate the standard "
+                description = "The expression can use inline functions. For example, to calculate the population standard "
                     + "deviation of each employee’s maximum salary changes, first use `MV_MAX` on each row, "
                     + "and then use `STD_DEV` on the result",
                 file = "stats",