🌱 STAYWELL
Early Detection of Academic Burnout Through Statistical Analysis
A Statistical Risk Assessment Platform Powered by Pure Mathematical Modeling
📊 STATUS & FOCUS


🎯 Overview
STAYWELL is an evidence-based early warning system designed to identify academic burnout risk among students using transparent statistical analysis. Unlike black-box machine learning approaches, our system employs pure mathematical modeling with full explainability and ethical compliance.
The Problem
Academic burnout affects student mental health, performance, and well-being. Early detection enables timely intervention and support.
Our Solution
A statistical risk assessment platform that analyzes measurable lifestyle indicators:
- 🛏️ Sleep patterns
- 📚 Study load
- 📱 Screen time
- 😰 Stress levels
- 📊 Academic engagement
✨ Key Features
- CSV Upload: Batch analysis for entire cohorts
- Manual Entry: Individual student assessment with real-time validation
- Sample Data: Pre-loaded demonstration dataset
📊 Comprehensive Analytics
- Risk Overview: Distribution analysis and summary statistics
- Statistical Analysis: Correlations, distributions, descriptive statistics
- Individual Assessment: Per-student risk breakdown with factor contributions
- Scenario Simulation: What-if analysis for intervention planning
- Full Transparency: Complete methodology documentation
🎨 Visual Intelligence
- Risk distribution bar charts
- Time allocation visualizations
- Factor contribution breakdowns
- Correlation heatmaps
- Distribution histograms
- Color-coded risk indicators
🔍 Explainability First
- Transparent calculations
- Factor contribution analysis
- Statistical justifications
- Clear risk thresholds
- No black-box models
🔬 Statistical Methodology
Burnout Score Model
Weighted Linear Regression:
Burnout Score = Σ (Weight_i × Normalized_Factor_i)
Risk Factors & Weights
| Factor |
Weight |
Rationale |
| Sleep Deficit |
30% |
Most critical for mental health and cognitive function |
| Stress Level |
20% |
Direct indicator of psychological strain |
| Screen Time |
20% |
Proxy for digital fatigue and time management |
| Study Hours |
15% |
Excessive studying can lead to burnout |
| Attendance |
15% |
Low attendance indicates disengagement |
Normalization Techniques
- Sleep Deficit:
max(0, (7 - sleep_hours) / 7)
- Stress Level:
stress_level / 5
- Screen Time:
screen_time / 10
- Study Hours:
study_hours / 10
- Attendance:
(100 - attendance) / 100
Risk Classification
- 🟢 Low Risk: Score < 0.30
- 🟡 Moderate Risk: 0.30 ≤ Score < 0.60
- 🔴 Elevated Risk: Score ≥ 0.60
Statistical Techniques
- Descriptive Statistics: Mean, median, standard deviation, variance
- Correlation Analysis: Pearson correlation coefficients
- Percentile Analysis: Peer comparison using empirical distribution
- Sensitivity Analysis: What-if scenario testing
- Factor Decomposition: Proportional risk contribution
🚀 Quick Start
Prerequisites
Python 3.8+
pip package manager
Installation
# Clone the repository
git clone <repository-url>
cd staywell
# Install dependencies
pip install -r requirements.txt
Run Application
streamlit run app.py
Access at: http://localhost:8501
📁 Project Architecture
staywell/
│
├── app.py # Main Streamlit application
├── config.py # Model configuration & weights
├── requirements.txt # Python dependencies
│
├── core/ # Statistical Engine
│ ├── validation.py # Input validation & constraints
│ ├── scoring_engine.py # Burnout score calculation
│ ├── peer_engine.py # Peer comparison statistics
│ └── statistical_analysis.py # Statistical analysis functions
│
├── explainability/ # Explainability Modules
│ ├── contribution.py # Factor contribution analysis
│ └── what_if.py # Scenario simulation engine
│
├── ui/ # User Interface
│ ├── dashboard.py # Visualization components
│ └── theme.py # UI theme configuration
│
└── data/ # Data Files
├── sample_students.csv # Sample dataset
└── test_invalid.csv # Validation test data
CSV Structure
name,sleep_hours,study_hours,screen_time,stress_level,attendance
Alice Johnson,7.0,6.0,4.0,3,90
Bob Smith,8.0,5.0,3.0,2,95
Charlie Brown,6.0,7.0,5.0,4,82
Column Specifications
| Column |
Type |
Range |
Description |
name |
String |
- |
Student identifier (optional) |
sleep_hours |
Float |
0-24 |
Average daily sleep duration |
study_hours |
Float |
0-24 |
Average daily study time |
screen_time |
Float |
0-24 |
Average daily recreational screen time |
stress_level |
Integer |
1-5 |
Self-reported stress (1=Low, 5=High) |
attendance |
Integer |
0-100 |
Class attendance percentage |
⚠️ Important Constraint
24-Hour Rule: sleep_hours + study_hours + screen_time ≤ 24
Records violating this constraint are automatically filtered with notification.
🎯 Use Cases
For Educators
- Monitor cohort mental health trends
- Identify at-risk students early
- Plan targeted interventions
- Track effectiveness of support programs
For Counselors
- Prioritize student outreach
- Understand risk factor patterns
- Simulate intervention impacts
- Support evidence-based counseling
For Administrators
- Assess institutional wellness
- Allocate support resources
- Evaluate policy effectiveness
- Generate statistical reports
For Researchers
- Analyze burnout patterns
- Study factor correlations
- Test intervention strategies
- Validate statistical models
🔒 Ethical Framework
Core Principles
- Transparency: All calculations are fully explainable
- Privacy: Confidential data handling required
- Support-Focused: Results guide help, not punishment
- Human Oversight: Professional judgment essential
- Not Diagnostic: Early warning only, not clinical diagnosis
Responsible Use
- ✅ Use for early identification and support
- ✅ Combine with professional counseling
- ✅ Maintain student privacy
- ✅ Focus on intervention, not labeling
- ❌ Do not use as sole diagnostic tool
- ❌ Do not stigmatize high-risk students
- ❌ Do not share results without consent
🛠️ Customization
Adjust Risk Weights
Edit config.py:
WEIGHTS = {
"sleep": 0.30, # Sleep deficit weight
"stress": 0.20, # Stress level weight
"screen": 0.20, # Screen time weight
"study": 0.15, # Study hours weight
"attendance": 0.15 # Attendance weight
}
Modify Risk Thresholds
Edit core/scoring_engine.py:
def risk_label(score):
if score < 0.3: # Low risk threshold
return "🟢 Low Risk"
elif score < 0.6: # Moderate risk threshold
return "🟡 Moderate Risk"
return "🔴 Elevated Risk"
Customize Visualizations
Edit ui/dashboard.py to modify charts, colors, and layouts.
📈 Domain-2 Compliance
✅ Pure Statistical Modeling - No machine learning black boxes
✅ Descriptive Analysis - Comprehensive statistical summaries
✅ Correlation Analysis - Factor relationship identification
✅ Regression-Based Scoring - Weighted linear model
✅ Clear Risk Thresholds - Statistically justified classifications
✅ Full Documentation - Complete methodology report
✅ Explainable Results - Transparent calculations
✅ Source Code Provided - Open and auditable
🧪 Testing
Test with Invalid Data
# Upload data/test_invalid.csv to see validation in action
# Contains records that violate 24-hour constraint
Manual Entry Testing
- Select “Manual Entry” mode
- Adjust time values to exceed 24 hours
- Observe real-time validation feedback
- Correct values to see risk assessment
📚 Documentation
- METHODOLOGY.md - Detailed statistical methodology
- AI_USAGE_SUMMARY.md - AI assistance documentation
- SIMPLE_UPDATE.md - Recent updates and changes
- Inline Comments - Code-level documentation
🤝 Contributing
This project is developed for educational purposes. Suggestions for improvements:
- Additional risk factors
- Enhanced visualizations
- Export functionality
- Multi-language support
- Mobile responsiveness
📄 License
Educational project developed for Domain 2: Data & Statistical Modelling.
🙏 Acknowledgments
- Statistical methods based on psychological research
- Risk factors from academic burnout literature
- Ethical guidelines from mental health best practices
- UI/UX inspired by modern data platforms
📞 Support
For questions, issues, or suggestions:
- Review inline code documentation
- Check METHODOLOGY.md for detailed explanations
- Examine sample data for format examples
⚠️ Disclaimer
STAYWELL is an early warning system, not a diagnostic tool.
Always involve qualified mental health professionals for student support. This system provides statistical guidance to complement, not replace, professional judgment.
Built with ❤️ for Student Wellness
Empowering Early Intervention Through Statistical Intelligence
评论