An experimental analysis of the law of effect