In this paper, we define some functions to extend Mathematica's capabilities to handle symbolic computations of the moment generating function and characteristic function for linear combination of independent random variables. These functions utilizes pattern-matching codes that enhance Mathematica's ability to simplify expressions involving the product of algebraic terms. Several examples will be presented. The examples include using Mathematica for calculating mean and variance, determining the distribution of sum of independent random variables and illustrating the central limit theorem and the law of large numbers.