When you feel gratitude toward another person, you are feeling appreciation that the person has done something for you that required some effort on their part and that was ultimately designed to be helpful to you. When there was no effort or cost to someone’s actions, then you may feel fortunate that there was a positive outcome, but not necessarily grateful to them for engaging in that action.

For example, suppose an electric cable comes loose on your car while you’re driving, and the car stops by the side of the road. A driver stops, looks under the hood, and reconnects the wire, allowing you to get home. You are grateful that the driver sacrificed the time to help you. If the driver had sped by, but that caused a vibration in the road that caused the cable to reconnect, you would feel lucky, but not grateful to the driver.

This analysis of gratitude suggests that we need to make some assessment of whether the action of another person came at a cost to them in order to feel grateful. A paper in the November, 2014 issue of Personality and Social Psychology Bulletin by Michael MacKenzie, Kathleen Vohs, and Roy Baumeistersuggests that people’s beliefs in may influence the perception of cost, which may in turn affect the feeling of gratitude.

The idea is that if you believe that people have free will, then you believe that the actions they take are intentional. Those intentions reflect that they have explicitly done things to help you, and that increases your sense of gratitude toward them.

In one set of studies, the researchers simply measured people’s beliefs in free will and their tendency to be grateful. As you would expect if beliefs in free will affect gratitude, these measures were positively correlated. The more that people believed in free will, the more they tended to experience gratitude in their lives.

Of course, it is hard to draw strong conclusions from correlational studies like this. In another experiment, the researchers manipulated beliefs in free will by having people reflect on sentences that suggested that there is free will or that there is not. This induced a temporary difference between groups in the strength of their belief in free will. Then, participants thought about events of their lives in which someone did something for them. Participants were more grateful for these events if they had been induced to believe in free will than if they'd been induced to believe that free will does not exist. A control group which did not think about free will before the task behaved similarly to those induced to believe in free will, suggesting that most participants (from this population of undergraduates) tended to believe in free will.

A third experiment also induced differences in the belief in free will by using passages that argued that free will does or does not exist. After that, participants were led to believe that they were going to do a rather boring experiment for another experimenter. After walking to another room, that experimenter told them that the study could be completed without their help and they did not have to do the boring task. Participants returned to the first room, where they were asked a few questions about the first experimenter, including questions about whether they were grateful to the experimenter for letting them go, and whether the experimenter was sincere about the motivations for letting them out of the experiment.

Participants induced to believe in free will were more grateful to the experimenter than those induced to believe that free will does not exist. In addition, participants induced to believe in free will felt that the experimenter was more sincere than those who were induced to believe that free will does not exist. The belief that the experimenter was sincere was able to statistically explain the relationship between belief in free will and gratitude.

Putting all of this together: In order to feel gratitude, you have to believe that the person who has done something for you actually wants to help you. One factor that affects the sense that someone wants to help is whether they have free will. After all, without free will, they are destined to act the way they do.

This research has implications for companies who are performing customer service. If companies want people to feel grateful for the service they get, it is useful for customer service agents to let customers know they have some autonomy in the actions they take. This way, customers will believe that agents have chosen to help them, rather than believing that something about company policy mandated them to be helpful.

Follow me on Twitter, Facebook and Google+.

Check out my new book Smart Change and my books Smart Thinking and Habits of Leadership.

Listen to my radio show on KUT radio in Austin, Two Guys on Your Head, and follow 2GoYH on Twitter.