In epidemiology, several mathematical models are developed by using the system of differential equations and many of them have used the parameters traditionally as deterministic variables. In this paper, the variables, which are used in the system, are considered as random variables with specified distributions because the equations with random coefficients are well suited in describing the real behavior of the parameters as compared to deterministic coefficients. A stochastic spectral representation of the parameters is used. Numerical methods and polynomial chaos method are used to solve and simulate the system of equations and analysis of the spread of worms in computer network with respect to time is done.