Janice McCabe is associate professor of sociology and Allen House professor at Dartmouth College. She is the author of “Connecting in College: How Friendship Networks Matter for Academic and Social Success.”

Imagine you’re a college student, and it’s Wednesday night. Should you join your friends playing Fortnite, or go to the library alone to study? Most parents and professors (if not students themselves) would probably encourage you to study.

But before you say to “go to the library,” consider this: Sociological research demonstrates that spending time with your friends might improve your academic performance. Numerous studies find that social support buffers stress and helps people maintain physical and mental health. While friends are not the only source of social support, they are an important one, along with family and other community members. The importance of social support cannot be overstated — especially during late adolescence when many students are living apart from their families for the first time.

I’ve spent the past 15 years talking with students about their friendships and mapping their friendship networks. I find that it is not just one-on-one relationships, like best friends, that matter for students, but the many varied connections between friends. As I describe in my book “Connecting in College,” different students have different types of networks. Some students are “tight-knitters” — they have networks where most of their friends know each other. Some are “compartmentalizers,” with two to four groups of friends where friends know each other within groups but not across them. And some are “samplers,” with mainly one-on-one friendships.

Despite the differences in their friendship networks and their reasons for attending their specific college, nearly all college students share two goals: doing well in school, and making friends. Fortunately, it turns out those two goals are profoundly linked. Friendship connections (or lack of them) have a huge and almost wholly overlooked effect on students’ happiness and motivation in college.

Sadly, in a survey of more than 88,000 college students on 140 campuses in spring 2018, 63 percent said they had felt “very lonely” in the previous 12 months. While reasonable people may disagree on what makes for a successful college experience, few (if any) would include loneliness in their definition. And sociological research, including my own, shows us that social support is easier to find in dense, tightknit networks. Call that another vote for “play Fortnite.”

Assuming that social life stands in the way of academic success also limits the benefits we see to mixing the two. Of course, students themselves tell me that they may not do their most productive studying with friends. But while it may not be a direct effect on their GPA, spending time with friends (including less “productive” studying) may indirectly affect academics through motivation and other emotional benefits. Compartmentalizers likely find themselves balancing academic and social life by spending time with a group of “academic” friends and another group of “social” friends, while tight-knitters find academic and social support from their densely connected friend group, and samplers end with an assortment of individual friendships that may help socially or academically. Across these different network types, I find that spending time with friends, including studying together, can strengthen students’ academic identities and their friendships. It can also make them happier and keep them in college.

Over the holiday break, for example, I got a phone call from a student at Dartmouth College, where I’m house professor of a community with around 1,000 members. The student said she was feeling anxious about going back to school in the new year. It wasn’t the academics that were her concern, or her ability to balance schoolwork with two intense extracurriculars; it was that she didn’t have friends who helped her feel less lonely.

My advice for the student was to make time for friends, just as she made time for classes, homework and extracurriculars. I encouraged her to ask someone new to lunch or dinner once a week, and I gave her some ideas that this someone could be a person whom she’s seen or met in class, in her dorm or in one of her extracurriculars — they all have at least a couple things in common. When I ran into her in the dining hall a few weeks into the new term, she reported that things were going much better. She had not only been regularly having lunch with a classmate, they sometimes studied together, and she was feeling less lonely.

With that in mind, let’s return to the library-or-video-games dilemma, and offer some advice to students. Don’t always choose studying alone or always choose hanging out with friends. Reflect on whether their friendships provide academic support and social support, and what they need at that time. Perhaps the answer for that Wednesday night is to study alone in the library because they need that focused time, or perhaps playing video games with friends is just the break or reward from academics they need that night to rejuvenate. Or, maybe studying with friends in their dorm room is just what they need to gain social support and achieve those two goals: doing well in school and making friends. Studying with friends isn’t always the answer, but it’s probably more helpful than your parents and professors think it is.