[null,null,["最后更新时间 (UTC):2024-08-13。"],[[["\u003cp\u003eDemographic parity in machine learning models aims to ensure equal acceptance rates for both majority and minority groups, regardless of individual qualifications.\u003c/p\u003e\n"],["\u003cp\u003eWhile demographic parity promotes equal representation, it can overlook differences in the qualifications of individuals within each group, potentially leading to unfair outcomes.\u003c/p\u003e\n"],["\u003cp\u003eEvaluating model fairness requires considering various metrics and the specific context of the model's application, as demographic parity alone may not be sufficient.\u003c/p\u003e\n"],["\u003cp\u003eThis specific example highlights the potential bias in feature data, leading to disparities in qualification predictions between majority and minority groups.\u003c/p\u003e\n"]]],[],null,["# Fairness: Demographic parity\n\nOne method we can use to evaluate our model's predictions for fairness is to\ncompare the admissions rate for the majority group and the minority group.\nIf the two admissions rates are equal, then the model's predictions exhibit\n[**demographic parity**](/machine-learning/glossary#demographic-parity): a\nstudent's chance of being admitted to the university doesn't vary by\ndemographic group.\n\nSuppose the admissions model accepts 16 candidates from the majority\ngroup and 4 candidates from the minority group. The model's decisions\nsatisfy demographic parity, as the acceptance rate for both majority and\nminority candidates is 20%.\n**Figure 2.** Candidate pool split into two groups: Rejected Candidates and Accepted Candidates. Both the majority (blue) and minority (orange) groups have an acceptance rate of 20%.\n\nThe following table quantifies the numbers supporting the rejected and accepted\ncandidates in Figure 2.\n\n| | Majority group | Minority group |\n|---------------------|----------------|----------------|\n| **Accepted** | 16 | 4 |\n| **Rejected** | 64 | 16 |\n| **Acceptance Rate** | 20% | 20% |\n\nExercise: Check your intuition\n------------------------------\n\nThe university admissions committee is considering using demographic parity\nas the fairness evaluation metric for their model, and needs your guidance\non the benefits and drawbacks of this approach. Can you identify one\n**pro** and one **con** of evaluating the model's predictions using demographic\nparity? \nCan you identify any problems with the feature data? \nClick here to see our answers \nContinue reading the next section, **Benefits and\nDrawbacks**, for our summary of the key pros and cons of using\ndemographic parity.\n\nBenefits and Drawbacks\n----------------------\n\nThe key benefit of demographic parity for our admissions example is that it\nensures that both majority and minority groups are represented in the admitted\nclass of students in the same proportions as they are in the candidate pool.\nThat is, if the applicant pool is comprised of 80% majority-group candidates\nand 20% minority-group candidates, demographic parity guarantees that the group\nof admittees will also be 80% majority-group students and 20% minority-group\nstudents.\n\nHowever, demographic parity has one significant drawback: it does not take the\n*distribution* of predictions for each demographic group (the number of\nstudents classified as \"qualified\" vs. \"unqualified\") into account when\nevaluating how the 20 admissions slots should be allocated.\n\nLet's take another look at the composition of our candidate pool from above.\nHowever, this time we'll classify candidates not only by demographic group,\nbut also by whether the model has scored each candidate as \"qualified\" or\n\"unqualified\":\n**Figure 3.** The same breakdown of Rejected and Accepted candidates as in Figure 2, but this time all qualified students in both the majority and minority groups are shaded in green, and the qualified students who were rejected are marked with an X. Of the 35 qualified majority-group students, 16 were accepted. Of the 15 qualified minority-group students, 4 were accepted.\n\nThe following table quantifies the numbers supporting the rejected and accepted\ncandidates in Figure 3.\n\n| | Majority group || Minority group ||\n| | Accepted | Rejected | Accepted | Rejected |\n|-----------------|----------|----------|----------|----------|\n| **Qualified** | 16 | 19 | 4 | 11 |\n| **Unqualified** | 0 | 45 | 0 | 5 |\n\nLet's tabulate the acceptance rates for qualified students for both groups: \n$$\\\\text{Majority acceptance rate} = \\\\frac{\\\\text{qualified majority students accepted}}{\\\\text{total qualified majority students}} = \\\\frac{16}{35} = \\\\text{46%}$$ \n$$\\\\text{Minority acceptance rate} = \\\\frac{\\\\text{qualified minority students accepted}}{\\\\text{total qualified minority students}} = \\\\frac{4}{15} = \\\\text{27%}$$\n\nEven though both groups have an overall acceptance rate of 20%, satisfying\ndemographic parity, the acceptance rate for qualified majority students is 46%,\nwhereas the acceptance rate for qualified minority students is only 27%.\n\nIn cases like this, where the distribution of a preferred label\n(such as \"qualified\") varies greatly for both groups, demographic parity may\nnot be the optimal metric to choose for evaluating fairness. In the next\nsection, we'll look at an alternative fairness metric, equality of opportunity,\nwhich takes these differences into consideration.\n| **Note:** There may be additional benefits/drawbacks of demographic parity not discussed here that are also worth considering, depending on both the goals the model is designed to achieve and the social context in which the model's predictions will be used.\n| **Key terms:**\n|\n| - [Bias (ethics/fairness)](/machine-learning/glossary#bias-ethicsfairness)\n- [Demographic parity](/machine-learning/glossary#demographic-parity) \n[Help Center](https://support.google.com/machinelearningeducation)"]]