Functions & Formulae

Each applied formula has its own function page, with a signature, implementations, and tests.

Social marginal cost and benefit function

s(MPC,MEC,MPB,MEB) = (MSC,MSB)

Adds the marginal effect that an activity has on third parties to the marginal cost or benefit that the decision-maker weighs, giving the marginal social cost or benefit. The efficient quantity is where marginal social benefit equals marginal social cost; a private decision that ignores the external term stops at a different quantity, and a Pigouvian tax or subsidy set at the marginal external effect at the efficient quantity closes the gap.

  • Marginal social cost, social benefit and net benefit at one margin

    MSC = MPC + MEC; MSB = MPB + MEB; NB_S = MPB + MEB - MPC - MEC; NB_P = MPB - MPC

    Marginal social cost is the marginal private cost borne by the decision-maker plus the marginal external cost imposed on others; marginal social benefit is the marginal private benefit plus the marginal external benefit received by others. Subtracting cost from benefit with and without the external terms gives the net gain to society and to the decision-maker from one more unit. When the two net gains differ in sign, the private decision goes against the social one, and a subsidy or tax larger than the private shortfall at that margin reverses it. By convention production externalities enter the cost side and consumption externalities the benefit side, so an external cost of consumption, such as the contribution of antibiotic use to resistance, is entered as a negative MEB.

  • Pigouvian subsidy and deadweight loss for vaccination with linear curves

    Q_p = (a - c) / b; Q_s = (a + m - c) / (b + g); s = m - g * (a + m - c) / (b + g); DWL = 0.5 * ((a + m - c) / (b + g) - (a - c) / b) * (m - g * (a - c) / b)

    Takes a linear marginal private benefit (demand) curve a minus b × Q, a constant marginal cost c with no external cost, and a marginal external benefit m minus g × Q that falls as coverage rises, as herd immunity would suggest. The private quantity Q_p sets marginal private benefit equal to c; the efficient quantity Q_s sets marginal social benefit equal to c. The Pigouvian subsidy s is the marginal external benefit at Q_s, and the deadweight loss of leaving the market alone is the triangle between marginal social benefit and cost from Q_p to Q_s. The tax on a negative externality mirrors this: t equals the marginal external cost at the efficient quantity.