6

I am fitting a gaussian mixture to financial data. My mixture density is given by:

$f(l)=πϕ(l;μ_1,σ^2_1)+(1−π)ϕ(l;μ_2,σ_2^2)$

I calculated the skewness of the data already. Now, I want to look at the skewness of the fitted gaussian mixture. Since I used ML (EM algorithm) and not method of moments, the moments will not be the same. I know this. But I don't know how to calculate the skewness of the mixed gaussian? I want to have a theoretical derived formula, so I mean, I don't want to calculate this empirical by taking the fitted values and do e.g. skew(...) in R. I will do this to control myself, but first I want to have the theoretical formula for it. I could not find it (I googled for skewness mixture density and so.)

I know that the the skewness is given by

$ \gamma_1 = \operatorname{E}\Big[\big(\tfrac{X-\mu}{\sigma}\big)^{\!3}\, \Big] = \frac{\mu_3}{\sigma^3} = \frac{\operatorname{E}\big[(X-\mu)^3\big]}{\ \ \ ( \operatorname{E}\big[ (X-\mu)^2 \big] )^{3/2}} $

So what is the Skewness of a mixture gaussian? How can I derive it? A mathematical derivation would be great. I have estimated both densities and I have the estimates for μ and σ. I want a formula in what I can insert those values to get the skewness of the mixed density. Then I will control it empirically with skew(...) in R.

I know this for the kurtosis: kurtosis and I want to have this for skewness and - this would be great- a derivation of it?

Stat Tistician
  • 2,113
  • 4
  • 29
  • 54
  • 2
    The formulas for moments of mixture distributions are given in the statement of the question at http://stats.stackexchange.com/questions/54645/properties-of-moment-generating-functions. That substantially answers this one, too, given that skewnesses are rational combinations of moments as shown in the formula for $\gamma_1$. – whuber Mar 30 '13 at 15:17
  • @whuber mh, this doesn't help me much, I am not good in reading those formulas.... – Stat Tistician Mar 30 '13 at 15:18
  • Please explain: you are asking for a formula and a theoretical derivation and that thread provides it. If there is a part of it you do not understand (or think is incorrect), then please *point it out*; otherwise it's impossible to know what your question really is and it will just be closed by the community. – whuber Mar 30 '13 at 15:19
  • I want to have a formula for the skewness like I have for the kurtosis above in my question @whuber I want to plug in my estimators and get the skewness. – Stat Tistician Mar 30 '13 at 15:20
  • And using either the formulas in that thread or the one given by @Triple roast here, in conjunction with formulas *you have already presented in your question,* you have a plug-in solution. – whuber Mar 30 '13 at 15:21
  • I really don't see this? @Triple roast gave me a formula with integral and so, there is no mu and sigma in it! And the formula in the other threads have no mu and sigma. It seems to my, that they just say, that the moments of z are p*moments of y + p*moments of x, if z is mixture of y and x, but this is not what I want. – Stat Tistician Mar 30 '13 at 15:23
  • let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/8138/discussion-between-whuber-and-stat-tistician) – whuber Mar 30 '13 at 15:25
  • Explicit formulas for skewness and kurtosis in Wang, J, (2000) "*Modeling and generating daily changes in market variables using a multivariate mixture of normal distributions*" (see p6), http://ww2.valdosta.edu/~jwang/paper/MixNormal.pdf – Glen_b Mar 26 '16 at 06:17

1 Answers1

9

Skewness is a vague concept which allows its formalisation in several ways. The most popular measure of skewness is the one you mention, which was proposed more than 100 years ago. However, there are better (more interpretable) measures nowdays.

It has been largely discussed the validity of using a measure of skewness in multimodal distributions, since its interpretation becomes unclear. This is the case of finite mixtures. If your mixture looks (or is) unimodal, then you can use this value to understand a bit how asymmetric it is.

In R, this quantity is implemented in the library moments, in the command skewness().

The moments of a mixture $X$, with density $g=\sum_{j=1}^n \pi_j f_j$ can be calculated as $E[X^k] = \sum_{j=1}^n \pi_j\int x^k f_j(x)dx$.

A numerical solution in R.

# Sampling from a 2-gaussian mixture
gaussmix <- function(n,m1,m2,s1,s2,alpha) {
    I <- runif(n)<alpha
    rnorm(n,mean=ifelse(I,m1,m2),sd=ifelse(I,s1,s2))
}

# A simulated sample
samp <- gaussmix(100000,0,0,1,1,0.5)

library(moments)
# Approximated kurtosis and skeweness using the simulated sample
skewness(samp)
kurtosis(samp)
Triple roast
  • 161
  • 3
  • yeah, but I don't want to do the R step first. I want to have mathematical derivation/formula for it? @Triple roast I mean, I have the ML estimates and I put them into a mathematical derived formula to get the skewness. So not the empirical solution, you know what I mean? But in your formula I cannot put in my estimates? – Stat Tistician Mar 30 '13 at 15:10
  • Yes, please see my update. It is simple to calculate moments of a mixture, using the linearity of the expectation. Still, my first argument may be of interest. – Triple roast Mar 30 '13 at 15:12
  • see my edit in my question, I have this for kurtosis and want to have a similiar formula for skewness. – Stat Tistician Mar 30 '13 at 15:14
  • +1 The preliminary discussion and cautionary comments are on the mark. Thank you for sharing your wisdom and welcome to our site! – whuber Mar 30 '13 at 15:18
  • I need a formula where I can plug in the estimates of mu and sigma and also pi to get the skewness. The assumption is, that I have a mixture of two normal gaussians. So there should be a possibility of deriving that? – Stat Tistician Mar 30 '13 at 15:30
  • 3
    Thanks, @whuber. Stat, please check my update (stolen from [this answer](http://stackoverflow.com/questions/12450007/generating-samples-from-a-two-gaussian-mixture-in-r-code-given-in-matlab)). It is numerical, but it may be of some help. Cheers. – Triple roast Mar 30 '13 at 15:30
  • I knew already that I can do this with skewness() or skew() from another package. I also have another implementation. But this is not what I want. I want to have a formula for the skewness like I have for the kurtosis in my question! @Tripleroast – Stat Tistician Mar 30 '13 at 15:32
  • Yes, there must be a nice expression for calculating it. I do not know it (and I am too lazy to calculate it at this moment), but someone else may know it. The best I can do is to send you my best wishes. – Triple roast Mar 30 '13 at 15:33
  • well thanks @Triplerost, but this is, what I am searching for - especially the mathematical derivation, since I cannot do this by myself. – Stat Tistician Mar 30 '13 at 15:34