If you suffer from compulsive patterns like biting your nails, twisting your hair, or pulling out your hair (trichotillomania) — you’re more likely to do it during periods of boredom or frustration, according to a new study. The authors of the study, which was published in the Journal of Behavior Therapy and Experimental Psychiatry, claim that the people who are more likely to exhibit these types of compulsive behaviors tend to be perfectionistic, neurotic personalities.

“Chronic hair-pulling, skin-picking disorder and nail-biting and various other habits are known as body-focused repetitive behaviors,” Kieron O’Connor, a lead author of the study, said in the press release. “Although these behaviors can induce important distress, they also seem to satisfy an urge and deliver some form of reward.”

O’Connor continued: “We believe that individuals with these repetitive behaviors may be perfectionistic, meaning that they are unable to relax and to perform tasks at a ‘normal’ pace. They are therefore prone to frustration, impatience, and dissatisfaction when they do not reach their goals. They also experience greater levels of boredom.”

In the study, researchers analyzed 48 participants — half of whom experienced these compulsive behaviors, and half of whom didn’t. The participants went to a clinical evaluator for a telephone screening interview and completed questionnaires that evaluated emotions like boredom, anger, guilt, irritability, and anxiety. Afterwards, participants were exposed to 4 situations that were meant to induce a certain feeling — from stress and relaxation, to frustration and boredom. For the stress-induced situation, participants watched a plane crash video; in the relaxation one, they watched waves on a beach. Participants in the “frustration” situation were asked to complete a problem that was actually way more difficult than expected; and those in the “boredom” one were asked to sit alone in a room for 6 minutes.

Perhaps not surprisingly, the researchers found that the participants who were more likely to partake in the compulsive behaviors ended up having an even greater urge to engage in them during the boredom and frustration parts of the experiment.

“These results partially support our hypothesis in that participants were more likely to engage in body-focused repetitive behaviors when they felt bored, frustrated, and dissatisfied than when they felt relaxed,” Sarah Roberts, an author of the study, said. “Moreover, they do engage in these behaviors when they are under stress. This means that condition is not simply due to ‘nervous’ habits. The findings suggest that individuals suffering from body-focused repetitive behaviors could benefit from treatments designed to reduce frustration and boredom and to modify perfectionist beliefs.”

Source: Roberts S, O’Connor K, Aardema F, Bélanger. “The impact of emotions on body-Focused repetitive behaviors: Evidence from a non-treatment-seeking sample.” Journal of Behavior Therapy and Experimental Psychiatry, 2015.