Ensemble X-ray variability of active galactic nuclei from serendipitous source catalogues