(CNN) Spending too much time scrolling through social media and watching more television has been linked with symptoms of depression in young people -- and a new study reveals to what extent screen time and depression may be intertwined.

For every additional hour young people spend on social media or watching television, the severity of depressive symptoms they experience goes up, according to a study published in the journal JAMA Pediatrics on Monday.

"To our knowledge, the present study is the first to present a developmental analysis of variations in depression and various types of screen time," the researchers wrote.

The study included 3,826 students in seventh to 11th grade from 31 schools in the Montreal area in Canada. Between 2012 and 2018, the students were asked to complete surveys during class to assess their screen time behaviors and symptoms of depression.

Screen time was measured by asking students how much time per day they spent playing video games, using social media, watching television and using a computer.

Depression symptoms were measured by asking students to indicate on a scale -- from zero (not at all) to four (very much) -- to what extent they experience seven known symptoms of depression, such as feelings of loneliness, sadness or hopelessness. Those symptoms were measured as units.

The researchers found that high levels of social media use over four years was associated with increased depression -- and each one-hour increase in the average time students said they spent on social media was associated with an increase in the severity of depression symptoms within that same year.

The tendency to already watch high levels of television over four years without an increase was associated with less depression. But the researchers found that each one-hour increase in the average amount of time students said they spent watching television within a given year was associated with an increase in the severity of depression symptoms that year.

The researchers found that high levels of computer use over four years were associated with increased depression, but any further increase in use in that same year was not associated with increased severity of depression.

No significant associations were found between video gaming and depressive symptoms.

JUST WATCHED Study: Social media increases depression Replay More Videos ... MUST WATCH Study: Social media increases depression 06:31

The study had some limitations, including that only associations between screen time and depression were found. More research is needed to determine whether a causal relationship exists in order to answer the question: Could young people already experiencing symptoms engage in more screen time or could excessive screen time enhance symptoms?

Additionally, while the study distinguished between various types of screen time, more research is needed to distinguish between various platforms or genres within those types, such as Snapchat versus Instagram for social media, or sitcoms versus reality shows for television viewing.

"More research is needed to see whether there is a causal relationship between screen time and depression in young people. If there is, we need to know how this is happening and how to prevent depression in young people," said Dr. Michael Bloomfield, an excellence fellow and head of the Translational Psychiatry Research Group and consultant psychiatrist at University College London in the United Kingdom, who was not involved in the study.

"Young peoples' mental health is really important because adolescence is a time when our brains and our sense of self are developing. Therefore, having depression as a young person can have potentially serious implications for someone's psychological and academic development which can have knock-on effects for mental health into adulthood," Bloomfield said in a written statement distributed by the Science Media Centre in the UK.

Social media can be a helpful tool for preteens and teens to learn and connect with friends, but experts recommend it be used in moderation.

The American Academy of Pediatrics recommends that parents place consistent limits on how many hours per day their preteens or teens spend using screens.

Moreover, the academy recommends that screen time should not interfere with young people's daily exercise and sleep; it's recommended to avoid exposure to devices or screen for one hour before bedtime.

Dr. Gary Maslow, a child and adolescent psychiatrist at Duke Health and assistant professor of pediatrics at Duke University in Durham, North Carolina, said in January that he often points his patients' families to the American Academy of Pediatrics for tips on how to establish healthy social media habits at home.

Get CNN Health's weekly newsletter Sign up here to get The Results Are In with Dr. Sanjay Gupta every Tuesday from the CNN Health team.

One tip is to set up a charging station in the home, he said, so cell phones are not charged in the bedroom, which can lead to distractions and sleep interruptions.

"Get an alarm clock, so the kid doesn't use their phone as an alarm, and really limit that nighttime usage, because we know sleep affects mood and everything else," Maslow said.

"It's a balance, because there are benefits to engagement with media. There are so many ways in which social media is important and has positive features, but there's also ways in which social media can replace social support and connection from people you are living with in person," he said. "So it's finding that sweet spot."