# Coskewness

In probability theory and statistics, coskewness is a measure of how much three random variables change together. Coskewness is the third standardized cross central moment, related to skewness as covariance is related to variance. In 1976, Krauss and Litzenberger used it to examine risk in stock market investments. The application to risk was extended by Harvey and Siddique in 2000.
If three random variables exhibit positive coskewness they will tend to undergo extreme deviations at the same time, an odd number of which are in the positive direction (so all three random variables undergoing extreme positive deviations, or one undergoing an extreme positive deviation while the other two undergo extreme negative deviations). Similarly, if three random variables exhibit negative coskewness they will tend to undergo extreme deviations at the same time, an even number of which are in the positive direction (so all three random variables undergoing extreme negative deviations, or one undergoing an extreme negative deviation while the other two undergo extreme positive deviations).

## Types

There are two different measures for the degree of coskewness in data.

### Coskewness

For three random variables X, Y and Z, the non-trivial coskewness statistic is defined as:
    $S(X,Y,Z)={\frac {\operatorname {E} \left[(X-\operatorname {E} [X])(Y-\operatorname {E} [Y])(Z-\operatorname {E} [Z])\right]}{\sigma _{X}\sigma _{Y}\sigma _{Z}}}$
where E[X] is the expected value of X, also known as the mean of X, and $\sigma _{X}$ is the standard deviation of X.

### Standardized rank coskewness

Bernard, Chen, Rüschendorf and Vanduffel defined the standardized rank coskewness of three random variables X, Y and Z as:
    $RS(X,Y,Z)=32\operatorname {E} \left[\left(F_{X}(X)-{\frac {1}{2}}\right)\left(F_{Y}(Y)-{\frac {1}{2}}\right)\left(F_{Z}(Z)-{\frac {1}{2}}\right)\right]$
where F$_X$ (X), F$_Y$ (Y) and F$_Z$ (Z) are the cumulative distribution functions of X, Y and Z, respectively.

## Properties

Skewness is a special case of the coskewness when the three random variables are identical:
    $S(X,X,X)={\frac {\operatorname {E} \left[(X-\operatorname {E} [X])^{3}\right]}{\sigma _{X}^{3}}}={\operatorname {skewness} [X]},$
For two random variables, X and Y, the skewness of the sum, X + Y, is
    $S_{X+Y}={1 \over \sigma _{X+Y}^{3}}{\left[\sigma _{X}^{3}S_{X}+3\sigma _{X}^{2}\sigma _{Y}S(X,X,Y)+3\sigma _{X}\sigma _{Y}^{2}S(X,Y,Y)+\sigma _{Y}^{3}S_{Y}\right]},$
where S$_X$ is the skewness of X and $\sigma _{X}$ is the standard deviation of X. It follows that the sum of two random variables can be skewed (S$_{X+Y}$ ≠ 0) even if both random variables have zero skew in isolation (S$_X$ = 0 and S$_Y$ = 0).
The standardized rank coskewness RS(X, Y, Z) satisfies the following properties:
(1) −1 ≤ RS(X, Y, Z) ≤ 1.
(2) The upper bound of 1 is obtained by the copula given in (3.3) in Bernard, Chen, Rüschendorf and Vanduffel (2023). The lower bound of −1 is obtained by the copula (3.5) in the same paper.
(3) It is invariant under strictly increasing transformations, i.e., when f$_i$, i = 1, 2, 3, are arbitrary strictly increasing functions, RS(X, Y, Z) = RS(f$_1$ (X), f$_2$ (Y), f$_3$ (Z)).
(4) RS(X, Y, Z) = 0 if X, Y and Z are independent.

## Example

Let X be standard normally distributed and Y be the distribution obtained by setting X=Y whenever X<0 and drawing Y independently from a standard half-normal distribution whenever X>0. In other words, X and Y are both standard normally distributed with the property that they are completely correlated for negative values and uncorrelated apart from sign for positive values. The joint probability density function is
    $f_{X,Y}(x,y)={\frac {e^{-x^{2}/2}}{\sqrt {2\pi }}}\left(H(-x)\delta (x-y)+2H(x)H(y){\frac {e^{-y^{2}/2}}{\sqrt {2\pi }}}\right)$
where H(x) is the Heaviside step function and δ(x) is the Dirac delta function. The third moments are easily calculated by integrating with respect to this density:
    $S(X,X,Y)=S(X,Y,Y)=-{\frac {1}{\sqrt {2\pi }}}\approx -0.399$
Note that although X and Y are individually standard normally distributed, the distribution of the sum X+Y is significantly skewed. From integration with respect to density, we find that the covariance of X and Y is
    $\operatorname {cov} (X,Y)={\frac {1}{2}}+{\frac {1}{\pi }}$
from which it follows that the standard deviation of their sum is
    $\sigma _{X+Y}={\sqrt {3+{\frac {2}{\pi }}}}$
Using the skewness sum formula above, we have
    $S_{X+Y}=-{\frac {3{\sqrt {2}}\pi }{(2+3\pi )^{3/2}}}\approx -0.345$
This can also be computed directly from the probability density function of the sum:
    $f_{X+Y}(u)={\frac {e^{-u^{2}/8}}{2{\sqrt {2\pi }}}}H(-u)+{\frac {e^{-u^{2}/4}}{\sqrt {\pi }}}\operatorname {erf} \left({\frac {u}{2}}\right)H(u)$
Bernard, Chen, Rüschendorf and Vanduffel (2023) found risk bounds on coskewness for some popular marginal distributions as shown in the following table.
| Marginal distributions | Minimum coskewness | Maximum coskewness |
| N($\mu _{i}$, $\sigma _{i}^{2}$) | $-{\frac {2{\sqrt {2\pi }}}{\pi }}$ | ${\frac {2{\sqrt {2\pi }}}{\pi }}$ |
| Student($\nu$), $\nu >3$ | $-{\frac {4(\nu -2){\sqrt {(\nu -2}})\pi \Gamma ({\frac {\nu +1}{2}})}{(3-4\nu +\nu ^{2})\pi \Gamma ({\frac {\nu }{2}})}}$ | ${\frac {4(\nu -2){\sqrt {(\nu -2}})\pi \Gamma ({\frac {\nu +1}{2}})}{(3-4\nu +\nu ^{2})\pi \Gamma ({\frac {\nu }{2}})}}$ |
| Laplace($\mu _{i}$, $b_{i}$) | $-{\frac {3{\sqrt {2}}}{2}}$ | ${\frac {3{\sqrt {2}}}{2}}$ |
| U($a_{i}$, $b_{i}$) | $-{\frac {3{\sqrt {3}}}{4}}$ | ${\frac {3{\sqrt {3}}}{4}}$ |
where $\Gamma (x)$ is the gamma function.