In this paper, an Economic Production Quantity (EPQ) model is studied, in which the production defective-rate follows either a uniform or a normal probability distribution. Shortages are allowed and take a backorder state, and the existence of only one machine causes a limited production capacity for the common cycle length of all products. The aim of this research is to determine the optimal production quantity of each product, such that the expected total cost including holding, shortage, production, setup and defective items cost is minimized. The mathematical model of the problem is derived, for which the objective function is proved to be convex. Then, a derivative approach is utilized to obtain the optimal solution. At the end, two numerical examples are provided to illustrate the practical usage of the proposed method.