{
  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
  "type" : "agg",
  "name" : "median_absolute_deviation",
  "description" : "Returns the median absolute deviation, a measure of variability. It is a robust statistic, meaning that it is useful for describing data that may have outliers, or may not be normally distributed. For such data it can be more descriptive than standard deviation.\n\nIt is calculated as the median of each data point’s deviation from the median of the entire sample. That is, for a random variable `X`, the median absolute deviation is `median(|median(X) - X|)`.",
  "note" : "Like `PERCENTILE`, `MEDIAN_ABSOLUTE_DEVIATION` is usually approximate.",
  "signatures" : [
    {
      "params" : [
        {
          "name" : "number",
          "type" : "double",
          "optional" : false,
          "description" : ""
        }
      ],
      "variadic" : false,
      "returnType" : "double"
    },
    {
      "params" : [
        {
          "name" : "number",
          "type" : "integer",
          "optional" : false,
          "description" : ""
        }
      ],
      "variadic" : false,
      "returnType" : "double"
    },
    {
      "params" : [
        {
          "name" : "number",
          "type" : "long",
          "optional" : false,
          "description" : ""
        }
      ],
      "variadic" : false,
      "returnType" : "double"
    }
  ],
  "examples" : [
    "FROM employees\n| STATS MEDIAN(salary), MEDIAN_ABSOLUTE_DEVIATION(salary)",
    "FROM employees\n| STATS m_a_d_max_salary_change = MEDIAN_ABSOLUTE_DEVIATION(MV_MAX(salary_change))"
  ],
  "preview" : false,
  "snapshot_only" : false
}
