If you’ve ever mixed up your siblings’ names or accidentally called a family member by your dog’s name, you’re not alone. According to a recent study published in the journal Memory and Cognition, there are consistent, observable patterns to the way we mix up names.

The study, which was conducted by researchers at Duke, based its findings on five surveys of over 1700 respondents. It found that name mix-ups (calling one person by another’s name) usually occur within the same relationship category. For instance, we’re most likely to mix up family members with family members, and friends with friends. We’re considerably less likely to mix up names across relationship categories—for instance, calling a sibling by a friend’s name, or a co-worker by a family member’s name.

“It’s a cognitive mistake we make, which reveals something about who we consider to be in our group,” researcher David Rubin explained. “It’s not just random.”

The study also found that phonetic similarity between names sometimes contributed to mix-ups, though to a lesser degree than relationship categories. Physical similarities between people, meanwhile, were not a significant factor in name swapping. For instance, parents were just as likely to mix up the names of their children whether or not they looked alike, or were the same gender. People even mixed up the names of family members with that of the family dog.

Interestingly, the study found that the same wasn’t true for cat owners. Researchers aren’t sure why people were unlikely to mix up cat names, though they believe it may have to do with the fact that cats are less likely to respond to their names or come when called. They also note that the phenomenon may speak to the unique bond humans seem to have with dogs. “I’ll preface this by saying I have cats and I love them,” researcher Samantha Deffler said. “But our study does seem to add to evidence about the special relationship between people and dogs.”