← All Use Cases
🏋
Box-Behnken Design

Meditation Routine Effectiveness

Box-Behnken design to maximize stress reduction and focus improvement by tuning session duration, time of day, and technique

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

Experimental Setup

Factors

FactorLowHighUnit
duration_min530min
time_of_day622hour
guided_pct0100%

Fixed: frequency = daily, environment = quiet_room

Responses

ResponseDirectionUnit
stress_reduction↑ maximizepts
focus_score↑ maximizepts

Configuration

use_cases/110_meditation_routine/config.json
{ "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.

Runduration_mintime_of_dayguided_pct
117.560
217.51450
33014100
430140
517.51450
617.51450
7514100
830650
917.56100
10302250
115140
1217.522100
135650
1452250
1517.5220

Step-by-Step Workflow

1

Preview the design

Terminal
$ doe info --config use_cases/110_meditation_routine/config.json
2

Generate the runner script

Terminal
$ 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

Terminal
$ bash use_cases/110_meditation_routine/results/run.sh
4

Analyze results

Terminal
$ doe analyze --config use_cases/110_meditation_routine/config.json
5

Get optimization recommendations

Terminal
$ 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.

Terminal
$ doe optimize --config use_cases/110_meditation_routine/config.json --multi
7

Generate the HTML report

Terminal
$ doe report --config use_cases/110_meditation_routine/config.json \ --output use_cases/110_meditation_routine/results/report.html

Features Exercised

FeatureValue
Design typebox_behnken
Factor typescontinuous (all 3)
Arg styledouble-dash
Responses2 (stress_reduction ↑, focus_score ↑)
Total runs15

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

SourceDFSSMSFp-value
SourceDFSSMSFp-value
duration_min22.56081.28049.8490.0070
time_of_day25.40752.703820.7980.0007
guided_pct25.28332.641620.3200.0007
LackofFit68.71781.4530
PureError20.2600
Error88.97780.1300
Total1422.22931.5878

Pareto Chart

Pareto chart for stress_reduction

Main Effects Plot

Main effects plot for stress_reduction

Normal Probability Plot of Effects

Normal probability plot for stress_reduction

Half-Normal Plot of Effects

Half-normal plot for stress_reduction

Model Diagnostics

Model diagnostics for stress_reduction

Response: focus_score

Top factors: time_of_day (39.8%), guided_pct (37.2%), duration_min (23.0%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
duration_min21.28790.64400.9860.4143
time_of_day24.00222.00113.0630.1029
guided_pct23.66971.83492.8080.1191
LackofFit67.37751.2296
PureError21.3067
Error88.68410.6533
Total1417.64401.2603

Pareto Chart

Pareto chart for focus_score

Main Effects Plot

Main effects plot for focus_score

Normal Probability Plot of Effects

Normal probability plot for focus_score

Half-Normal Plot of Effects

Half-normal plot for focus_score

Model Diagnostics

Model diagnostics for focus_score

Response Surface Plots

3D surfaces fitted with quadratic RSM. Red dots are observed data points.

focus score duration min vs guided pct

RSM surface: focus score duration min vs guided pct

focus score duration min vs time of day

RSM surface: focus score duration min vs time of day

focus score time of day vs guided pct

RSM surface: focus score time of day vs guided pct

stress reduction duration min vs guided pct

RSM surface: stress reduction duration min vs guided pct

stress reduction duration min vs time of day

RSM surface: stress reduction duration min vs time of day

stress reduction time of day vs guided pct

RSM surface: 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

ResponseWeightDesirabilityPredictedDir
stress_reduction 1.5
0.9545
6.80 0.9545 6.80 pts
focus_score 1.5
0.9545
6.30 0.9545 6.30 pts

Recommended Settings

FactorValue
duration_min17.5 min
time_of_day6 hour
guided_pct100 %

Source: from observed run #8

Trade-off Summary

Sacrifice = how much worse than single-objective best.

ResponsePredictedBest ObservedSacrifice
focus_score6.306.30+0.00

Top 3 Runs by Desirability

RunDFactor Settings
#100.8681duration_min=17.5, time_of_day=22, guided_pct=100
#30.8621duration_min=5, time_of_day=14, guided_pct=100

Model Quality

ResponseType
focus_score0.3396linear

Full Multi-Objective Output

doe optimize --multi
============================================================ 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

doe analyze
=== 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

doe optimize
=== 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%)
← Previous: Strength Training Program Next: Ergonomic Workstation Setup →