How to compute statistical moments of a categorical random variable?

180 Views Asked by At

Let $C$ be a random categorical variable of $K$ classes, where $Pr(C=j)=p_j$, for all $j \in[0,\cdots,K-1]$ and $\sum_{j=0}^{K-1}p_j=1$.

Let $X$ be the one-hot encoding vector of $C$, i.e. $X=[x_0,x_1,\cdots, x_{K-1}]$ where all $x_j$ are zeros except for the one $x_C=1$. For example, if $K=3$, then

  • $X=[1,0,0]$ ($C=0$) with probability $p_0$
  • $X=[0,1,0]$ ($C=1$) with probability $p_1$
  • $X=[0,0,1]$ ($C=2$) with probability $p_2$

Note the one-hot encoding puts an implicit constraint that $\sum_{j=0}^{K-1}x_j=1$ for an $X$.

Question: given $Y=\sum_{i=1}^{N}X_i/N$, ($X_i$ are i.i.d), what are $Y$'s statistical moments like mean, variance, skewness and kurtosis? If this is too difficult to compute, will it be helpful by giving the uniformity condition that $p_0=p_1=\cdots=p_{K-1}=1/K$?

Of course, I know $E[Y]=E[X]=[p_1,\cdots,p_K]$, but how to compute other moments?