← All Use Cases
💄
Central Composite Design

Shampoo Foaming & Cleansing

Central composite design to maximize foam volume and cleansing power while minimizing scalp dryness by tuning surfactant blend, pH, and viscosity

Summary

This experiment investigates shampoo foaming & cleansing. Central composite design to maximize foam volume and cleansing power while minimizing scalp dryness by tuning surfactant blend, pH, and viscosity.

The design varies 3 factors: surfactant pct (%), ranging from 8 to 18, ph level (pH), ranging from 4.5 to 6.5, and viscosity cp (cP), ranging from 2000 to 8000. The goal is to optimize 2 responses: foam score (pts) (maximize) and scalp dryness (pts) (minimize). Fixed conditions held constant across all runs include fragrance = floral, preservative = phenoxyethanol.

A Central Composite Design (CCD) was selected to fit a full quadratic response surface model, including curvature and interaction effects. With 3 factors this produces 22 runs including center points and axial (star) points that extend beyond the factorial range.

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 foam score, the most influential factors were viscosity cp (41.7%), ph level (38.2%), surfactant pct (20.1%). The best observed value was 8.2 (at surfactant pct = 13, ph level = 5.5, viscosity cp = 5000).

For scalp dryness, the most influential factors were viscosity cp (43.8%), ph level (28.8%), surfactant pct (27.5%). The best observed value was 2.8 (at surfactant pct = 18, ph level = 6.5, viscosity cp = 2000).

Recommended Next Steps

Experimental Setup

Factors

FactorLowHighUnit
surfactant_pct818%
ph_level4.56.5pH
viscosity_cp20008000cP

Fixed: fragrance = floral, preservative = phenoxyethanol

Responses

ResponseDirectionUnit
foam_score↑ maximizepts
scalp_dryness↓ minimizepts

Configuration

use_cases/220_shampoo_foam/config.json
{ "metadata": { "name": "Shampoo Foaming & Cleansing", "description": "Central composite design to maximize foam volume and cleansing power while minimizing scalp dryness by tuning surfactant blend, pH, and viscosity" }, "factors": [ { "name": "surfactant_pct", "levels": [ "8", "18" ], "type": "continuous", "unit": "%" }, { "name": "ph_level", "levels": [ "4.5", "6.5" ], "type": "continuous", "unit": "pH" }, { "name": "viscosity_cp", "levels": [ "2000", "8000" ], "type": "continuous", "unit": "cP" } ], "fixed_factors": { "fragrance": "floral", "preservative": "phenoxyethanol" }, "responses": [ { "name": "foam_score", "optimize": "maximize", "unit": "pts" }, { "name": "scalp_dryness", "optimize": "minimize", "unit": "pts" } ], "settings": { "operation": "central_composite", "test_script": "use_cases/220_shampoo_foam/sim.sh" } }

Experimental Matrix

The Central Composite Design produces 22 runs. Each row is one experiment with specific factor settings.

Runsurfactant_pctph_levelviscosity_cp
1135.55000
2184.58000
386.52000
4137.325745000
5135.55000
63.871295.55000
7135.5-477.226
8135.55000
9186.52000
1022.12875.55000
11135.55000
12133.674265000
13135.55000
1484.58000
15135.55000
16184.52000
17135.510477.2
18186.58000
19135.55000
2084.52000
2186.58000
22135.55000

Step-by-Step Workflow

1

Preview the design

Terminal
$ doe info --config use_cases/220_shampoo_foam/config.json
2

Generate the runner script

Terminal
$ doe generate --config use_cases/220_shampoo_foam/config.json \ --output use_cases/220_shampoo_foam/results/run.sh --seed 42
3

Execute the experiments

Terminal
$ bash use_cases/220_shampoo_foam/results/run.sh
4

Analyze results

Terminal
$ doe analyze --config use_cases/220_shampoo_foam/config.json
5

Get optimization recommendations

Terminal
$ doe optimize --config use_cases/220_shampoo_foam/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/220_shampoo_foam/config.json --multi
7

Generate the HTML report

