An analysis of more than 800 films released between 2005 and 2012 suggests that diverse movies earn less in the domestic box office.