  Within the framework of the internal shock model, we study the luminosity and
the variability in gamma-ray bursts from collimated fireballs. In particular we
pay attention to the role of the photosphere due to $e^\pm$ pairs produced by
internal shock synchrotron photons. It is shown that the observed Cepheid-like
relationship between the luminosity and the variability can be interpreted as a
correlation between the opening angle of the fireball jet and the mass included
at the explosion with a standard energy output. We also show that such a
correlation can be a natural consequence of the collapsar model. Using a
multiple-shell model, we numerically calculate the temporal profiles of
gamma-ray bursts. Collimated jets, in which the typical Lorentz factors are
higher than in wide jets, can produce more variable temporal profiles due to
smaller angular spreading time scales at the photosphere radius. Our
simulations quantitatively reproduce the observed correlation.
