# Rewriting the formula for skewness and kurtosis? is there intuitive explanation? [closed]

We know that variance can be written

$\sigma^2 = \frac{\sum_{i=1}^n (x-\mu_x)^2}{n}$ or $\sigma^2 = \sum_{i=1}^2 (x_i - \mu_x)^2 p_i$ where $p$ is the probability density function.

1. Is there any intuitive explanation for this?

2. Does this mean that skewness and kurtosis can be written as following:

We know kurtosis $\gamma_1 = \sum_{i = 1}^n \frac{(X-\mu_x)^3}{n\sigma}$, can it be written as:

$\gamma_1 = \sum_{i=1}^n (X-\mu_x)^3 p_i$

and we know that

$\gamma_2 = \sum_{i = 1}^n \frac{(X-\mu_x)^4}{n\sigma}$

can be written

$\gamma_2 = \sum_{i=1}^n (X-\mu_x)^4 p_i$

i.e. equating

$\frac{1}{n} = p_i$ even $\frac{1}{n}$ is the division by amount and $p_i$ is the pdf of observation $i$. This does not seem correct to me even in the variance case. How is this explained?

## closed as unclear what you're asking by Glen_bSep 15 '16 at 18:38

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• you seem to be conflating sample and population formulas and mangling them as a result, leading to your present confusion. For example your initial formula for variance doesn't seem to be generally correct. Where did you see it? Please also check your spelling. – Glen_b Sep 15 '16 at 18:37
• The formulas for variance is found here: davidmlane.com/hyperstat/A16252.html and clayton.edu/Portals/323/Imported/business.clayton.edu/arjomand/… . One of the formulas is the statistical way to represent variance while the other i believe is how we do it probabilistically. The reason i want the formulas is because I am doing Black-and-scholes calculations in reverse, thus having approximated a continous probability curve. I'm trying to discretize this continuous curve to find the moments, with the formulas. – Ptru Sep 16 '16 at 11:14
• Ah, although it doesn't say so at the first link, that can only be talking about a finite population. The second link is the more general, applying also when the population is infinite and discrete; to discuss variance, skewness and kurtosis properly, you really need to cover the continuous (and hopefully also the mixed case). It might help to look at wikipedia on the variance (and the higher moments, and the skewness and kurtosis measures) where it will at least cover the continuous cases. Why do you show a sum of only two terms in your second variance formula? – Glen_b Sep 16 '16 at 12:16
• Why are you trying to discretize? It would really help if you clarified your question. – Glen_b Sep 16 '16 at 12:17

For me this is easiest to understand in terms of the expectation operator, which is defined by $$\mathbb{E}[f(x)]=\int f(x)p(x)dx$$ where $p(x)$ is the probability density function of the random variable $x$, and $f(\,)$ is an arbitrary (but non-random) function.
You can think of $p(x)dx$ as an infinitesimal probability. The other forms you give are essentially discretizations of this fundamental integral form. If you have a sample $x_1,\ldots,x_n$, then the expectation can be estimated as a (Riemann-)sum over bins centered around the points, giving $$\mathbb{E}[f(x)]\approx\sum_i f(x_i)p(x_i)\Delta x_i=\sum_i f(x_i)P_i$$ where $P_i$ is an estimate of $\Pr[\,x\in\text{bin }i\,]$.
Finally, if we assume the samples are independent and identically distributed, then they should each have equal weight, so $P_i\approx\frac{1}{n}$.
In all of your cases, you are simply approximating the expectation $\mathbb{E}[f(x)]$ by a uniformly-weighted sum over a sample of $x$. The only thing that changes is the $f$. For the mean $f(x)=x$, for the variance $f(x)=(x-\mu)^2$, for the skewness $f(x)=[(x-\mu)/\sigma]^3$, etc.