Use observation index in frequency calculation