It's a multi-part problem: fewer Black/Hispanic students show up to begin with -- and then they're less likely to graduate with a CS major at the end of their university career. I've broken up the factors I've seen in the literature based on when in the "leaky pipeline" they most apply.
I'm aiming here to give a quick-and-dirty overview of the issues -- there's a fair bit of literature on this and the references below provide an excellent place to start on the literature.
(Sidenote: The Varma paper () also looks at Aboriginal students; my impression from the few Aboriginal CSers I know is that they parallel many of the same issues. There is unfortunately very little research on First Nations, Metis and Inuit under-representation in computer science.)
The Leaky Pipeline: Middle School
- In middle school, Black and Hispanic youth are just as interested in computer science as their White and Asian peers. [1, 2]
- Black and Hispanic youth are less likely to have a computer at home [1, 3].
- For White boys, video games are where many of them first "pull back the curtain" on how computers work. But while Black boys play just as much video games as White boys, modding and cheat codes aren't part of their gaming cultures -- and don't hence "pull back" the curtain . They don't have the "privilege to break things".
- Characters in video games have a lack of racial diversity  -- from a young age Black and Hispanic students imagine computer scientists as "White or Asian men"; computer science does not seem relevant to them.
- Black and Hispanic students are more likely to go to disadvantaged k-12 schools [4, 5].
- They're less likely to graduate from high school than their white peers, and lower expectations are placed on them [1, 4].
- And for those that do succeed, they're less likely to have a high school CS class available to them. The situation has actually been getting worse with the testing movement -- disadvantaged schools are removing CS since it's an "extra", and they have a hard time recruiting/retaining qualified teachers .
Choosing to Study University CS
- Encouragement is really, really important. And Black/Hispanic students are less likely to be encouraged by parents, guardians, teachers, or peers to study computer science [2, 6, 7]. Encouragement has a stronger effect on students than their ability at computer science  -- and has the potential to overcome differences in preparation for university CS.
- Black and Hispanic girls are less likely than their White peers to know somebody who works in STEM, and are less likely to have parents in STEM. 
- Black and Hispanic youth are more aware/worried about gender/racial discrimination in STEM than their White peers [2, 7].
- Black and Hispanic students are motivated to study computer science because it is a prestigious, secure career, and provides social status [2, 5, 6, 8]. While they are turned on by the creative, pro-social, problem solving part of computer science -- and are more engaged when CS is taught that way -- they feel like "do what you love" is a luxury for rich White people .
- Black, Hispanic and low-class White women choose universities differently than middle/upper-class White women. The latter care about things like reputation and programme detalis. The former care about tuition, scholarships, and closeness to family . At my university, tuition is higher for computer science than it is for other Arts & Science majors. We're likely not doing any favours to diversity here.
Staying in CS Majors
- When Black and Hispanic students do show up to university CS, they are more likely than their White and Asian peers to feel underprepared. Indeed, 48% of Black, Hispanic and Aboriginal students feel not prepared "at all" .
- I'm gonna repeat it since it bears repeating: Encouragement has a stronger effect on students than their ability at computer science  -- and has the potential to overcome differences in preparation for university CS.
- The heavy workload in CS courses is a problem for many of these students. You need to be "unmarried, single, no kids, no job, no hobbies, no dependents" . Black and Hispanic students are disproportionately likely to be "non-traditional" students (have families, mature students, etc). Many Black/Hispanic students will leave CS because of the workload . One contributing factor is social habits: whereas Asian students are likely to study together as part of their social life, Black students are more likely to study in isolation and not as part of their social life .
- Another major reason they leave is hostility. They find they can't be taken seriously due to their race (and gender, if a woman on top of it) . And they're more likely to feel like "outsiders" in CS . Though they feel like outsiders, it's worth noting that lack of identification as a geek/nerd appears not to be an issue .
Some things that can be done:
- Improve CS outreach to disadvantaged schools. Early encouragement and exposure to CS is important .
- Lobby to make CS mandatory in high school for everybody.
- Promote co-op in CS programmes, and appeal to the fact that CS offers a solid career path. Co-op has the advantage of helping with tuition -- another concern for non-Asian racial minorities .
- Improving scholarship opportunities for underrepresented minorities and low-income students to study computer scinece.
- Provide mentoring programmes for students, like the Tri-Mentoring Programme at UBC -- mentorship is a valuable source of encouragement and advice for students of underrepresented groups.
- Provide social learning communities, like the First-Year Learning Communities we have at U of Toronto -- make it part of CS students' social lives to study together.
- Zarrett, Nicole, et al. "Examining the gender gap in IT by race: Young adults’ decisions to pursue an IT career." Women and information technology: Research on underrepresentation (2006): 55-88.
- Girl Scout Research Institute. "Generation STEM: What Girls Say about Science, Technology, Engineering and Math". (2012)
- DiSalvo, Betsy James, Kevin Crowley, and Roy Norwood. "Learning in Context Digital Games and Young Black Men." Games and Culture 3.2 (2008): 131-141.
- Goode, Joanna, Rachel Estrella, and Jane Margolis. "Lost in translation: Gender and high school computer science." Women and information technology: Research on underrepresentation (2006): 89-114.
- Varma, Roli. "Women in computing: The role of geek culture." Science as culture 16.4 (2007): 359-376.
- Guzdial, Mark, et al. "A statewide survey on computing education pathways and influences: factors in broadening participation in computing." Proceedings of the ninth annual international conference on International computing education research. ACM, 2012.
- Zarrett, Nicole R., and Oksana Malanchuk. "Who's computing? Gender and race differences in young adults' decisions to pursue an information technology career." New directions for child and adolescent development 2005.110 (2005): 65-84.
- Margolis, Jane, and Allan Fisher. Unlocking the clubhouse: Women in computing. The MIT Press, 2003.