Essays on racial and gender discrimination in developing countries