X-ray diffraction from films consisting of layers with different thicknesses, structures and chemical contents is analysed. The disorder is described by probabilities for different sequences of layers. Closed analytical expressions for the diffracted X-ray intensity are obtained when the layers form a stationary Markov chain. The proposed model is applied to the diffraction data from epitaxial sodium bismuth titanate thin films with Aurivillius structure possessing such one-dimensional disorder. In this case, the disorder is caused by a random stacking of three and four perovskite units separated by bismuth oxide interlayers. The results of analytical calculations are in good agreement with the experimental data and indicate that the incorporation of sodium in the Bi(4)Ti(3)O(12) phase causes the formation of a fourth perovskite unit.