We present a complete and exhaustive theory of signal-to-noise-ratio in bipartite ghost imaging with classical (thermal) and quantum (twin beams) light. The theory is compared with experiment for both twin beams and thermal light in a certain regime of interest.