Data Science Research on Social Anxiety

Posted on Apr 21, 2022


Social media has become so embedded in our lives that people are on Twitter, Instagram, Facebook, or Tik Tok everywhere they go. Data has shown that teens spend more than 5 hours a day on social media. This poses the question of is this affecting society? If so, how is it affecting society?

It is said that frequent use of social media is linked to increased amounts of anxiety. One hypothesis is that this is the result of social media breeding comparisons of lifestyles, and it is commonly said that comparison is the thief of joy.

This is an important problem most people face every day, so I decided to dig a little deeper into the following topics:

  • How much time are people spending online?
  • Who is spending the most time online?
  • What is the range of anxiety levels across online users?


Data Overview

The data collector placed QR codes to a google form survey at a bus stop within blocks of several college campuses in Malaysia. He collected 93 responses in one month. Participants were asked the following questions: 

  1. How many hours per day do you spend on social media?
  2. How do you feel about being the center of attention?
  3. Working while being observed?
  4. Talking face to face with someone you don't know very well?
  5. Expressing disagreement or disapproval to someone you don't know very well?
  6. Are you extremely conscious of your actions when in social settings because you fear they might offend someone, or you could be rejected?
  7. Do you feel anxious or panicky before social situations?

Participants rated their anxiety levels from 1 (very comfortable) to 5 (very uncomfortable). 


Data Analysis

1. Anxiety Levels

Before looking into more specifics of this data, I wanted to look at the anxiety levels of the entire population of this data. Because the x-axis does not begin at zero, it is clear that at some level everyone is experiencing anxiety. 

On average most people are feeling level 3 to 5 levels of anxiety, which are on the higher end of the scale. 

2. Social Media Use

What pops out immediately is that the largest group of individuals of both genders use social media for more than 5 hours per day!

Even more alarming, is the jump between all the female groups to females who spend more than 5 hours a day on social media. The number of females who are online more than 5 hours a day is more than double of all other categories. 

This is alarming because a significant portion of their day is spent online. 

3. Making connections

 When combining the information from the two graphs above, we can see that both males and females have a positive correlation between their anxiety levels and time spent on social media. However, for females, the correlation is stronger, which connects to the graphs above that show they are spending more time online.



4. Focusing on Females

To pinpoint individuals who are most affected by social media use, let's look closer at the females and how their experiences. 

Age Group


Immediately, we see some good news that anxiety levels are decreasing with age. This can be due to many factors, but when compared to social media use, their usage decreases from ages 21 - 40. 

However, the time the 21- to 30-year-old age group is on social media at an extremely high frequency which connects to their age group experiencing higher anxiety levels. 


Social Events

The trend of the middle age group being on the higher end of the anxiety scale continues when looking at anxiety levels before and during social events.

We also see here that in all of the groups, anxiety levels increase during social events. 





The power of analyzing data comes in demonstrating its importance to others. 

Because this data was taken in a college town, one possible stakeholder interested in this data are the college and university administrators. Universities can benefit both socially and financially. 

Socially, it would improve the reputation of the school if students were less anxious and enjoying their time there. This has the ripple effect of possibly improving test scores because less general anxiety would help with test-taking. 

Financially, if students are happy at the establishment, they are more likely to stay which will improve retention year over year. The more students that stay will also improve the reputation of the school potentially leading to a growth in student enrollment. 


Takeaways and Application


  1. Social anxiety has a positive correlation with the amount of time spent on social media
  2. Social anxiety decreases with age 
  3. Actual anxiety endured during social events is more than the anxiety anticipating the event 
  4. Female social media users between the ages of 21-30 are at the highest risk of social anxiety


As an administrator, if they can reach the people who are the most anxiety-prone, those who have less anxiety can still benefit from those techniques.  Administrators can: 

  • Offer more social events for lower classmen, since it is shown younger participants experience more anxiety 
  • During social events, create an environment with specific elements that decrease anxiety
  • Organize regular social events to offer alternative socializing options
  • Create campaigns to promote fewer social media use


Further Research

This research is a great start, but can be improved by some of the following projects:

  1. Use the same questions on a different sample to compare results 
     -  Test if the results are consistent with this group
     -  Have a larger sample size to make the research more statistically sound

  2. Deeper analysis of male social anxiety
     - How closely does to follow the same trend as females

  3. Research on female interaction patterns
     - Could aid in tailoring social events to decrease anxiety


Thank you

Thank you for taking the time to read about my project! Please leave a comment or question below with your thoughts and ideas. 

For more, feel welcome to connect with me on LinkedIn!

The skills I demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.



Featured Image:

Data Set:

Social Anxiety Information:

Higuera, Valencia. “Social Anxiety Disorder: Causes, Symptoms & Diagnosis.” Healthline, Healthline Media, 3 Sept. 2018,,judged%20or%20scrutinized%20by%20others.

Testing Anxiety Information:

“Test Anxiety.” Learning Center, 30 Sept. 2021,,a%20number%20of%20difference%20reasons.


About Author

Jessica Rodriguez

Hello! I am Jessica Rodriguez. I was a math educator for two years before becoming an equity research assistant. Now I am looking to begin my career as a data scientist.
View all posts by Jessica Rodriguez >

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI