We consider squeezing of one component of the collective spin vector of an
atomic ensemble inside an optical cavity. The atoms interact with a cavity
mode, and the squeezing is obtained by probing the state of the light field
that is transmitted through the cavity. Starting from the stochastic master
equation, we derive the time evolution of the state of the atoms and the cavity
field, and we compute expectation values and variances of the atomic spin
components and the quadratures of the cavity mode. The performance of the setup
is compared to spin squeezing of atoms by probing of a light field transmitted
only once through the sample.Comment: 8 pages, 2 figure