And even after the election how do they determine the exact percentages of who black people voted for ...or women, students, or senior men?
R vote R. D vote D. I votes mostly R
Two ways.
First, polling in early voting states will ask whether someone voted, who they voted for and their party affiliation. This info can be used to come up with a good idea of how voting is going.
Second, early vote ballots can be cross referenced against the voter’s Party registration (where such exists) This is imperfect because it assumes that people don’t cross party lines in a general election, but applying algorithms based on past election results can produce a weighting that results in a decent guess as to how voting is going.