Impliment of calculating the skewness of PCE model

Hi everyone,
When I try to understand the formula of skewness, I am not sure if there is something wrong with my derivation process, as shown in Fig. 1, please help me to correct it.


Fig.1

If there is no problem with the derivation, I will try to implement it with M=5 (5 random variables) below.
The code for this example is in the attachment.
Example_PCE_SimplySupportedBeam_test.m (5.9 KB)

In this code, I print the full form Basis of PCE model, and according to the definite of αM , I think the row of Basis is α, β, γ, the column is α1 to αM, as shown is fig. 2. Is this correct?

If it is right, based on Eq.(11) when any data of Basis=0, all the Equation is 0, and skweness will be 0.
It must be wrong. I would like to know where is the problem?

Thanks!

Best regards,
Shengwang Zhang

Hi, @bsudret, @nluethen, could you please help me solve this problem? Thank you very much!

Hi shengwang, could you please give me some insights of your derivation and implementation for calculating skewness? Thanks!