writing out the simulated distribution