In the scrape-off layer and the edge region of a tokamak, the plasma is strongly turbulent and scatters the radiofrequency (RF) electromagnetic waves that propagate through this region. It is important to know the spectral properties of these scattered RF waves, whether used for diagnostics or for heating and current drive. The spectral changes influence the interpretation of the obtained diagnostic data, and the current and heating profiles. A full-wave, three-dimensional (3-D) electromagnetic code ScaRF (see Papadopoulos et al., J. Plasma Phys., vol. 85, issue 3, 2019, 905850309) has been developed for studying the RF wave propagation through turbulent plasma. ScaRF is a finite-difference frequency-domain (FDFD) method used for solving Maxwell's equations. The magnetized plasma is defined through the cold plasma by the anisotropic permittivity tensor. As a result, ScaRF can be used to study the scattering of any cold plasma RF wave. It can also be used for the study of the scattering of electron cyclotron waves in ITER-type and medium-sized tokamaks such as TCV, ASDEX-U and DIII-D. For the case of medium-sized tokamaks, there is experimental evidence that drift waves and rippling modes are present in the edge region (see Ritz et al., Phys. Fluids, vol. 27, issue 12, 1984, pp. 2956–2959). Hence, we have studied the scattering of RF waves by periodic density interfaces (plasma gratings) in the form of a superposition of spatial modes with varying periodicity and random amplitudes (see Papadopoulos et al., J. Plasma Phys., vol. 85, issue 3, 2019, 905850309). The power reflection coefficient (a random variable) is calculated for different realizations of the density interface. In this work, the uncertainty of the power reflection coefficient is rigorously quantified by use of the Polynomial Chaos Expansion (see Xiu & Karniadakis, SIAM J. Sci. Comput., vol. 24, issue 2, 2002, pp. 619–644) method in conjunction with the Smolyak sparse-grid integration (see Papadopoulos et al., Appl. Opt., vol. 57, issue 12, 2018, pp. 3106–3114), which is known as the PCE-SG method. The PCE-SG method is proven to be accurate and more efficient (roughly a 2-orders of magnitude shorter execution time) compared with alternative methods such as the Monte Carlo (MC) approach.