A Statistical Risk Assessment Platform Powered by Pure Mathematical Modeling
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.
Academic burnout affects student mental health, performance, and well-being. Early detection enables timely intervention and support.
A statistical risk assessment platform that analyzes measurable lifestyle indicators:
🛏️ Sleep patterns
📚 Study load
📱 Screen time
😰 Stress levels
📊 Academic engagement
CSV Upload: Batch analysis for entire cohorts
Manual Entry: Individual student assessment with real-time validation
Sample Data: Pre-loaded demonstration dataset
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
Risk distribution bar charts
Time allocation visualizations
Factor contribution breakdowns
Correlation heatmaps
Distribution histograms
Color-coded risk indicators
Transparent calculations
Factor contribution analysis
Statistical justifications
Clear risk thresholds
No black-box models
Weighted Linear Regression:
Burnout Score = Σ (Weight_i × Normalized_Factor_i)
FactorWeightRationaleSleep Deficit30%Most critical for mental health and cognitive functionStress Level20%Direct indicator of psychological strainScreen Time20%Proxy for digital fatigue and time managementStudy Hours15%Excessive studying can lead to burnoutAttendance15%Low attendance indicates disengagement
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
🟢 Low Risk: Score < 0.30
🟡 Moderate Risk: 0.30 ≤ Score < 0.60
🔴 Elevated Risk: Score ≥ 0.60
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
Python 3.8+
pip package manager# Clone the repository
git clone <repository-url>
cd staywell
# Install dependencies
pip install -r requirements.txtstreamlit run app.pyAccess at: http://localhost:8501
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
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,82ColumnTypeRangeDescriptionnameString-Student identifier (optional)sleep_hoursFloat0-24Average daily sleep durationstudy_hoursFloat0-24Average daily study timescreen_timeFloat0-24Average daily recreational screen timestress_levelInteger1-5Self-reported stress (1=Low, 5=High)attendanceInteger0-100Class attendance percentage
24-Hour Rule: sleep_hours + study_hours + screen_time ≤ 24
Records violating this constraint are automatically filtered with notification.
Monitor cohort mental health trends
Identify at-risk students early
Plan targeted interventions
Track effectiveness of support programs
Prioritize student outreach
Understand risk factor patterns
Simulate intervention impacts
Support evidence-based counseling
Assess institutional wellness
Allocate support resources
Evaluate policy effectiveness
Generate statistical reports
Analyze burnout patterns
Study factor correlations
Test intervention strategies
Validate statistical models
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
✅ 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
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
}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"Edit ui/dashboard.py to modify charts, colors, and layouts.
✅ 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
# Upload data/test_invalid.csv to see validation in action
# Contains records that violate 24-hour constraintSelect "Manual Entry" mode
Adjust time values to exceed 24 hours
Observe real-time validation feedback
Correct values to see risk assessment
METHODOLOGY.md - Detailed statistical methodology
AI_USAGE_SUMMARY.md - AI assistance documentation
SIMPLE_UPDATE.md - Recent updates and changes
Inline Comments - Code-level documentation
This project is developed for educational purposes. Suggestions for improvements:
Additional risk factors
Enhanced visualizations
Export functionality
Multi-language support
Mobile responsiveness
Educational project developed for Domain 2: Data & Statistical Modelling.
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
For questions, issues, or suggestions:
Review inline code documentation
Check METHODOLOGY.md for detailed explanations
Examine sample data for format examples
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