ClickHouse/docs/zh/sql-reference/aggregate-functions/reference/skewsamp.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
694 B
Markdown
Raw Normal View History

2021-02-02 12:00:41 +00:00
---
2022-08-26 19:07:59 +00:00
slug: /zh/sql-reference/aggregate-functions/reference/skewsamp
2022-04-10 23:08:18 +00:00
sidebar_position: 151
2021-02-02 12:00:41 +00:00
---
# skewSamp {#skewsamp}
2021-03-07 14:18:15 +00:00
计算给定序列的 [样本偏度] (https://en.wikipedia.org/wiki/Skewness)。
2021-02-02 12:00:41 +00:00
2021-03-07 14:18:15 +00:00
如果传递的值形成其样本,它代表了一个随机变量的偏度的无偏估计。
**语法**
2021-02-02 12:00:41 +00:00
``` sql
skewSamp(expr)
```
2021-03-07 14:18:15 +00:00
**参数**
2021-02-02 12:00:41 +00:00
2021-03-07 14:18:15 +00:00
`expr` — [表达式](../../../sql-reference/syntax.md#syntax-expressions) 返回一个数字。
2021-02-02 12:00:41 +00:00
2021-03-07 14:18:15 +00:00
**返回值**
2021-02-02 12:00:41 +00:00
2021-03-07 14:18:15 +00:00
给定分布的偏度。 类型 — [Float64](../../../sql-reference/data-types/float.md)。 如果 `n <= 1` (`n` 样本的大小), 函数返回 `nan`
2021-02-02 12:00:41 +00:00
2021-03-07 14:18:15 +00:00
**示例**
2021-02-02 12:00:41 +00:00
``` sql
2021-03-22 15:56:44 +00:00
SELECT skewSamp(value) FROM series_with_value_column;
2021-02-02 12:00:41 +00:00
```