We study the links between the likelihood-ratio (LR) gradient-estimation technique (sometimes called the score-function (SF) method), and infinitesimal perturbation analysis (IPA). We show how IPA can be viewed as a (degenerate) special case of the LR and SF techniques by selecting an appropriate representation of the underlying sample space for a given simulation experiment. We also show how different definitions of the sample space yield different variants of the LR method, some of them mixing IPA with more straightforward LR. We illustrate this by many examples. We also give sufficient conditions under which the gradient estimators are unbiased.