Terminal
$ doe report --config use_cases/220_shampoo_foam/config.json \ --output use_cases/220_shampoo_foam/results/report.html

Features Exercised

FeatureValue
Design typecentral_composite
Factor typescontinuous (all 3)
Arg styledouble-dash
Responses2 (foam_score ↑, scalp_dryness ↓)
Total runs22

Analysis Results

Generated from actual experiment runs using the DOE Helper Tool.

Response: foam_score

Top factors: viscosity_cp (41.7%), ph_level (38.2%), surfactant_pct (20.1%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
surfactant_pct47.46361.86590.4220.7889
ph_level48.38612.09650.4750.7538
viscosity_cp413.74453.43610.7780.5666
LackofFit20.00000.0000
PureError730.9150
Error920.00944.4164
Total2149.60362.3621

Pareto Chart

Pareto chart for foam_score

Main Effects Plot

Main effects plot for foam_score

Normal Probability Plot of Effects

Normal probability plot for foam_score

Half-Normal Plot of Effects

Half-normal plot for foam_score

Model Diagnostics

Model diagnostics for foam_score

Response: scalp_dryness

Top factors: viscosity_cp (43.8%), ph_level (28.8%), surfactant_pct (27.5%).

ANOVA

SourceDFSSMSFp-value
SourceDFSSMSFp-value
surfactant_pct42.02580.50650.4360.7797
ph_level42.35580.58900.5070.7322
viscosity_cp47.97001.99251.7160.2300
LackofFit21.25960.6298
PureError78.1288
Error99.38831.1613
Total2121.74001.0352

Pareto Chart

Pareto chart for scalp_dryness

Main Effects Plot

Main effects plot for scalp_dryness

Normal Probability Plot of Effects

Normal probability plot for scalp_dryness

Half-Normal Plot of Effects

Half-normal plot for scalp_dryness

Model Diagnostics

Model diagnostics for scalp_dryness

Response Surface Plots

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

foam score ph level vs viscosity cp

RSM surface: foam score ph level vs viscosity cp

foam score surfactant pct vs ph level

RSM surface: foam score surfactant pct vs ph level

foam score surfactant pct vs viscosity cp

RSM surface: foam score surfactant pct vs viscosity cp

scalp dryness ph level vs viscosity cp

RSM surface: scalp dryness ph level vs viscosity cp

scalp dryness surfactant pct vs ph level

RSM surface: scalp dryness surfactant pct vs ph level

scalp dryness surfactant pct vs viscosity cp

RSM surface: scalp dryness surfactant pct vs viscosity cp

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.7703

Per-Response Desirability

ResponseWeightDesirabilityPredictedDir
foam_score 1.5
0.7807
6.90 0.7807 6.90 pts
scalp_dryness 1.0
0.7550
3.70 0.7550 3.70 pts

Recommended Settings

FactorValue
surfactant_pct13 %
ph_level5.5 pH
viscosity_cp-477.226 cP

Source: from observed run #17

Trade-off Summary

Sacrifice = how much worse than single-objective best.

ResponsePredictedBest ObservedSacrifice
scalp_dryness3.702.80+0.90

Top 3 Runs by Desirability

RunDFactor Settings
#150.6885surfactant_pct=18, ph_level=6.5, viscosity_cp=2000
#180.6864surfactant_pct=13, ph_level=5.5, viscosity_cp=5000

Model Quality

ResponseType
scalp_dryness0.1702linear

Full Multi-Objective Output

doe optimize --multi
============================================================ MULTI-OBJECTIVE OPTIMIZATION Method: Derringer-Suich Desirability Function ============================================================ Overall desirability: D = 0.7703 Response Weight Desirability Predicted Direction --------------------------------------------------------------------- foam_score 1.5 0.7807 6.90 pts ↑ scalp_dryness 1.0 0.7550 3.70 pts ↓ Recommended settings: surfactant_pct = 13 % ph_level = 5.5 pH viscosity_cp = -477.226 cP (from observed run #17) Trade-off summary: foam_score: 6.90 (best observed: 8.20, sacrifice: +1.30) scalp_dryness: 3.70 (best observed: 2.80, sacrifice: +0.90) Model quality: foam_score: R² = 0.5668 (quadratic) scalp_dryness: R² = 0.1702 (linear) Top 3 observed runs by overall desirability: 1. Run #17 (D=0.7703): surfactant_pct=13, ph_level=5.5, viscosity_cp=-477.226 2. Run #15 (D=0.6885): surfactant_pct=18, ph_level=6.5, viscosity_cp=2000 3. Run #18 (D=0.6864): surfactant_pct=13, ph_level=5.5, viscosity_cp=5000

Full Analysis Output

doe analyze
=== Main Effects: foam_score === Factor Effect Std Error % Contribution -------------------------------------------------------------- viscosity_cp 2.5917 0.3277 41.7% ph_level 2.3750 0.3277 38.2% surfactant_pct 1.2500 0.3277 20.1% === ANOVA Table: foam_score === Source DF SS MS F p-value ----------------------------------------------------------------------------- surfactant_pct 4 7.4636 1.8659 0.422 0.7889 ph_level 4 8.3861 2.0965 0.475 0.7538 viscosity_cp 4 13.7445 3.4361 0.778 0.5666 Lack of Fit 2 0.0000 0.0000 0.000 1.0000 Pure Error 7 30.9150 4.4164 Error 9 20.0094 4.4164 Total 21 49.6036 2.3621 === Summary Statistics: foam_score === surfactant_pct: Level N Mean Std Min Max ------------------------------------------------------------ 13 12 5.2500 1.8981 1.4000 8.2000 18 4 6.5000 0.6481 5.9000 7.2000 22.1287 1 6.0000 0.0000 6.0000 6.0000 3.87129 1 6.2000 0.0000 6.2000 6.2000 8 4 6.4500 0.6455 5.8000 7.1000 ph_level: Level N Mean Std Min Max ------------------------------------------------------------ 3.67426 1 4.2000 0.0000 4.2000 4.2000 4.5 4 6.5750 0.6652 6.0000 7.2000 5.5 12 5.5250 1.8777 1.4000 8.2000 6.5 4 6.3750 0.6076 5.8000 6.9000 7.32574 1 4.7000 0.0000 4.7000 4.7000 viscosity_cp: Level N Mean Std Min Max ------------------------------------------------------------ -477.226 1 7.7000 0.0000 7.7000 7.7000 10477.2 1 6.2000 0.0000 6.2000 6.2000 2000 4 6.7500 0.6455 5.8000 7.2000 5000 12 5.1083 1.7568 1.4000 8.2000 8000 4 6.2000 0.4690 5.9000 6.9000 === Main Effects: scalp_dryness === Factor Effect Std Error % Contribution -------------------------------------------------------------- viscosity_cp 1.6750 0.2169 43.8% ph_level 1.1000 0.2169 28.8% surfactant_pct 1.0500 0.2169 27.5% === ANOVA Table: scalp_dryness === Source DF SS MS F p-value ----------------------------------------------------------------------------- surfactant_pct 4 2.0258 0.5065 0.436 0.7797 ph_level 4 2.3558 0.5890 0.507 0.7322 viscosity_cp 4 7.9700 1.9925 1.716 0.2300 Lack of Fit 2 1.2596 0.6298 0.542 0.6040 Pure Error 7 8.1288 1.1613 Error 9 9.3883 1.1613 Total 21 21.7400 1.0352 === Summary Statistics: scalp_dryness === surfactant_pct: Level N Mean Std Min Max ------------------------------------------------------------ 13 12 4.2167 0.9084 2.8000 5.8000 18 4 4.9500 1.0661 4.0000 6.3000 22.1287 1 3.9000 0.0000 3.9000 3.9000 3.87129 1 4.2000 0.0000 4.2000 4.2000 8 4 4.5750 1.5521 3.7000 6.9000 ph_level: Level N Mean Std Min Max ------------------------------------------------------------ 3.67426 1 4.6000 0.0000 4.6000 4.6000 4.5 4 5.0000 1.4306 3.8000 6.9000 5.5 12 4.1833 0.9003 2.8000 5.8000 6.5 4 4.5250 1.2010 3.7000 6.3000 7.32574 1 3.9000 0.0000 3.9000 3.9000 viscosity_cp: Level N Mean Std Min Max ------------------------------------------------------------ -477.226 1 5.0000 0.0000 5.0000 5.0000 10477.2 1 4.2000 0.0000 4.2000 4.2000 2000 4 5.6000 1.3115 3.9000 6.9000 5000 12 4.1250 0.8771 2.8000 5.8000 8000 4 3.9250 0.2217 3.7000 4.2000

Optimization Recommendations

doe optimize
=== Optimization: foam_score === Direction: maximize Best observed run: #2 surfactant_pct = 13 ph_level = 5.5 viscosity_cp = 5000 Value: 8.2 RSM Model (linear, R² = 0.0948, Adj R² = -0.0560): Coefficients: intercept +5.7727 surfactant_pct -0.0563 ph_level -0.3943 viscosity_cp +0.4026 RSM Model (quadratic, R² = 0.2411, Adj R² = -0.3281): Coefficients: intercept +5.7859 surfactant_pct -0.0563 ph_level -0.3943 viscosity_cp +0.4026 surfactant_pct*ph_level +0.1250 surfactant_pct*viscosity_cp +0.7000 ph_level*viscosity_cp +0.0250 surfactant_pct^2 -0.3016 ph_level^2 +0.2234 viscosity_cp^2 +0.0584 Curvature analysis: surfactant_pct coef=-0.3016 concave (has a maximum) ph_level coef=+0.2234 convex (has a minimum) viscosity_cp coef=+0.0584 negligible curvature Notable interactions: surfactant_pct*viscosity_cp coef=+0.7000 (synergistic) Predicted optimum (from linear model, at observed points): surfactant_pct = 8 ph_level = 4.5 viscosity_cp = 8000 Predicted value: 6.6259 Surface optimum (via L-BFGS-B, linear model): surfactant_pct = 8 ph_level = 4.5 viscosity_cp = 8000 Predicted value: 6.6259 Model quality: Weak fit — consider adding center points or using a different design. Factor importance: 1. ph_level (effect: 2.7, contribution: 41.0%) 2. viscosity_cp (effect: 2.5, contribution: 39.1%) 3. surfactant_pct (effect: 1.3, contribution: 19.9%) === Optimization: scalp_dryness === Direction: minimize Best observed run: #3 surfactant_pct = 18 ph_level = 6.5 viscosity_cp = 2000 Value: 2.8 RSM Model (linear, R² = 0.0197, Adj R² = -0.1436): Coefficients: intercept +4.4000 surfactant_pct +0.1227 ph_level -0.0736 viscosity_cp +0.0937 RSM Model (quadratic, R² = 0.2967, Adj R² = -0.2308): Coefficients: intercept +4.0868 surfactant_pct +0.1227 ph_level -0.0736 viscosity_cp +0.0937 surfactant_pct*ph_level -0.1500 surfactant_pct*viscosity_cp +0.0500 ph_level*viscosity_cp +0.2250 surfactant_pct^2 -0.1934 ph_level^2 +0.3766 viscosity_cp^2 +0.2866 Curvature analysis: ph_level coef=+0.3766 convex (has a minimum) viscosity_cp coef=+0.2866 convex (has a minimum) surfactant_pct coef=-0.1934 concave (has a maximum) Predicted optimum (from linear model, at observed points): surfactant_pct = 18 ph_level = 4.5 viscosity_cp = 8000 Predicted value: 4.6900 Surface optimum (via L-BFGS-B, linear model): surfactant_pct = 8 ph_level = 6.5 viscosity_cp = 2000 Predicted value: 4.1100 Model quality: Weak fit — consider adding center points or using a different design. Factor importance: 1. ph_level (effect: 3.5, contribution: 47.6%) 2. viscosity_cp (effect: 2.8, contribution: 38.0%) 3. surfactant_pct (effect: 1.0, contribution: 14.4%)
← Previous: Moisturizer Absorption Rate Next: Nail Polish Durability →