Public goods are biomolecules that contribute to the community welfare. Their production can benefit populations in many ways, such as by providing access to previously unutilized resources. However, public good production has often been energetically costly, resulting in a reduction in the cellular growth rate. To reduce this cost, populations have evolved strategies to regulate biosynthesis of public good. Among these cell densities dependent regulation of public goods, as accomplished by quorum sensing, is a widely studied mechanism. Given that the fitness costs and benefits of public good production must be balanced, adoption of quorum sensing as a regulatory pathway by bacterial cells may have parallels with several economic principles that are used to study optimal investment decisions. Here, we explore the regulation of a public good, whose benefit is an increase in the carrying capacity, through experimental measurements of growth for engineered strains of Escherichia coli and analysis of those results using a modified logistic growth model. By varying the cell density at which the production of the public good was activated, we showed sharply-peaked optimum population fitness. Analysis further revealed that cell density associated with maximum public good benefits was determined by the trade-off between the cost of public good production, in terms of reduced growth rate, and benefits received from public good, in the form of increased carrying capacity. Moreover, our model showed that cells with luxRI quorum sensing seem to upregulate public good expression when the benefits from the production was immediate. These results demonstrate a case where a biological system apparently has evolved to optimize the timing of public good production to account for short-term costs and delays in reaping a future benefit.