Skip to content

Skewness

Source code

Description

Compute the sample skewness of a data set.

Usage

<Expr>$skew(bias = TRUE)

Arguments

bias If FALSE, then the calculations are corrected for statistical bias.

Details

For normally distributed data, the skewness should be about zero. For uni-modal continuous distributions, a skewness value greater than zero means that there is more weight in the right tail of the distribution.

Value

Expr

Examples

library("polars")

df = pl$DataFrame(list(a = c(1:3, 2:1)))
df$select(pl$col("a")$skew())
#> shape: (1, 1)
#> ┌──────────┐
#> │ a        │
#> │ ---      │
#> │ f64      │
#> ╞══════════╡
#> │ 0.343622 │
#> └──────────┘