The study showed that generosity changed the activity in people’s brains in ways that increase feelings of happiness, even if the generous act is small or only imagined.