I could outline the nuances of the burden of proving discrimination, but that really does not reach the core question: How do judges, trained as lawyers but untrained as psychologists, construct a burden of proof for bias? Judges are continuously making rules concerning social issues based on less than ideal information, and certainly without the benefit of being expert in analyzing the information. Appellate judges do not have the authority to decide the case "outside the record." That is, they cannot hire expert consultants, nor can they conduct scientifiic, sociological, or psychological research to support their opinions. That is why they call an appellate court decision "the opinion of the court."
Here is the basic formula adopted by the courts for the proof of race discrimination, and for that matter, discrimination generally: 1) the employee must prove he is in the "protected category" of race, age, gender, disability, national origin, etc. 2) he must prove he suffered "an adverse employment action" such as a demotion or job loss; 3) he must prove there was work for him to do; 4) he must prove he was qualified for the work and that he was performing the work to the honest expectations of his employer; and 5) that other employees not in his "protected category" did not receive the discipline, criticisms, or harassment he received, or that they received advantages and opportunities of employment he did not receive.
This kind of proof is called "indirect evidence" and is to be given equal weight as "direct evidence" such as an admission or slur relevant to the issue, and made by the decision maker. Courts acknowledge that employees seldom discover direct evidence (and this fact I submit is because discriminators are not aware of their own biases, and so have no inclination to admit anything).
The employer now has the burden of proving that discrimination was not the motive of the adverse employment action. This step is simple for the employer, who simply has an executive or manager testify to some allegedly legitimate business reason for the decision to fire the employee. Now the real hurdle arises in the case. The employee now has the burden of proving the stated reason for termination is completely without credibility. From this proof, the employee again has raised a legal inference (if not a completely logical one) that the employer has acted from a discriminatory motive.
My experience is that the employer of course will contrive reasons that have some basis in fact, such as an error, or a tardiness, or failure to timely complete a report. However, the question is whether that reason really motivated the decision. It is not necessary to discredit that an event happened. What is discredited is the manager's statement that the event was the true reason for termination. In part that can be proven by showing that the error was not as serious or frequent as it has been characterized by the manager, and that others committed such errors or such violations, but were not disciplined.
Late in my career, I have seen how "artificial" this kind of proof is. It reflects the limited tools available to lawyers in grappling with the subtle processes of unconscious bias. I have therefore resorted to proof by expert opionion concerning those very processes. If the testimony does not go directly to the question at hand by reaching a conclusion of bias in the particular thinking of the decision maker, it can still be introduced to assist the jury in understanding the issues of the case, and in reaching a decision.
The case of Corwell v. Sharp, a 2006 Ninth Circuit Court of Appeals decison, which follows, presents a detailed summary of the kind of proof required in discrimination cases under Title VII (the federal Civil Rights Act).