We investigate the effects that variations in profile have on specular and diffuse reflectance from a grating consisting of parallel lines. We investigate, as an example, a nominal grating consisting of photoresist or silicon lines on a silicon substrate, having a vertical sidewall angle, a width of 100 nm, a pitch of 200 nm, and a height of 200 nm. We model the effects of variations by calculating the reflectance of multiple 25-line superstructures, in which the positions of the line edges are randomly modulated about their nominal profile. We study line-edge variation, line-position variation, and random edge variation in order to test the hypothesis that the reflectance of a grating with variations in line profile can be approximated by the reflectance of a grating with uniform lines having the average line profile. We find that the reflected field can be approximated by the mean field reflected by a distribution of periodic gratings and that the field does not represent the field from the average profile. When fitting results to more than one modeled parameter, the changes that are observed can be enough to shift the deduced parameter in some cases by more than the rms variation of that parameter. We also investigate the diffuse scattering by the grating by considering the diffraction orders of the 25-line period. The intensity distribution and the polarization of the diffuse scattering are found to be different for line-width variation and line-position variation.