Skip to content

nishulucyna/happiness_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

World Happiness Report 2024: Statistical Analysis

This project applies fundamental hypothesis testing techniques—including T-test, Z-test, ANOVA, and Chi-Square—to analyze the World Happiness Report (2005-2023 data). The analysis is implemented in Python using Pandas, SciPy, and Statsmodels within Jupyter Notebooks.

This project utilizes uv for high-speed environment and package management.

Technologies Used

  • Language: Python 3.12+
  • Libraries: Pandas, SciPy, Statsmodels, Matplotlib/Seaborn
  • Environment Manager: uv

Data Access

To comply with data redistribution policies and repository best practices, the dataset is not included in this repository.

  1. Download: Obtain the World-happiness-report-updated_2024.csv file from Kaggle:
  2. Setup: Create a directory named data/raw in the project root and place the CSV file inside it.

Installation and Usage

This project uses uv for dependency management.

  1. Clone the repository:

    git clone [https://github.com/yourusername/your-repo-name.git](https://github.com/yourusername/your-repo-name.git)
    cd your-repo-name
  2. Sync the environment:

    uv sync
  3. Run the notebooks:

    uv run jupyter lab

Project Structure

  • notebooks/: Contains Jupyter Notebooks used for data cleaning and statistical analysis.
  • data/raw/: Target directory for the raw CSV dataset (git-ignored).
  • pyproject.toml / uv.lock: Dependency management files.
  • LICENSE: MIT License.

Statistical Findings

The following results are based on the analysis of the 2023 data subset.

1. Independent Samples T-Test

  • Objective: Compare happiness scores between selected G7 nations and major Asian powers.
  • Result: Null hypothesis rejected ($p < 0.05$).
  • Conclusion: There is a statistically significant difference in happiness scores between the two groups.

2. One-Sample Z-Test

  • Objective: Determine if the global average happiness score in 2023 differs from a hypothesized mean of 6.0.
  • Result: Null hypothesis rejected ($p < 0.05$).
  • Conclusion: The global average happiness score is significantly different from 6.0.

3. Analysis of Variance (ANOVA)

  • Objective: Compare mean happiness scores across three constructed regions: Europe, North America, and Asia.
  • Result: Null hypothesis rejected ($p < 0.05$).
  • Conclusion: There is a statistically significant difference in mean happiness scores between at least two of the regions analyzed.

4. Chi-Square Test of Independence

  • Objective: Assess the relationship between a country's economic status (categorized as Rich/Poor) and its happiness level (categorized as Happy/Unhappy).
  • Result: Null hypothesis rejected ($p < 0.05$).
  • Conclusion: There is a significant association between economic status and happiness classification.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published