Tyler Cowen points out a paper examining the link between right-wing terrorism and the study of engineering. I think that Rands’ essay on living with nerds may shed some light on this topic as well, although terrorism and religion were not among the subjects covered.