Skip to content
Project: Analyzing the Mental Health of International Students
  • AI Chat
  • Code
  • Report
  • How Length of Stay Impacts the Mental Health of International Students

    Does going to university in a different country affect your mental health? A Japanese international university surveyed its students in 2018 and published a study the following year that was approved by several ethical and regulatory boards.

    The study found that international students have a higher risk of mental health difficulties than the general population, and that social connectedness (belonging to a social group) and acculturative stress (stress associated with joining a new culture) are predictive of depression.

    Explore the students data using PostgreSQL to find out if you would come to a similar conclusion for international students and see if the length of stay is a contributing factor.

    Here is a data description of the columns you may find helpful.

    Field NameDescription
    inter_domTypes of students (international or domestic)
    japanese_cateJapanese language proficiency
    english_cateEnglish language proficiency
    academicCurrent academic level (undergraduate or graduate)
    ageCurrent age of student
    stayCurrent length of stay in years
    todepTotal score of depression (PHQ-9 test)
    toscTotal score of social connectedness (SCS test)
    toasTotal score of acculturative stress (ASISS test)
    Unknown integration
    DataFrameavailable as
    -- Run this code to save the CSV file as students
    SELECT * 
    FROM 'students.csv';
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.

    Explore and analyze the students data to see how the length of stay (stay) impacts the average mental health diagnostic scores of the international students present in the study.

    • Return a table with nine rows and five columns.
    • The five columns should be aliased as: stay, count_int, average_phq, average_scs, and average_as, in that order.
    • The average columns should contain the average of the todep (PHQ-9 test), tosc (SCS test), and toas (ASISS test) columns for each length of stay, rounded to two decimal places.
    • The count_int column should be the number of international students for each length of stay.
    • Sort the results by the length of stay in descending order.
    • Note: Creating new cells in workspace will rename the DataFrame. Make sure that your final solution uses the name df.
    Unknown integration
    DataFrameavailable as
    -- Find the number of international students and their average scores by length of stay, in descending order of length of stay
    SELECT stay, 
           COUNT(*) AS count_int,
           ROUND(AVG(todep), 2) AS average_phq, 
           ROUND(AVG(tosc), 2) AS average_scs, 
           ROUND(AVG(toas), 2) AS average_as
    FROM students
    WHERE inter_dom = 'Inter'
    GROUP BY stay
    ORDER BY stay DESC
    LIMIT 9;
    This query is taking long to finish...Consider adding a LIMIT clause or switching to Query mode to preview the result.


    • stay Current length of stay in years
    • count_int Total international students grouped by years of stay
    • avg_phq Average total score of depression (PHQ-9 test)
    • avg_scs Average total score of social connectedness (SCS test)
    • avg_as Average total score of acculturative stress (ASISS test)


    1. There tends to be a POSITIVE correlation between length of stay and depression scores. As length of stay increases, depression scores increase.

    2. There tends to be a NEGATIVE correlation between length of stay and social connectedness. As length of stay increases, social connectedness decreases.

    3. There tends to be a NEGATIVE correlation between length of stay and acculturative stress. As length of stay increases, acculturative stress decreases.

    IMPORTANT NOTE: A larger data set of international students staying for 5-10 years is needed to confirm accuracy of correlations.

    Mental Health Scores Definitions (Chat GPT4)

    The tests are psychological and social assessment tools used to evaluate different aspects of individuals' mental health and social integration. Here’s a brief overview of each:

    1. Depression (PHQ-9 Test)

    • Name: Patient Health Questionnaire-9 (PHQ-9)
    • Purpose: A self-administered diagnostic tool for common mental disorders, specifically used to screen, diagnose, monitor, and measure the severity of depression.
    • Structure: Consists of 9 items, each relating to a symptom of depression. Respondents rate how often they have been bothered by each symptom over the past two weeks on a scale from 0 (not at all) to 3 (nearly every day).
    • Scoring: Scores range from 0 to 27, with higher scores indicating more severe depression. Cut-off points at 5, 10, 15, and 20 are used to classify depression as mild, moderate, moderately severe, and severe, respectively.

    2. Social Connectedness (SCS Test)

    • Name: Social Connectedness Scale (SCS)
    • Purpose: Measures the degree to which individuals feel connected to others. It is an indicator of how individuals perceive their social bonds and relationships.
    • Structure: Typically consists of items that respondents rate on a Likert scale, assessing feelings of belonging, relationship with others, and social integration.
    • Scoring: While specific scoring can vary based on the version of the scale and the research context, generally, higher scores indicate greater perceived social connectedness.

    3. Acculturative Stress (ASISS Test)

    • Name: Acculturative Stress Scale for International Students (ASSIS)
    • Purpose: Specifically designed to assess the acculturative stress experienced by international students adjusting to studying in a foreign country. It captures the challenges related to cultural adjustment, language barriers, educational and social stress, perceived discrimination, and homesickness.
    • Structure: Includes a series of statements about experiences commonly faced by international students, with respondents rating the frequency or intensity of these experiences.
    • Scoring: Similar to other scales, higher scores indicate greater levels of acculturative stress, with specific interpretations depending on the study's context and the population being assessed.

    These tests are widely used in psychological research and clinical settings to assess and understand various dimensions of mental health and social wellbeing. They serve as crucial tools for identifying individuals who may benefit from further psychological support or interventions aimed at improving their mental health and social connections.