Avenanti, Sirigu and Aglioti (2010) tested white and black people on their empathy for same-race, other-race, and unknown-race people using TMS (transcranial magnetic stimulation: a way to measure emotions at a subconscious level), SCR (skin conductance response) and heart rate to measure their affective empathy (automatic emotional response) and a questionnaire to measure their cognitive empathy (ability to relate in a logical, thinking way).
The researchers had black and white people watch scenarios of hands being penetrated by a needle or touched by a cotton swab -- white hands, black hands, and hands painted violet to give no apparent race. The people all tended to react more strongly to their own racial group than to another. Despite the fact that they saw the violet hand as the most strange (this was measured to be sure), they reacted with empathy for violet hands yet not for other-race (though the violet hand was actually other-race for each group)!
Given no racial information, people are not AS empathetic as they are for their own race, but they are more empathetic than when race is apparent. This implies that the dysempathy people feel towards those not of their own race is a learned behavior, not 'natural.'
I am critical of the assumption that this bias is purely ingroup/outgroup, as the sample is composed of white native Italians and black immigrant Africans who live in Italy. As such, it doesn't solely measure race, but also national identity. Other studies have shown that minorities tend to have empathy for majorities across racial lines (I'll get to those). Gender is not mentioned, and may also have effect, as there is significant gender difference in the empathy of adults.
[reference]Avenanti, A., Sirigu, A., & Aglioti, S. M. (2010). Racial Bias Reduces Empathic Sensorimotor Resonance with Other-Race Pain. Current Biology, 20(11), 1018-1022. doi:10.1016/j.cub.2010.03.071