This author has recently contributed to understanding the economic tradeoffs of alternative production systems by introducing the option of investing in reducing the setup cost parameter in the classical undiscounted EOQ model. That work only addresses the reduced setup and holding costs that are associated with reducing the setup cost. This paper seeks to address another benefit of lower setup costs: improved quality. It does so by introducing a simple model in which there is a significant relationship between quality and lot size: While producing a lot, the process can go “out of control” with a given probability each time another unit is produced. Once out of control, the process produces defective units and continues to do so until the entire lot is produced. An extra cost, for rework, etc., is incurred for each defective piece produced. Thus, the optimal lot size is smaller than that given by the classical EOQ formula, because of the smaller resulting expected fraction of defective units. The paper goes on to introduce the option of investing in process quality improvement by means of reducing the probability of the process moving out of control. Such an investment yields better output quality (fewer defects), a larger lot size, fewer setups, and larger holding costs. Similarly, an investment solely in setup cost reduction yields a smaller lot size, lower holding costs, and better output quality. When seeking the optimal process quality level and/or setup cost in general, a specially designed algorithm must be used, as the problem is one of minimizing the sum of a convex and a concave function. However, a specific form for the investment cost functions is assumed and the optimal solutions to the various cases that arise are found explicitly. The results are illustrated with a numerical example.