Given a data set $x = \{ x(n) \mid n=1,\ldots,m\}$ how do I calculate the $p^{th}$-order cumulant? In particular I need to calculate the 4th-order cumulant. I found that I can calculate the cumulant from moments, but I also don't know how to calculate moments. I found how to calculate the 4th central moment (kurtosis) but I am not sure if/how they are related.
Since I have to implement the calculation of the cumulant in C++ I would be interested in a general explanation (to understand what I am doing) but also hints on how to implement the calculation efficiently would be appreciated. How can one interpret the 4th-order cumulant?
I am sorry if this is a trivial question but I don't have a strong mathematical background and was not able to find the answer online.