Summary
This experiment investigates lip balm texture formulation. Full factorial of beeswax ratio, shea butter ratio, oil type, and flavor load to maximize moisturizing feel and firmness.
The design varies 4 factors: beeswax pct (%), ranging from 15 to 30, shea pct (%), ranging from 10 to 30, oil type, ranging from coconut to jojoba, and flavor pct (%), ranging from 0.5 to 3.0. The goal is to optimize 2 responses: moisture score (pts) (maximize) and firmness score (pts) (maximize). Fixed conditions held constant across all runs include vitamin e = 1pct, container = tube.
A full factorial design was used to explore all 16 possible combinations of the 4 factors at two levels. This guarantees that every main effect and interaction can be estimated independently, at the cost of a larger experiment (16 runs).
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 moisture score, the most influential factors were oil type (42.5%), shea pct (22.0%), flavor pct (22.0%). The best observed value was 7.9 (at beeswax pct = 15, shea pct = 30, oil type = jojoba).
For firmness score, the most influential factors were oil type (44.6%), beeswax pct (33.9%), shea pct (17.7%). The best observed value was 7.4 (at beeswax pct = 15, shea pct = 10, oil type = jojoba).
Recommended Next Steps
- Consider whether any fixed factors should be varied in a future study.
Experimental Setup
Factors
| Factor | Low | High | Unit |
beeswax_pct | 15 | 30 | % |
shea_pct | 10 | 30 | % |
oil_type | coconut | jojoba | |
flavor_pct | 0.5 | 3.0 | % |
Fixed: vitamin_e = 1pct, container = tube
Responses
| Response | Direction | Unit |
moisture_score | ↑ maximize | pts |
firmness_score | ↑ maximize | pts |
Configuration
{
"metadata": {
"name": "Lip Balm Texture Formulation",
"description": "Full factorial of beeswax ratio, shea butter ratio, oil type, and flavor load to maximize moisturizing feel and firmness"
},
"factors": [
{
"name": "beeswax_pct",
"levels": [
"15",
"30"
],
"type": "continuous",
"unit": "%"
},
{
"name": "shea_pct",
"levels": [
"10",
"30"
],
"type": "continuous",
"unit": "%"
},
{
"name": "oil_type",
"levels": [
"coconut",
"jojoba"
],
"type": "categorical",
"unit": ""
},
{
"name": "flavor_pct",
"levels": [
"0.5",
"3.0"
],
"type": "continuous",
"unit": "%"
}
],
"fixed_factors": {
"vitamin_e": "1pct",
"container": "tube"
},
"responses": [
{
"name": "moisture_score",
"optimize": "maximize",
"unit": "pts"
},
{
"name": "firmness_score",
"optimize": "maximize",
"unit": "pts"
}
],
"settings": {
"operation": "full_factorial",
"test_script": "use_cases/222_lip_balm_texture/sim.sh"
}
}
Experimental Matrix
The Full Factorial Design produces 16 runs. Each row is one experiment with specific factor settings.
| Run | beeswax_pct | shea_pct | oil_type | flavor_pct |
| 1 | 15 | 30 | jojoba | 3.0 |
| 2 | 30 | 10 | coconut | 3.0 |
| 3 | 15 | 30 | coconut | 3.0 |
| 4 | 15 | 30 | jojoba | 0.5 |
| 5 | 30 | 30 | jojoba | 0.5 |
| 6 | 30 | 10 | jojoba | 0.5 |
| 7 | 30 | 30 | coconut | 0.5 |
| 8 | 30 | 10 | coconut | 0.5 |
| 9 | 15 | 10 | coconut | 3.0 |
| 10 | 15 | 10 | jojoba | 0.5 |
| 11 | 30 | 30 | coconut | 3.0 |
| 12 | 30 | 30 | jojoba | 3.0 |
| 13 | 15 | 30 | coconut | 0.5 |
| 14 | 30 | 10 | jojoba | 3.0 |
| 15 | 15 | 10 | coconut | 0.5 |
| 16 | 15 | 10 | jojoba | 3.0 |
Step-by-Step Workflow
1
Preview the design
$ doe info --config use_cases/222_lip_balm_texture/config.json
2
Generate the runner script
$ doe generate --config use_cases/222_lip_balm_texture/config.json \
--output use_cases/222_lip_balm_texture/results/run.sh --seed 42
3
Execute the experiments
$ bash use_cases/222_lip_balm_texture/results/run.sh
4
Analyze results
$ doe analyze --config use_cases/222_lip_balm_texture/config.json
5
Get optimization recommendations
$ doe optimize --config use_cases/222_lip_balm_texture/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/222_lip_balm_texture/config.json --multi
7
Generate the HTML report
$ doe report --config use_cases/222_lip_balm_texture/config.json \
--output use_cases/222_lip_balm_texture/results/report.html
Features Exercised
| Feature | Value |
| Design type | full_factorial |
| Factor types | continuous (3), categorical (1) |
| Arg style | double-dash |
| Responses | 2 (moisture_score ↑, firmness_score ↑) |
| Total runs | 16 |
Analysis Results
Generated from actual experiment runs using the DOE Helper Tool.
Response: moisture_score
Top factors: oil_type (42.5%), shea_pct (22.0%), flavor_pct (22.0%).
ANOVA
| Source | DF | SS | MS | F | p-value |
| Source | DF | SS | MS | F | p-value |
| beeswax_pct | 1 | 0.7225 | 0.7225 | 0.857 | 0.3972 |
| shea_pct | 1 | 1.9600 | 1.9600 | 2.324 | 0.1879 |
| oil_type | 1 | 7.2900 | 7.2900 | 8.643 | 0.0323 |
| flavor_pct | 1 | 1.9600 | 1.9600 | 2.324 | 0.1879 |
| beeswax_pct*shea_pct | 1 | 0.8100 | 0.8100 | 0.960 | 0.3721 |
| beeswax_pct*oil_type | 1 | 1.2100 | 1.2100 | 1.434 | 0.2847 |
| beeswax_pct*flavor_pct | 1 | 1.0000 | 1.0000 | 1.186 | 0.3259 |
| shea_pct*oil_type | 1 | 0.3025 | 0.3025 | 0.359 | 0.5754 |
| shea_pct*flavor_pct | 1 | 0.7225 | 0.7225 | 0.857 | 0.3972 |
| oil_type*flavor_pct | 1 | 1.5625 | 1.5625 | 1.852 | 0.2316 |
| Error | 5 | 4.2175 | 0.8435 | | |
| Total | 15 | 21.7575 | 1.4505 | | |
Pareto Chart
Main Effects Plot
Normal Probability Plot of Effects
Half-Normal Plot of Effects
Model Diagnostics
Response: firmness_score
Top factors: oil_type (44.6%), beeswax_pct (33.9%), shea_pct (17.7%).
ANOVA
| Source | DF | SS | MS | F | p-value |
| Source | DF | SS | MS | F | p-value |
| beeswax_pct | 1 | 9.9225 | 9.9225 | 7.296 | 0.0427 |
| shea_pct | 1 | 2.7225 | 2.7225 | 2.002 | 0.2163 |
| oil_type | 1 | 17.2225 | 17.2225 | 12.664 | 0.0162 |
| flavor_pct | 1 | 0.1225 | 0.1225 | 0.090 | 0.7762 |
| beeswax_pct*shea_pct | 1 | 1.4400 | 1.4400 | 1.059 | 0.3507 |
| beeswax_pct*oil_type | 1 | 0.1600 | 0.1600 | 0.118 | 0.7456 |
| beeswax_pct*flavor_pct | 1 | 0.1600 | 0.1600 | 0.118 | 0.7456 |
| shea_pct*oil_type | 1 | 1.2100 | 1.2100 | 0.890 | 0.3889 |
| shea_pct*flavor_pct | 1 | 0.0100 | 0.0100 | 0.007 | 0.9350 |
| oil_type*flavor_pct | 1 | 0.1600 | 0.1600 | 0.118 | 0.7456 |
| Error | 5 | 6.8000 | 1.3600 | | |
| Total | 15 | 39.9300 | 2.6620 | | |
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.
firmness score beeswax pct vs flavor pct
firmness score beeswax pct vs shea pct
firmness score shea pct vs flavor pct
moisture score beeswax pct vs flavor pct
moisture score beeswax pct vs shea pct
moisture score shea pct vs flavor 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.7609
Per-Response Desirability
| Response | Weight | Desirability | Predicted | Dir |
moisture_score |
1.5 |
|
7.30 0.8071 7.30 pts |
↑ |
firmness_score |
1.5 |
|
6.20 0.7174 6.20 pts |
↑ |
Recommended Settings
| Factor | Value |
beeswax_pct | 15 % |
shea_pct | 30 % |
oil_type | jojoba |
flavor_pct | 0.5 % |
Source: from observed run #12
Trade-off Summary
Sacrifice = how much worse than single-objective best.
| Response | Predicted | Best Observed | Sacrifice |
firmness_score | 6.20 | 7.40 | +1.20 |
Top 3 Runs by Desirability
| Run | D | Factor Settings |
| #5 | 0.7575 | beeswax_pct=30, shea_pct=10, oil_type=jojoba, flavor_pct=0.5 |
| #11 | 0.6618 | beeswax_pct=15, shea_pct=10, oil_type=jojoba, flavor_pct=3.0 |
Model Quality
| Response | R² | Type |
firmness_score | 0.0265 | linear |
Full Multi-Objective Output
============================================================
MULTI-OBJECTIVE OPTIMIZATION
Method: Derringer-Suich Desirability Function
============================================================
Overall desirability: D = 0.7609
Response Weight Desirability Predicted Direction
---------------------------------------------------------------------
moisture_score 1.5 0.8071 7.30 pts ↑
firmness_score 1.5 0.7174 6.20 pts ↑
Recommended settings:
beeswax_pct = 15 %
shea_pct = 30 %
oil_type = jojoba
flavor_pct = 0.5 %
(from observed run #12)
Trade-off summary:
moisture_score: 7.30 (best observed: 7.90, sacrifice: +0.60)
firmness_score: 6.20 (best observed: 7.40, sacrifice: +1.20)
Model quality:
moisture_score: R² = 0.3703 (linear)
firmness_score: R² = 0.0265 (linear)
Top 3 observed runs by overall desirability:
1. Run #12 (D=0.7609): beeswax_pct=15, shea_pct=30, oil_type=jojoba, flavor_pct=0.5
2. Run #5 (D=0.7575): beeswax_pct=30, shea_pct=10, oil_type=jojoba, flavor_pct=0.5
3. Run #11 (D=0.6618): beeswax_pct=15, shea_pct=10, oil_type=jojoba, flavor_pct=3.0
Full Analysis Output
=== Main Effects: moisture_score ===
Factor Effect Std Error % Contribution
--------------------------------------------------------------
oil_type 1.3500 0.3011 42.5%
shea_pct -0.7000 0.3011 22.0%
flavor_pct 0.7000 0.3011 22.0%
beeswax_pct -0.4250 0.3011 13.4%
=== ANOVA Table: moisture_score ===
Source DF SS MS F p-value
-----------------------------------------------------------------------------
beeswax_pct 1 0.7225 0.7225 0.857 0.3972
shea_pct 1 1.9600 1.9600 2.324 0.1879
oil_type 1 7.2900 7.2900 8.643 0.0323
flavor_pct 1 1.9600 1.9600 2.324 0.1879
beeswax_pct*shea_pct 1 0.8100 0.8100 0.960 0.3721
beeswax_pct*oil_type 1 1.2100 1.2100 1.434 0.2847
beeswax_pct*flavor_pct 1 1.0000 1.0000 1.186 0.3259
shea_pct*oil_type 1 0.3025 0.3025 0.359 0.5754
shea_pct*flavor_pct 1 0.7225 0.7225 0.857 0.3972
oil_type*flavor_pct 1 1.5625 1.5625 1.852 0.2316
Error 5 4.2175 0.8435
Total 15 21.7575 1.4505
=== Interaction Effects: moisture_score ===
Factor A Factor B Interaction % Contribution
------------------------------------------------------------------------
oil_type flavor_pct -0.6250 22.1%
beeswax_pct oil_type 0.5500 19.5%
beeswax_pct flavor_pct 0.5000 17.7%
beeswax_pct shea_pct 0.4500 15.9%
shea_pct flavor_pct -0.4250 15.0%
shea_pct oil_type 0.2750 9.7%
=== Summary Statistics: moisture_score ===
beeswax_pct:
Level N Mean Std Min Max
------------------------------------------------------------
15 8 6.2250 1.1298 4.2000 7.7000
30 8 5.8000 1.3148 4.3000 7.9000
shea_pct:
Level N Mean Std Min Max
------------------------------------------------------------
10 8 6.3625 1.2317 4.3000 7.9000
30 8 5.6625 1.1451 4.2000 7.1000
oil_type:
Level N Mean Std Min Max
------------------------------------------------------------
coconut 8 5.3375 1.1096 4.2000 7.3000
jojoba 8 6.6875 0.9141 5.4000 7.9000
flavor_pct:
Level N Mean Std Min Max
------------------------------------------------------------
0.5 8 5.6625 1.2961 4.2000 7.7000
3.0 8 6.3625 1.0716 4.6000 7.9000
=== Main Effects: firmness_score ===
Factor Effect Std Error % Contribution
--------------------------------------------------------------
oil_type -2.0750 0.4079 44.6%
beeswax_pct 1.5750 0.4079 33.9%
shea_pct 0.8250 0.4079 17.7%
flavor_pct -0.1750 0.4079 3.8%
=== ANOVA Table: firmness_score ===
Source DF SS MS F p-value
-----------------------------------------------------------------------------
beeswax_pct 1 9.9225 9.9225 7.296 0.0427
shea_pct 1 2.7225 2.7225 2.002 0.2163
oil_type 1 17.2225 17.2225 12.664 0.0162
flavor_pct 1 0.1225 0.1225 0.090 0.7762
beeswax_pct*shea_pct 1 1.4400 1.4400 1.059 0.3507
beeswax_pct*oil_type 1 0.1600 0.1600 0.118 0.7456
beeswax_pct*flavor_pct 1 0.1600 0.1600 0.118 0.7456
shea_pct*oil_type 1 1.2100 1.2100 0.890 0.3889
shea_pct*flavor_pct 1 0.0100 0.0100 0.007 0.9350
oil_type*flavor_pct 1 0.1600 0.1600 0.118 0.7456
Error 5 6.8000 1.3600
Total 15 39.9300 2.6620
=== Interaction Effects: firmness_score ===
Factor A Factor B Interaction % Contribution
------------------------------------------------------------------------
beeswax_pct shea_pct 0.6000 33.3%
shea_pct oil_type 0.5500 30.6%
beeswax_pct oil_type 0.2000 11.1%
beeswax_pct flavor_pct -0.2000 11.1%
oil_type flavor_pct 0.2000 11.1%
shea_pct flavor_pct 0.0500 2.8%
=== Summary Statistics: firmness_score ===
beeswax_pct:
Level N Mean Std Min Max
------------------------------------------------------------
15 8 4.4375 1.4841 2.8000 6.9000
30 8 6.0125 1.4436 3.2000 7.4000
shea_pct:
Level N Mean Std Min Max
------------------------------------------------------------
10 8 4.8125 1.6066 3.1000 7.2000
30 8 5.6375 1.6535 2.8000 7.4000
oil_type:
Level N Mean Std Min Max
------------------------------------------------------------
coconut 8 6.2625 1.1083 4.4000 7.4000
jojoba 8 4.1875 1.4197 2.8000 6.4000
flavor_pct:
Level N Mean Std Min Max
------------------------------------------------------------
0.5 8 5.3125 1.7357 2.8000 7.2000
3.0 8 5.1375 1.6353 3.1000 7.4000
Optimization Recommendations
=== Optimization: moisture_score ===
Direction: maximize
Best observed run: #1
beeswax_pct = 15
shea_pct = 30
oil_type = jojoba
flavor_pct = 0.5
Value: 7.9
RSM Model (linear, R² = 0.0627, Adj R² = -0.2781):
Coefficients:
intercept +6.0125
beeswax_pct +0.0625
shea_pct +0.2250
oil_type +0.1750
flavor_pct +0.0125
RSM Model (quadratic, R² = 0.6628, Adj R² = -4.0586):
Coefficients:
intercept +1.2025
beeswax_pct +0.0625
shea_pct +0.2250
oil_type +0.1750
flavor_pct +0.0125
beeswax_pct*shea_pct -0.4000
beeswax_pct*oil_type -0.0500
beeswax_pct*flavor_pct +0.0625
shea_pct*oil_type -0.2625
shea_pct*flavor_pct -0.5000
oil_type*flavor_pct -0.5750
beeswax_pct^2 +1.2025
shea_pct^2 +1.2025
oil_type^2 +1.2025
flavor_pct^2 +1.2025
Curvature analysis:
beeswax_pct coef=+1.2025 convex (has a minimum)
shea_pct coef=+1.2025 convex (has a minimum)
oil_type coef=+1.2025 convex (has a minimum)
flavor_pct coef=+1.2025 convex (has a minimum)
Notable interactions:
oil_type*flavor_pct coef=-0.5750 (antagonistic)
shea_pct*flavor_pct coef=-0.5000 (antagonistic)
beeswax_pct*shea_pct coef=-0.4000 (antagonistic)
Predicted optimum (from linear model, at observed points):
beeswax_pct = 30
shea_pct = 30
oil_type = jojoba
flavor_pct = 3.0
Predicted value: 6.4875
Surface optimum (via L-BFGS-B, linear model):
beeswax_pct = 30
shea_pct = 30
oil_type = jojoba
flavor_pct = 3
Predicted value: 6.4875
Model quality: Weak fit — consider adding center points or using a different design.
Factor importance:
1. shea_pct (effect: 0.5, contribution: 47.4%)
2. oil_type (effect: 0.3, contribution: 36.8%)
3. beeswax_pct (effect: 0.1, contribution: 13.2%)
4. flavor_pct (effect: 0.0, contribution: 2.6%)
=== Optimization: firmness_score ===
Direction: maximize
Best observed run: #14
beeswax_pct = 15
shea_pct = 10
oil_type = jojoba
flavor_pct = 3.0
Value: 7.4
RSM Model (linear, R² = 0.0447, Adj R² = -0.3027):
Coefficients:
intercept +5.2250
beeswax_pct -0.0250
shea_pct +0.0625
oil_type -0.3250
flavor_pct +0.0375
RSM Model (quadratic, R² = 0.8466, Adj R² = -1.3009):
Coefficients:
intercept +1.0450
beeswax_pct -0.0250
shea_pct +0.0625
oil_type -0.3250
flavor_pct +0.0375
beeswax_pct*shea_pct +0.7375
beeswax_pct*oil_type +0.3000
beeswax_pct*flavor_pct -0.8875
shea_pct*oil_type +0.3125
shea_pct*flavor_pct +0.2750
oil_type*flavor_pct +0.6375
beeswax_pct^2 +1.0450
shea_pct^2 +1.0450
oil_type^2 +1.0450
flavor_pct^2 +1.0450
Curvature analysis:
beeswax_pct coef=+1.0450 convex (has a minimum)
shea_pct coef=+1.0450 convex (has a minimum)
oil_type coef=+1.0450 convex (has a minimum)
flavor_pct coef=+1.0450 convex (has a minimum)
Notable interactions:
beeswax_pct*flavor_pct coef=-0.8875 (antagonistic)
beeswax_pct*shea_pct coef=+0.7375 (synergistic)
oil_type*flavor_pct coef=+0.6375 (synergistic)
shea_pct*oil_type coef=+0.3125 (synergistic)
beeswax_pct*oil_type coef=+0.3000 (synergistic)
Predicted optimum (from linear model, at observed points):
beeswax_pct = 15
shea_pct = 30
oil_type = coconut
flavor_pct = 3.0
Predicted value: 5.6750
Surface optimum (via L-BFGS-B, linear model):
beeswax_pct = 15
shea_pct = 30
oil_type = coconut
flavor_pct = 3
Predicted value: 5.6750
Model quality: Weak fit — consider adding center points or using a different design.
Factor importance:
1. oil_type (effect: -0.6, contribution: 72.2%)
2. shea_pct (effect: 0.1, contribution: 13.9%)
3. flavor_pct (effect: 0.1, contribution: 8.3%)
4. beeswax_pct (effect: -0.0, contribution: 5.6%)