Crucial role of electron correlation in both the upper and lower states in optical transitions