system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How can car insurance companies adjust their prices for people based on age/sex and not be sued for discrimination? What stops them from adjusting rates based on race?

I know they base their rates on actuarial information, but what is to stop them from doing the same thing with regards to race? It seems like insurance companies are allowed to exercise a degree of prejudice that most other businesses would never get away with.
gpt
Two things that are relevant:

1. They can discriminate on any factor if they have scientific evidence that it increases or decreaes the cost of insuring you. There is clear evidence that younger drivers are more likley to be involved in a crash; therefore it is legal to charge them more. 

2. The legal standard for discrimination is different depending on what the basis for the discrimination is. Legally race is extremely difficult to justify (almost impossible), sex is difficult but possible, and age is relatively easy to justify.