  In this paper we investigate the effect of stochasticity in the spatial and
temporal distribution of supernova remnants on the spectrum and chemical
composition of cosmic rays observed at Earth. The calculations are carried out
for different choices of the diffusion coefficient D(E) experienced by cosmic
rays during propagation in the Galaxy. In particular, at high energies we
assume that D(E)\sim E^{\delta}, with $\delta=1/3$ and $\delta=0.6$ being the
reference scenarios. The large scale distribution of supernova remnants in the
Galaxy is modeled following the distribution of pulsars, with and without
accounting for the spiral structure of the Galaxy. We find that the stochastic
fluctuations induced by the spatial and temporal distribution of supernovae,
together with the effect of spallation of nuclei, lead to mild but sensible
violations of the simple, leaky-box-inspired rule that the spectrum observed at
Earth is $N(E)\propto E^{-\alpha}$ with $\alpha=\gamma+\delta$, where $\gamma$
is the slope of the cosmic ray injection spectrum at the sources. Spallation of
nuclei, even with the small rates appropriate for He, may account for slight
differences in spectral slopes between different nuclei, providing a possible
explanation for the recent CREAM observations. For $\delta=1/3$ we find that
the slope of the proton and helium spectra are $\sim 2.67$ and $\sim 2.6$
respectively at energies above 1 TeV (to be compared with the measured values
of $2.66\pm 0.02$ and $2.58\pm 0.02$). For $\delta=0.6$ the hardening of the He
spectra is not observed. We also comment on the effect of time dependence of
the escape of cosmic rays from supernova remnants, and of a possible clustering
of the sources in superbubbles. In a second paper we will discuss the
implications of these different scenarios for the anisotropy of cosmic rays.
