  The large-scale statistics of observables such as the galaxy density are
chiefly determined by their dependence on the local coarse-grained matter
density. This dependence can be measured directly and efficiently in N-body
simulations by using the fact that a uniform density perturbation with respect
to some fiducial background cosmology is equivalent to modifying the background
and including curvature, i.e., by simulating a "separate universe". We derive
this mapping to fully non-linear order, and provide a step-by-step description
of how to perform and analyse the separate universe simulations. This technique
can be applied to a wide range of observables. As an example, we calculate the
response of the non-linear matter power spectrum to long-wavelength density
perturbations, which corresponds to the angle-averaged squeezed limit of the
matter bispectrum and higher $n$-point functions. Using only a modest
simulation volume, we obtain results with percent-level precision over a wide
range of scales.
