Skip to content
All library documents

Calculating Distribution Moments from Discrete Density Values

Article Quant Q&A · Author: Walter

Summary

The document explains how to calculate moments when a distribution is represented by a finite set of support points and associated probability values. For a discrete random variable, the raw moment of order k is the sum of each support value raised to k, weighted by its probability. This gives the general moments, including the mean and higher raw moments.

It distinguishes raw moments from central moments, which measure powers of deviations from the mean, and standardized moments, which additionally divide by the standard deviation. These forms support different descriptions of a distribution, such as its spread and shape. The example provides grid points and density values but does not work through numerical results. Since the prompt describes density values rather than explicitly normalized discrete probabilities, applying the weighted-sum formula requires suitable probability weights; continuous density samples generally need numerical integration and normalization.

Key ideas

  • A discrete raw moment is computed by weighting each support value raised to the desired power by its probability.
  • Central moments use deviations from the mean rather than the original support values.
  • Standardized moments scale deviations by the standard deviation to describe distribution shape independent of units.
  • The formula for discrete probabilities cannot be applied blindly to sampled continuous density values without appropriate integration and normalization.

Tags

Full text
# Calculate moments given density values


# Calculate moments given density values












Suppose I have given a finite number of grid values belonging to a probability density function. Moreover, I have the associated values of the density support. For instance:

```
support density value
0.06    0.07
-0.04   0.11
-0.02   0.52
0.00    1.56
0.02    7.87
0.04    19.18
0.06    13.66
0.08    3.40
0.10    0.98
0.13    0.33
0.15    0.14
0.17    0.07
0.19    0.00
0.22    0.43
0.24    0.01
```

Does anyone know the formula to calculate the first four moments of the distribution?

I would appreciate any help. Many thanks in advance!

## Answer by ir7 (score 4, accepted)

https://quant.stackexchange.com/a/55446

The key is:

$$ \mathbf{E}[X^k] = \sum_{i=1}^n x_i^k p(x_i) $$

($X$ discrete variable, $x_i$ realizations, and $p(x_i)$ realization probabilities)

See this link for further details.

## Answer by Martin Vesely (score 1)

https://quant.stackexchange.com/a/55452

Just to add, you did not mention which kind of momement. These calculated by formula in ir7 are called general moments. However, there are also:

- Central moments defined as $E[X-EX]^k$

- Standardized moments defined as $E\big[\frac{X-EX}{\sigma(X)}\big]^k$,

where $EX$ is first general moment (expected value) and $\sigma(X)$ is second general moment (standard deviation).

Note that for $k=1$ the central moment and standardized moment are always 0. For $k=2$, the standardized moment is always 1.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.