Skip to content

Positive Part

Definition

For a real number uu, its positive part is

u+=max⁡{u,0}={u,u≥0,0,u<0.u^+=\max\{u,0\}=\begin{cases}u,&u\ge0,\\0,&u<0.\end{cases}

In the newsvendor model, (y−D)+(y-D)^+ is leftover stock and (D−y)+(D-y)^+ is unmet demand.


Interpretation

The positive part keeps a number when it is positive and replaces it by 00 otherwise. In the newsvendor model it splits one difference y−Dy-D into two counts that cannot be negative: leftover stock and unmet demand.

The graph of the positive part of u, equal to 0 for negative u and to u for positive u, with the line u itself dashed.

The graph is flat at height 00 for u<0u<0 and follows the line u+=uu^+=u for u≥0u\ge0; the dashed piece of the line uu below zero is what the positive part cuts off. Like the absolute value, it has a corner at u=0u=0, and in fact u+=12(u+∣u∣)u^+=\tfrac{1}{2}(u+|u|).

A common slip is to compute (y−D)+(y-D)^+ as y+−D+y^+-D^+. For y=10y=10 and D=12D=12 the leftover is (−2)+=0(-2)^+=0, not 10−12=−210-12=-2.


Key Results

  • Both leftover and shortage quantities are nonnegative.
  • For a fixed realized demand, at least one of them is zero.
  • For discrete demand, expectations are computed by probability-weighting the positive parts for every demand outcome.

Examples

Defining the negative part by u−=max⁡{−u,0}u^-=\max\{-u,0\} gives the identity u=u+−u−u=u^+-u^-.

  • If y=10y=10 and D=7D=7, leftovers are 3 and unmet demand is zero.
  • If y=10y=10 and D=12D=12, leftovers are zero and unmet demand is 2.

Prerequisites

  • Real numbers

Sources

Aliases: ramp function, plus function, positive part function

Last updated: 20 October 2026 03:02