Crime rates are calculated using daytime population. You can switch between modes in the settings menu at the top of the map.
Daytime population counts everyone present in the area during the day by including workers who commute in and excluding residents who leave for work.
Resident population counts only those who live in the area, regardless of where they are during the day.