In this note we derive the backward (automatic) differentiation (adjoint [automatic] differentiation) for an algorithm containing a conditional expectation operator. As an example we consider the backward algorithm as it is used in Bermudan product valuation, but the method is applicable in full generality. The method relies on three simple properties: 1. a forward or backward (automatic) diffe...