Methodology: Probabilistic Modeling for Nigerian Health Dataset
Overview
This document details the probabilistic modeling methodology used to transform a generic smoking health dataset into a Nigerian-contextualized version with realistic epidemiological relationships.
Core Principles
1. Evidence-Based Probabilities
- All probability distributions derived from peer-reviewed research
- Multiple sources used to validate each parameter
- Preference for Nigerian-specific studies over global estimates
2. Conditional Relationships
- Health outcomes depend on multiple interacting factors
- Probabilistic cascades model real-world dependencies
- Avoid independence assumptions where evidence shows correlation
3. Population-Level Accuracy
- Individual records may vary
- Aggregate statistics match research targets
- Distributions reflect Nigerian demographic reality
Probabilistic Generation Pipeline
Stage 1: Demographics
Step 1.1: Assign Sex
ββ P(Male) = 0.504
ββ P(Female) = 0.496
Step 1.2: Assign Age
ββ Age distribution: Nigeria's young population structure
ββ P(18-25) = 0.25
ββ P(26-35) = 0.30 β Peak working age
ββ P(36-45) = 0.20
ββ P(46-55) = 0.15
ββ P(56-70) = 0.10
Step 1.3: Assign Region
ββ South-West: 25% (Lagos, Ibadan, etc.)
ββ North-West: 20% (Kano, Kaduna, etc.)
ββ South-South: 18% (Port Harcourt, etc.)
ββ South-East: 15% (Enugu, Onitsha, etc.)
ββ North-Central: 12% (Abuja, Jos, etc.)
ββ North-East: 10% (Maiduguri, etc.)
Step 1.4: Assign Location Type (Urban vs Rural)
ββ P(Urban | Region) = region-specific urbanization rate
ββ Example: P(Urban | South-West) = 0.60
Justification:
- Sex ratio from National Bureau of Statistics
- Age distribution reflects Nigeria's median age of 18.6 years
- Regional populations weighted by census data
- Urban/rural splits vary by region's development
Stage 2: Behavioral Risk Factors
Step 2.1: Determine Smoking Status
P(Smoker | Sex, Age, Region, Location) =
BaseRate(Sex, AgeGroup) Γ RegionalModifier(Region, Location)
Where:
BaseRate(Male, 18-34) = 0.06
BaseRate(Male, 35-54) = 0.11 β Peak prevalence
BaseRate(Male, 55+) = 0.08
BaseRate(Female, 18-34) = 0.008
BaseRate(Female, 35-54) = 0.015
BaseRate(Female, 55+) = 0.005
RegionalModifier accounts for:
- Urban vs rural differences
- Cultural factors (e.g., lower in Islamic North)
- Economic factors (affordability)
Step 2.2: Assign Cigarettes Per Day (if Smoker)
Distribution for smokers:
ββ Light (1-10 cigs): 65% β Economic constraints
ββ Moderate (11-20 cigs): 30%
ββ Heavy (21-40 cigs): 5%
Mean: ~11 cigarettes/day (vs 18.6 in Western datasets)
Justification:
- Multi-factor smoking probability reflects real-world complexity
- Gender disparity (9:1 male:female) matches cultural norms
- Lower consumption than Western countries (economic factors)
- Age peak at 35-54 years (stress, affordability)
Stage 3: Genetic Factors
Step 3.1: Assign Sickle Cell Genotype
P(AA) = 0.76 β Normal hemoglobin
P(AS) = 0.22 β Sickle cell trait (carrier)
P(SS) = 0.02 β Sickle cell disease
This is INDEPENDENT of other factors (genetic inheritance)
Justification:
- Hardy-Weinberg equilibrium
- Nigeria has world's largest SCD population
- 24% carrier rate (AS) is well-documented
- SS prevalence 2-3% from newborn screening data
Stage 4: Environmental Exposures
Step 4.1: Assign Malaria Exposure
P(Malaria | Region, Location) depends on:
- Regional endemicity
- Urban vs rural (urban has lower transmission)
- Season (not modeled, but implicit in "chronic")
Categories:
ββ Recent episode (<3 months)
ββ Chronic/repeated (multiple times per year)
ββ Rare/never
Example for South-South (very high endemicity):
P(Recent | South-South, Rural) = 0.30
P(Chronic | South-South, Rural) = 0.50
P(Rare | South-South, Rural) = 0.20
Justification:
- Nigeria Malaria Indicator Survey 2021 data
- Regional parasite prevalence: 10-70%
- Urban sanitation reduces transmission
- ~60 million clinical cases annually supports high prevalence
Stage 5: Health Outcomes (Conditional Probabilities)
This is where the model becomes sophisticated - health metrics depend on ALL previous factors.
5.1 Hemoglobin Level
Hemoglobin = BaselineHb(Sex)
Γ SickleCellEffect(Genotype)
- MalariaEffect(MalariaStatus)
- AgeEffect(Age)
+ RandomVariation
Where:
BaselineHb(Male) ~ Normal(14.5, 1.2) g/dL
BaselineHb(Female) ~ Normal(13.0, 1.0) g/dL
SickleCellEffect:
If SS: Γ0.55 (severe chronic anemia, 6-8 g/dL)
If AS: Γ0.95 (mild reduction)
If AA: Γ1.00 (normal)
MalariaEffect:
Recent: -1.5 to -3.0 g/dL (acute hemolysis)
Chronic: -0.5 to -1.5 g/dL (ongoing destruction)
Rare: 0 g/dL
AgeEffect:
Age >60: -0.3 to -0.8 g/dL (physiological decline)
Final range clamped: 6.0 - 18.0 g/dL (realistic bounds)
Clinical Justification:
- Sickle cell disease causes severe baseline anemia
- Malaria destroys red blood cells (hemolysis)
- Combined effects are MULTIPLICATIVE (SS + malaria = very low Hb)
- Age-related decline is well-documented
Example Cases:
Case 1: Young male, AA genotype, no malaria
Hb = 14.5 Γ 1.0 - 0 - 0 + Ξ΅ = ~14.5 g/dL β Normal
Case 2: Young male, SS genotype, no malaria
Hb = 14.5 Γ 0.55 - 0 - 0 + Ξ΅ = ~8.0 g/dL β SCD anemia
Case 3: Young female, AA genotype, recent malaria
Hb = 13.0 Γ 1.0 - 2.5 - 0 + Ξ΅ = ~10.5 g/dL β Acute anemia
Case 4: Young female, SS genotype, recent malaria
Hb = 13.0 Γ 0.55 - 2.5 - 0 + Ξ΅ = ~4.6 g/dL β 6.0 g/dL
(Clamped to minimum; would require hospitalization)
5.2 Heart Rate
HeartRate = BaselineHR
+ AnemiaCompensation(Hemoglobin)
+ SickleCell Effect(Genotype)
+ SmokingEffect(IsSmoker)
+ MalariaEffect(MalariaStatus)
+ RandomVariation
Where:
BaselineHR ~ Normal(72, 10) bpm
AnemiaCompensation:
If Hb < 10: +15 to +25 bpm β Severe compensation
If Hb 10-12: +5 to +15 bpm β Moderate compensation
If Hb > 12: 0 bpm β Normal
SickleCellEffect:
If SS: +10 to +20 bpm (chronic hypoxia)
SmokingEffect:
If Smoker: +5 to +15 bpm (stimulant effect)
MalariaEffect:
Recent: +10 to +20 bpm (acute illness, fever)
Final range clamped: 50 - 140 bpm
Physiological Justification:
- Low hemoglobin β less oxygen delivery β heart pumps faster
- Sickle cell disease β chronic tissue hypoxia β elevated HR
- Smoking β nicotine stimulation β increased HR
- Acute malaria β fever and illness β increased HR
Example Cases:
Case 1: Normal Hb (14 g/dL), no conditions
HR = 72 + 0 + 0 + 0 + 0 + Ξ΅ = ~72 bpm β Normal
Case 2: Low Hb (8 g/dL) from SCD, non-smoker
HR = 72 + 20 + 15 + 0 + 0 + Ξ΅ = ~107 bpm β Compensatory
Case 3: Normal Hb, smoker, recent malaria
HR = 72 + 0 + 0 + 10 + 15 + Ξ΅ = ~97 bpm β Elevated
Case 4: SCD + smoker + recent malaria (very sick)
HR = 72 + 20 + 15 + 10 + 15 + Ξ΅ = ~132 bpm β Tachycardia
5.3 Blood Pressure
BloodPressure = DetermineHypertension(Age, Location, Sex)
+ SmokingEffect(IsSmoker)
+ SickleCellVariability(Genotype)
Where:
P(Hypertension) = BaselinePrevalence(Location)
Γ AgeMultiplier(AgeGroup)
BaselinePrevalence:
Urban: 0.38
Rural: 0.28
AgeMultiplier:
18-34: Γ0.5 (16-19% prevalence)
35-54: Γ1.0 (28-38% prevalence)
55+: Γ1.8 (50-68% prevalence)
If Hypertensive:
70% β Stage 1: Systolic 130-145, Diastolic 80-95
30% β Stage 2: Systolic 145-180, Diastolic 95-115
If Normotensive:
Systolic: 100-128 mmHg
Diastolic: 60-82 mmHg
SmokingEffect:
+5 to +15 systolic
+3 to +8 diastolic
SickleCellEffect (SS):
Β±10 to Β±20 systolic (vascular damage, variable)
Clinical Justification:
- Nigeria has high HTN prevalence (32% overall)
- Urban > rural (diet, stress, sedentary lifestyle)
- Strong age gradient (vessels stiffen with age)
- Smoking raises BP (vasoconstriction)
- Sickle cell causes vascular damage (unpredictable BP)
5.4 Cholesterol
Cholesterol = BaselineChol(Location)
+ AgeEffect(Age)
+ SexEffect(Sex)
+ RandomVariation
Where:
BaselineChol:
Urban ~ Normal(230, 35) mg/dL β Western diet
Rural ~ Normal(200, 30) mg/dL β Traditional diet
AgeEffect: +(Age - 30) Γ 0.5 mg/dL
SexEffect:
Male: +0 to +10 mg/dL
Female: +0 mg/dL
Final range: 120 - 400 mg/dL
Justification:
- Nutrition transition in urban Nigeria (more processed food)
- Traditional rural diets β lower cholesterol
- Age-related increase is universal
- Males slightly higher (hormonal differences)
Special Interactions Modeled
1. Smoking Γ Sickle Cell Disease
if Genotype == 'SS':
P(Smoker) = 0.01 # Extremely rare (<1%)
Justification:
- Smoking triggers vaso-occlusive crises
- Reduced oxygen β sickling β pain crisis
- Most SCD patients educated to avoid smoking
2. Sickle Cell Trait Γ Malaria (Protective Effect)
if Genotype == 'AS' and MalariaExposure == 'high':
Severity = 'mild' # Trait provides protection
Justification:
- Evolutionary advantage in malaria-endemic areas
- AS genotype reduces parasite multiplication
- 50-90% protection against severe/cerebral malaria
- This is WHY sickle cell trait persists at 24%
3. Multiple Comorbidities (Multiplicative Risk)
if Smoker and Genotype == 'SS':
StrokeRisk = BaselineRisk Γ 15 # Catastrophic
if Smoker and Hypertensive and Age > 55:
CVDRisk = BaselineRisk Γ 8 # Very high
if Genotype == 'SS' and MalariaRecent:
CrisisRisk = BaselineRisk Γ 5 # Triggers crisis
HospitalizationNeeded = True
Validation Strategy
1. Population-Level Validation
After generation, verify aggregate statistics match targets:
Target vs Achieved:
Smoking prevalence: 5.0% Β± 0.3% β
Male smoking: 9.0% Β± 0.5% β
Female smoking: 1.0% Β± 0.2% β
AS genotype: 22% Β± 1% β
SS genotype: 2% Β± 0.3% β
Hypertension: 32% Β± 2% β
Mean age: 38-40 years β
2. Conditional Relationship Validation
Verify expected correlations exist:
Correlation tests:
Hemoglobin vs Heart Rate: Negative β (lower Hb β higher HR)
Age vs Blood Pressure: Positive β (older β higher BP)
Smoking vs Heart Rate: Positive β (smokers β higher HR)
SCD vs Hemoglobin: Negative β (SS β much lower Hb)
3. Clinical Plausibility Checks
Flag impossible combinations:
- Hb > 18 g/dL β Polycythemia (rare, check)
- Hb < 6 g/dL β Life-threatening (should be hospitalized)
- BP > 200/120 β Hypertensive emergency
- SS genotype + Hb > 12 β Implausible (investigate)
Advantages of This Methodology
1. Realistic Feature Interactions
- Traditional synthetic data: Features generated independently
- This approach: Conditional probabilities model real biology
- ML models: Will learn actual disease relationships
2. Population Heterogeneity
- Not all smokers are unhealthy
- Not all non-smokers are healthy
- Sickle cell, malaria, hypertension create varied profiles
- Reflects real-world medical complexity
3. Regional Variations
- Urban Lagos β Rural Sokoto
- Dataset captures geographic health disparities
- Useful for policy targeting and resource allocation
4. Research Validity
- Every parameter traceable to published research
- Transparent methodology enables critique and improvement
- Suitable for academic publication and peer review
5. Educational Value
- Teaches epidemiological thinking
- Shows how risk factors interact
- Demonstrates population vs individual risk
Limitations & Assumptions
1. Simplified Disease Models
- Real biology is more complex
- We model major effects, not every pathway
- Chronic diseases (diabetes, TB, HIV) not yet included
2. Static Snapshot
- Dataset represents one point in time
- Doesn't model disease progression or aging
- No longitudinal follow-up
3. Independence Assumptions
- Some factors assumed independent when data unavailable
- Example: Cholesterol independent of sickle cell status (Real relationship unclear from literature)
4. Regional Aggregation
- Geopolitical zones aggregate many states
- Within-region variation exists but not modeled
- Assumes homogeneity within urban/rural categories
5. Missing Confounders
- Socioeconomic status (SES) affects health
- Education level correlates with smoking
- Occupation affects exposure risks
- These are not included (yet)
Future Enhancements
Potential Additions:
Additional Comorbidities
- Diabetes prevalence (urban: 5-8%)
- HIV/AIDS (1.3% overall, regional variation)
- Tuberculosis co-infection with HIV
- Chronic kidney disease
Socioeconomic Factors
- Education level (affects health literacy)
- Income quintile (affects healthcare access)
- Occupation (exposure risks)
Healthcare Access
- Distance to nearest hospital
- Health insurance status (NHIS coverage: ~5%)
- Traditional vs modern medicine use
Temporal Dynamics
- Season (malaria seasonality)
- Time since last medical visit
- Disease progression trajectories
Medication Effects
- Antihypertensive use (but adherence is low)
- Antimalarial prophylaxis
- Hydroxyurea for SCD (improves Hb)
Technical Implementation Notes
Random Seed
- Set to 42 for reproducibility
- All probabilistic steps use numpy.random with fixed seed
- Regenerating with same seed β identical dataset
Performance
- Generates 3,900 records in ~5-10 seconds
- Scalable to millions of records
- Vectorization possible but not implemented (prioritized readability)
Code Structure
nigerianize_smoking_health_dataset.py
ββ Constants (prevalence rates, names)
ββ Helper functions (one per factor)
ββ Main transformation function (orchestrates)
ββ Validation & summary statistics
Output Formats
- CSV: Human-readable, universal compatibility
- Parquet: Compressed, efficient for analytics
- Both contain identical data
Conclusion
This methodology demonstrates how to create scientifically valid synthetic health data using:
- β Evidence-based probability distributions
- β Conditional relationships from clinical research
- β Multi-factor disease modeling
- β Population-level validation
- β Transparent, reproducible process
The result is a dataset that:
- Reflects Nigerian epidemiological reality
- Contains realistic feature interactions
- Supports both research and education
- Can be extended with additional factors
- Is fully documented and reproducible
Document Version: 1.0
Last Updated: October 2025
Authors: electricsheepafrica
License: CC-BY-4.0 (documentation), MIT (dataset)