  Galaxy formation simulations frequently use Initial Mass Function (IMF)
averaged feedback prescriptions, where star particles are assumed to represent
single stellar populations that fully sample the IMF. This approximation breaks
down at high mass resolution, where stochastic variations in stellar
populations become important. We discuss various schemes to populate star
particles with stellar masses explicitly sampled from the IMF. We use Monte
Carlo numerical experiments to examine the ability of the schemes to reproduce
an input IMF in an unbiased manner while conserving mass. We present our
preferred scheme which can easily be added to pre-existing star formation
prescriptions. We then carry out a series of high resolution isolated
simulations of dwarf galaxies with supernovae, photoionization and
photoelectric heating to compare the differences between using IMF averaged
feedback and explicitly sampling the IMF. We find that if supernovae are the
only form of feedback, triggering individual supernovae from IMF averaged rates
gives identical results to IMF sampling. However, we find that photoionization
is more effective at regulating star formation when IMF averaged rates are
used, creating more, smaller H II regions than the rare, bright sources
produced by IMF sampling. We note that the increased efficiency of the IMF
averaged feedback versus IMF sampling is not necessarily a general trend and
may be reversed depending on feedback channel, resolution and other details.
However, IMF sampling is always the more physically motivated approach. We
conservatively suggest that it should be used for star particles less massive
than $\sim500\,\mathrm{M_\odot}$.
