In this paper, we derive some identities involving special numbers and moments of random variables by using the generating functions of the moments of certain random variables. Here the related special numbers are Stirling numbers of the first and second kinds, degenerate Stirling numbers of the first and second kinds, derangement numbers, higher-order Bernoulli numbers and Bernoulli numbers of the second kind.