  We study the relationship between the metallicity of gamma-ray burst (GRB)
progenitors and the probability distribution function (PDF) of GRB host
galaxies as a function of luminosity using cosmological hydrodynamic
simulations of galaxy formation. We impose a maximum limit to the gas
metallicity in which GRBs can occur, and examine how the predicted luminosity
PDF of GRB host galaxies changes in the simulation. We perform the
Kolmogorov-Smirnov test, and show that the result from our simulation agrees
with the observed luminosity PDF of core-collapse supernovae (SNe) host
galaxies when we assume that the core-collapse SNe trace star formation. When
we assume that GRBs occur only in a low-metallicity environment with $Z\lesssim
0.1 \Zsun$, GRBs occur in lower luminosity galaxies, and the simulated
luminosity PDF becomes quantitatively consistent with the observed luminosity
PDF. The observational bias against the host galaxies of optically dark GRBs
owing to dust extinction may be another reason for the lower luminosities of
GRB host galaxies, but the observed luminosity PDF of GRB host galaxies cannot
be reproduced solely by the dust bias in our simulation.
