Level of willpower can be attributed to people's cravings for junk food, a new study found.

Self-control to reject unhealthy foods is related with two areas of the brain, researchers at California Institute of Technology (Caltech) said in the study published in the May issue of Science.

The researchers used MRI to scan the brains of volunteers as they looked at photos of dozens of types of foods and decided which ones they'd like to eat. They found significant differences in the brain activity between people who had self-control in terms of making food choices and those with no self-control.

Previous research has shown that an area of the brain called the ventromedial prefrontal cortex (vmPFC) is involved in all value-based decisions. When vmPFC activity decreases, a person will probably reject an item, whereas increased activity means they'll probably choose it.

In people with no self-control, the vmPFC seemed to take into consideration only the taste of a food, according to the study.

"In the case of good self-controllers, however, another area of the brain -- called the dorsolateral prefrontal cortex (DLPFC) -- becomes active and modulates the basic value signals so that the self-controllers can also incorporate health considerations into their decisions," principal investigator Antonio Rangel, an associate professor of economics, said in a news release.

The vmPFC is active during every decision and that the DLPFC is more active when a person is using self-control, according to the study.

"This, ultimately, is one reason why self-controllers can make better choices," Rangel said.