This paper deals with theoretical investigations of the measurement accuracy of optical aberrations by a Talbot wavefront sensor in the presence of random amplitude variations. The theoretical prediction of the intensity distribution for gratings of any type based on their spatial spectrum is obtained, and it is shown that the grating is fully restored in the Talbot plane even for a high fraction of random amplitude. The possibilities of the self-imaging phenomenon are investigated based on the simulation results. The simulation results show that pit displacement error increases when the correlation length decreases or when the grating spatial spectrum increases. For second- and third-order aberrations, the intensity variations decrease the measured value and increment value of aberrations of the same order.