The skewness of a random variable is calculated as the expected value of (X - mean(X))^3 divided by the standard deviation cubed. For a random variable X that takes the values 1, 3, and 8 with probabilities 1/4, 1/4, and 1/2 respectively, the skewness is 0.04.