The distribution of electron energy losses in thin absorbers