Summary
This experiment investigates meditation routine effectiveness. Box-Behnken design to maximize stress reduction and focus improvement by tuning session duration, time of day, and technique.
The design varies 3 factors: duration min (min), ranging from 5 to 30, time of day (hour), ranging from 6 to 22, and guided pct (%), ranging from 0 to 100. The goal is to optimize 2 responses: stress reduction (pts) (maximize) and focus score (pts) (maximize). Fixed conditions held constant across all runs include frequency = daily, environment = quiet_room.
A Box-Behnken design was chosen because it efficiently fits quadratic models with 3 continuous factors while avoiding extreme corner combinations — requiring only 15 runs instead of the 8 needed for a full factorial at two levels.
Quadratic response surface models were fitted to capture potential curvature and factor interactions. The RSM contour plots below visualize how pairs of factors jointly affect each response.
Key Findings
For stress reduction, the most influential factors were time of day (38.3%), guided pct (35.8%), duration min (25.9%). The best observed value was 6.8 (at duration min = 17.5, time of day = 14, guided pct = 50).
For focus score, the most influential factors were time of day (39.8%), guided pct (37.2%), duration min (23.0%). The best observed value was 6.3 (at duration min = 17.5, time of day = 14, guided pct = 50).
Recommended Next Steps
- Run confirmation experiments at the predicted optimal settings to validate the model.
- Consider whether any fixed factors should be varied in a future study.
Experimental Setup
Factors
| Factor | Low | High | Unit |
duration_min | 5 | 30 | min |
time_of_day | 6 | 22 | hour |
guided_pct | 0 | 100 | % |
Fixed: frequency = daily, environment = quiet_room
Responses
| Response | Direction | Unit |
stress_reduction | ↑ maximize | pts |
focus_score | ↑ maximize | pts |
Configuration
{
"metadata": {
"name": "Meditation Routine Effectiveness",
"description": "Box-Behnken design to maximize stress reduction and focus improvement by tuning session duration, time of day, and technique"
},
"factors": [
{
"name": "duration_min",
"levels": [
"5",
"30"
],
"type": "continuous",
"unit": "min"
},
{
"name": "time_of_day",
"levels": [
"6",
"22"
],
"type": "continuous",
"unit": "hour"
},
{
"name": "guided_pct",
"levels": [
"0",
"100"
],
"type": "continuous",
"unit": "%"
}
],
"fixed_factors": {
"frequency": "daily",
"environment": "quiet_room"
},
"responses": [
{
"name": "stress_reduction",
"optimize": "maximize",
"unit": "pts"
},
{
"name": "focus_score",
"optimize": "maximize",
"unit": "pts"
}
],
"settings": {
"operation": "box_behnken",
"test_script": "use_cases/110_meditation_routine/sim.sh"
}
}
Experimental Matrix
The Box-Behnken Design produces 15 runs. Each row is one experiment with specific factor settings.
| Run | duration_min | time_of_day | guided_pct |
| 1 | 17.5 | 6 | 0 |
| 2 | 17.5 | 14 | 50 |
| 3 | 30 | 14 | 100 |
| 4 | 30 | 14 | 0 |
| 5 | 17.5 | 14 | 50 |
| 6 | 17.5 | 14 | 50 |
| 7 | 5 | 14 | 100 |
| 8 | 30 | 6 | 50 |
| 9 | 17.5 | 6 | 100 |
| 10 | 30 | 22 | 50 |
| 11 | 5 | 14 | 0 |
| 12 | 17.5 | 22 | 100 |
| 13 | 5 | 6 | 50 |
| 14 | 5 | 22 | 50 |
| 15 | 17.5 | 22 | 0 |
Step-by-Step Workflow
1
Preview the design
$ doe info --config use_cases/110_meditation_routine/config.json
2
Generate the runner script
$ doe generate --config use_cases/110_meditation_routine/config.json \
--output use_cases/110_meditation_routine/results/run.sh --seed 42
3
Execute the experiments
$ bash use_cases/110_meditation_routine/results/run.sh
4
Analyze results
$ doe analyze --config use_cases/110_meditation_routine/config.json
5
Get optimization recommendations
$ doe optimize --config use_cases/110_meditation_routine/config.json
6
Multi-objective optimization
With 2 competing responses, use --multi to find the best compromise via Derringer–Suich desirability.
$ doe optimize --config use_cases/110_meditation_routine/config.json --multi
7
Generate the HTML report
$ doe report --config use_cases/110_meditation_routine/config.json \
--output use_cases/110_meditation_routine/results/report.html
Features Exercised
| Feature | Value |
| Design type | box_behnken |
| Factor types | continuous (all 3) |
| Arg style | double-dash |
| Responses | 2 (stress_reduction ↑, focus_score ↑) |
| Total runs | 15 |
Analysis Results
Generated from actual experiment runs using the DOE Helper Tool.
Response: stress_reduction
Top factors: time_of_day (38.3%), guided_pct (35.8%), duration_min (25.9%).
ANOVA
| Source | DF | SS | MS | F | p-value |
| Source | DF | SS | MS | F | p-value |
| duration_min | 2 | 2.5608 | 1.2804 | 9.849 | 0.0070 |
| time_of_day | 2 | 5.4075 | 2.7038 | 20.798 | 0.0007 |
| guided_pct | 2 | 5.2833 | 2.6416 | 20.320 | 0.0007 |
| Lack | of | Fit | 6 | 8.7178 | 1.4530 |
| Pure | Error | 2 | 0.2600 | | |
| Error | 8 | 8.9778 | 0.1300 | | |
| Total | 14 | 22.2293 | 1.5878 | | |
Pareto Chart
Main Effects Plot
Normal Probability Plot of Effects
Half-Normal Plot of Effects
Model Diagnostics
Response: focus_score
Top factors: time_of_day (39.8%), guided_pct (37.2%), duration_min (23.0%).
ANOVA
| Source | DF | SS | MS | F | p-value |
| Source | DF | SS | MS | F | p-value |
| duration_min | 2 | 1.2879 | 0.6440 | 0.986 | 0.4143 |
| time_of_day | 2 | 4.0022 | 2.0011 | 3.063 | 0.1029 |
| guided_pct | 2 | 3.6697 | 1.8349 | 2.808 | 0.1191 |
| Lack | of | Fit | 6 | 7.3775 | 1.2296 |
| Pure | Error | 2 | 1.3067 | | |
| Error | 8 | 8.6841 | 0.6533 | | |
| Total | 14 | 17.6440 | 1.2603 | | |
Pareto Chart
Main Effects Plot
Normal Probability Plot of Effects
Half-Normal Plot of Effects
Model Diagnostics
Response Surface Plots
3D surfaces fitted with quadratic RSM. Red dots are observed data points.
focus score duration min vs guided pct
focus score duration min vs time of day
focus score time of day vs guided pct
stress reduction duration min vs guided pct
stress reduction duration min vs time of day
stress reduction time of day vs guided pct
Multi-Objective Optimization
When responses compete, Derringer–Suich desirability finds the best compromise.
Each response is scaled to a 0–1 desirability, then combined via a weighted geometric mean.
Overall Desirability
D = 0.9545
Per-Response Desirability
| Response | Weight | Desirability | Predicted | Dir |
stress_reduction |
1.5 |
|
6.80 0.9545 6.80 pts |
↑ |
focus_score |
1.5 |
|
6.30 0.9545 6.30 pts |
↑ |
Recommended Settings
| Factor | Value |
duration_min | 17.5 min |
time_of_day | 6 hour |
guided_pct | 100 % |
Source: from observed run #8
Trade-off Summary
Sacrifice = how much worse than single-objective best.
| Response | Predicted | Best Observed | Sacrifice |
focus_score | 6.30 | 6.30 | +0.00 |
Top 3 Runs by Desirability
| Run | D | Factor Settings |
| #10 | 0.8681 | duration_min=17.5, time_of_day=22, guided_pct=100 |
| #3 | 0.8621 | duration_min=5, time_of_day=14, guided_pct=100 |
Model Quality
| Response | R² | Type |
focus_score | 0.3396 | linear |
Full Multi-Objective Output
============================================================
MULTI-OBJECTIVE OPTIMIZATION
Method: Derringer-Suich Desirability Function
============================================================
Overall desirability: D = 0.9545
Response Weight Desirability Predicted Direction
---------------------------------------------------------------------
stress_reduction 1.5 0.9545 6.80 pts ↑
focus_score 1.5 0.9545 6.30 pts ↑
Recommended settings:
duration_min = 17.5 min
time_of_day = 6 hour
guided_pct = 100 %
(from observed run #8)
Trade-off summary:
stress_reduction: 6.80 (best observed: 6.80, sacrifice: +0.00)
focus_score: 6.30 (best observed: 6.30, sacrifice: +0.00)
Model quality:
stress_reduction: R² = 0.6846 (quadratic)
focus_score: R² = 0.3396 (linear)
Top 3 observed runs by overall desirability:
1. Run #8 (D=0.9545): duration_min=17.5, time_of_day=6, guided_pct=100
2. Run #10 (D=0.8681): duration_min=17.5, time_of_day=22, guided_pct=100
3. Run #3 (D=0.8621): duration_min=5, time_of_day=14, guided_pct=100
Full Analysis Output
=== Main Effects: stress_reduction ===
Factor Effect Std Error % Contribution
--------------------------------------------------------------
time_of_day 1.4536 0.3254 38.3%
guided_pct 1.3607 0.3254 35.8%
duration_min 0.9857 0.3254 25.9%
=== ANOVA Table: stress_reduction ===
Source DF SS MS F p-value
-----------------------------------------------------------------------------
duration_min 2 2.5608 1.2804 9.849 0.0070
time_of_day 2 5.4075 2.7038 20.798 0.0007
guided_pct 2 5.2833 2.6416 20.320 0.0007
Lack of Fit 6 8.7178 1.4530 11.177 0.0844
Pure Error 2 0.2600 0.1300
Error 8 8.9778 0.1300
Total 14 22.2293 1.5878
=== Summary Statistics: stress_reduction ===
duration_min:
Level N Mean Std Min Max
------------------------------------------------------------
17.5 7 4.8143 1.4276 3.0000 6.7000
30 4 5.8000 0.3916 5.4000 6.3000
5 4 5.0000 1.5253 3.1000 6.8000
time_of_day:
Level N Mean Std Min Max
------------------------------------------------------------
14 7 4.5714 1.1996 3.0000 6.3000
22 4 6.0250 0.6652 5.2000 6.8000
6 4 5.2000 1.5122 3.1000 6.7000
guided_pct:
Level N Mean Std Min Max
------------------------------------------------------------
0 4 5.8750 0.7411 5.2000 6.7000
100 4 5.4500 0.5745 4.8000 6.2000
50 7 4.5143 1.5443 3.0000 6.8000
=== Main Effects: focus_score ===
Factor Effect Std Error % Contribution
--------------------------------------------------------------
time_of_day 1.2536 0.2899 39.8%
guided_pct 1.1714 0.2899 37.2%
duration_min 0.7250 0.2899 23.0%
=== ANOVA Table: focus_score ===
Source DF SS MS F p-value
-----------------------------------------------------------------------------
duration_min 2 1.2879 0.6440 0.986 0.4143
time_of_day 2 4.0022 2.0011 3.063 0.1029
guided_pct 2 3.6697 1.8349 2.808 0.1191
Lack of Fit 6 7.3775 1.2296 1.882 0.3869
Pure Error 2 1.3067 0.6533
Error 8 8.6841 0.6533
Total 14 17.6440 1.2603
=== Summary Statistics: focus_score ===
duration_min:
Level N Mean Std Min Max
------------------------------------------------------------
17.5 7 4.7857 1.2020 2.8000 6.3000
30 4 5.4000 0.7024 4.7000 6.1000
5 4 4.6750 1.4385 2.9000 6.3000
time_of_day:
Level N Mean Std Min Max
------------------------------------------------------------
14 7 4.4714 1.0420 2.8000 6.1000
22 4 5.7250 0.6946 4.9000 6.3000
6 4 4.9000 1.3760 2.9000 5.9000
guided_pct:
Level N Mean Std Min Max
------------------------------------------------------------
0 4 5.6000 0.9018 4.3000 6.3000
100 4 5.1000 0.2944 4.7000 5.4000
50 7 4.4286 1.3708 2.8000 6.3000
Optimization Recommendations
=== Optimization: stress_reduction ===
Direction: maximize
Best observed run: #8
duration_min = 17.5
time_of_day = 14
guided_pct = 50
Value: 6.8
RSM Model (linear, R² = 0.3529, Adj R² = 0.1764):
Coefficients:
intercept +5.1267
duration_min -0.2500
time_of_day +0.9500
guided_pct -0.1250
RSM Model (quadratic, R² = 0.7557, Adj R² = 0.3160):
Coefficients:
intercept +5.6000
duration_min -0.2500
time_of_day +0.9500
guided_pct -0.1250
duration_min*time_of_day +0.0250
duration_min*guided_pct +0.5750
time_of_day*guided_pct +1.1250
duration_min^2 -0.6125
time_of_day^2 -0.5125
guided_pct^2 +0.2375
Curvature analysis:
duration_min coef=-0.6125 concave (has a maximum)
time_of_day coef=-0.5125 concave (has a maximum)
guided_pct coef=+0.2375 convex (has a minimum)
Notable interactions:
time_of_day*guided_pct coef=+1.1250 (synergistic)
duration_min*guided_pct coef=+0.5750 (synergistic)
Predicted optimum (from quadratic model, at observed points):
duration_min = 17.5
time_of_day = 22
guided_pct = 100
Predicted value: 7.2750
Surface optimum (via L-BFGS-B, quadratic model):
duration_min = 21.0714
time_of_day = 22
guided_pct = 100
Predicted value: 7.3250
Model quality: Good fit — general trends are captured, some noise remains.
Factor importance:
1. time_of_day (effect: 1.9, contribution: 59.6%)
2. duration_min (effect: 0.8, contribution: 26.5%)
3. guided_pct (effect: 0.4, contribution: 13.9%)
=== Optimization: focus_score ===
Direction: maximize
Best observed run: #4
duration_min = 17.5
time_of_day = 14
guided_pct = 50
Value: 6.3
RSM Model (linear, R² = 0.2988, Adj R² = 0.1076):
Coefficients:
intercept +4.9200
duration_min -0.4000
time_of_day +0.6875
guided_pct -0.1625
RSM Model (quadratic, R² = 0.8314, Adj R² = 0.5280):
Coefficients:
intercept +5.9333
duration_min -0.4000
time_of_day +0.6875
guided_pct -0.1625
duration_min*time_of_day +0.0750
duration_min*guided_pct +0.0250
time_of_day*guided_pct +0.5500
duration_min^2 -0.9667
time_of_day^2 -1.1417
guided_pct^2 +0.2083
Curvature analysis:
time_of_day coef=-1.1417 concave (has a maximum)
duration_min coef=-0.9667 concave (has a maximum)
guided_pct coef=+0.2083 convex (has a minimum)
Notable interactions:
time_of_day*guided_pct coef=+0.5500 (synergistic)
Predicted optimum (from quadratic model, at observed points):
duration_min = 17.5
time_of_day = 22
guided_pct = 100
Predicted value: 6.0750
Surface optimum (via L-BFGS-B, quadratic model):
duration_min = 14.7779
time_of_day = 14.4245
guided_pct = 0
Predicted value: 6.3541
Model quality: Good fit — general trends are captured, some noise remains.
Factor importance:
1. time_of_day (effect: 1.8, contribution: 49.4%)
2. duration_min (effect: 1.3, contribution: 36.1%)
3. guided_pct (effect: 0.5, contribution: 14.5%)