πŸ—οΈ Part 3: Full Factorial & Optimization Design Center

Systematic Exploration of Factor Interactions in Pharmaceutical Formulation (45 minutes)

πŸ”§2^k Factorial Constructor (15 minutes)

Design Matrix & Standard Order

Let's think step-by-step about how to construct a factorial design. A 2^k factorial design systematically explores all possible combinations of k factors, each at 2 levels (typically coded as -1 for low and +1 for high).

πŸ’­ Step-by-Step Reasoning: Building a 2Β³ Design Matrix

Step 1: Understand what we're building
- We have 3 factors (k=3), so we need 2Β³ = 8 experimental runs
- Each factor will be at low (-1) or high (+1) levels
- We want to systematically explore ALL combinations

Step 2: Use Yates' standard order algorithm
- Factor A: Alternates every run (-, +, -, +, -, +, -, +)
- Factor B: Alternates every 2 runs (-, -, +, +, -, -, +, +)
- Factor C: Alternates every 4 runs (-, -, -, -, +, +, +, +)

Step 3: This creates a balanced, orthogonal design

Run A: Binder % B: Compression Force C: Lubricant % Response: Hardness (kp)
1-1 (2%)-1 (500 kg)-1 (0.5%)Y₁
2+1 (4%)-1 (500 kg)-1 (0.5%)Yβ‚‚
3-1 (2%)+1 (1000 kg)-1 (0.5%)Y₃
4+1 (4%)+1 (1000 kg)-1 (0.5%)Yβ‚„
5-1 (2%)-1 (500 kg)+1 (1.5%)Yβ‚…
6+1 (4%)-1 (500 kg)+1 (1.5%)Y₆
7-1 (2%)+1 (1000 kg)+1 (1.5%)Y₇
8+1 (4%)+1 (1000 kg)+1 (1.5%)Yβ‚ˆ

Main Effect & Interaction Calculation

Now let's understand how to calculate effects from our factorial design:

Main Effect A = (Sum of Y when A = +1) - (Sum of Y when A = -1)
────────────────────────────────────────────────────────────
Number of replicates Γ— 2^(k-1)

πŸ’­ Step-by-Step Reasoning: Calculating Main Effect A (Binder)

Understanding the logic: We want to know the average effect of changing binder from low to high level.

Step 1: Identify runs where A = +1
Runs 2, 4, 6, 8: Yβ‚‚ + Yβ‚„ + Y₆ + Yβ‚ˆ

Step 2: Identify runs where A = -1
Runs 1, 3, 5, 7: Y₁ + Y₃ + Yβ‚… + Y₇

Step 3: Calculate the contrast
Contrast_A = (Yβ‚‚ + Yβ‚„ + Y₆ + Yβ‚ˆ) - (Y₁ + Y₃ + Yβ‚… + Y₇)

Step 4: Convert to average effect
Effect_A = Contrast_A Γ· 4 (since we have 4 observations at each level)

πŸ§ͺ Pharmaceutical Example: Tablet Hardness Factorial Design

Scenario: We conducted a 2Β³ design to study tablet hardness with results:

RunABCHardness (kp)
1-1-1-16.2
2+1-1-18.5
3-1+1-17.8
4+1+1-110.1
5-1-1+15.1
6+1-1+17.2
7-1+1+16.5
8+1+1+18.9

Calculation:
Effect_A = [(8.5 + 10.1 + 7.2 + 8.9) - (6.2 + 7.8 + 5.1 + 6.5)] Γ· 4
Effect_A = [34.7 - 25.6] Γ· 4 = 9.1 Γ· 4 = 2.275 kp

Interpretation: Increasing binder from 2% to 4% increases tablet hardness by an average of 2.3 kp.

Interaction Effect AB = (Sum of Y when A and B have same sign) - (Sum of Y when A and B have opposite signs)
──────────────────────────────────────────────────────────────────────────────────────
Number of replicates Γ— 2^(k-1)

πŸ’­ Step-by-Step Reasoning: Calculating Interaction AB

Understanding interactions: An interaction means the effect of factor A depends on the level of factor B.

Step 1: Identify runs where A and B have the same sign
Both negative: Runs 1, 5 (A=-1, B=-1)
Both positive: Runs 4, 8 (A=+1, B=+1)

Step 2: Identify runs where A and B have opposite signs
A negative, B positive: Runs 3, 7 (A=-1, B=+1)
A positive, B negative: Runs 2, 6 (A=+1, B=-1)

Step 3: Calculate the interaction contrast
AB_contrast = (Y₁ + Yβ‚„ + Yβ‚… + Yβ‚ˆ) - (Yβ‚‚ + Y₃ + Y₆ + Y₇)

Step 4: Convert to interaction effect
Effect_AB = AB_contrast Γ· 4

Blocking and Randomization

Why Randomization Matters: Randomization protects against systematic bias from uncontrolled factors like time trends, equipment drift, or operator differences.

πŸ§ͺ Example: Proper Randomization in Tablet Manufacturing

Problem: We need to run our 8 experiments, but can only do 4 per day.

Poor approach: Run experiments 1-4 on Monday, 5-8 on Tuesday
Risk: Any difference between days gets confounded with factor C

Good approach: Randomize within blocks
Day 1 (random order): Runs 3, 7, 1, 5
Day 2 (random order): Runs 6, 2, 8, 4

Excel implementation: =RAND() function to assign random numbers, then sort

πŸ“ˆ3^k Factorial & Curvature Explorer (15 minutes)

Three-Level Designs (-1, 0, +1)

Let's think about why we sometimes need three levels instead of two:

πŸ’­ Step-by-Step Reasoning: Why Three Levels?

Problem with 2-level designs:
- They can only detect linear relationships
- Real pharmaceutical responses often have curves (optimums)

Solution with 3-level designs:
- Low level: -1
- Middle level: 0
- High level: +1
- Now we can fit quadratic (curved) models!

Cost consideration:
2Β² design = 4 runs
3Β² design = 9 runs
2Β³ design = 8 runs
3Β³ design = 27 runs (!)

πŸ§ͺ Pharmaceutical Example: Dissolution Rate Optimization

Scenario: We're studying how polymer concentration affects drug release rate.

Polymer Concentration Coded Level Dissolution Rate (%/min)
1%-12.1
3%04.8
5%+12.3

Observation: The middle level (3%) gives the highest dissolution rate! A 2-level design would have missed this optimum completely.

Linear model (2-level): Would predict dissolution increases with polymer
Quadratic model (3-level): Correctly identifies the optimum at 3% polymer

Center Points for Curvature Testing

A clever way to detect curvature without the full expense of a 3^k design:

πŸ’­ Step-by-Step Reasoning: Center Point Strategy

The idea: Add center point runs (0,0,...,0) to a 2^k design

Step 1: Run the standard 2^k factorial design
Calculate average response of factorial points: Θ³_factorial

Step 2: Run multiple center point experiments
Calculate average response of center points: Θ³_center

Step 3: Test for curvature
If |Θ³_factorial - Θ³_center| is statistically significant β†’ curvature exists

Statistical test: t-test comparing the two means

πŸ“Š Curvature Detection Calculator

Formula for t-statistic:

t = (ȳ_factorial - ȳ_center) / √[s²(1/n_factorial + 1/n_center)]

Where sΒ² is the pooled variance estimate

πŸ§ͺ Example: Detecting Curvature in Tablet Hardness

Data from 2Β² + 4 center points design:

Run TypeA: BinderB: ForceHardness (kp)
Factorial-1-16.2
Factorial+1-18.5
Factorial-1+17.8
Factorial+1+110.1
Center009.8
Center009.5
Center009.7
Center009.6

Calculation:
Θ³_factorial = (6.2 + 8.5 + 7.8 + 10.1) Γ· 4 = 8.15 kp
Θ³_center = (9.8 + 9.5 + 9.7 + 9.6) Γ· 4 = 9.65 kp
Difference = 9.65 - 8.15 = 1.5 kp

Conclusion: Center points are significantly higher β†’ curvature exists! The optimum is near the center of our design space.

πŸ“ŠFactorial Data Analysis Toolkit (15 minutes)

ANOVA for Factorial Designs

Analysis of Variance (ANOVA) helps us determine which effects are statistically significant:

πŸ’­ Step-by-Step Reasoning: Factorial ANOVA

Step 1: Partition the total variation
Total SS = SS(A) + SS(B) + SS(C) + SS(AB) + SS(AC) + SS(BC) + SS(ABC) + SS(Error)

Step 2: Calculate Mean Squares
MS = SS Γ· degrees of freedom
For main effects: df = 1
For interactions: df = 1 (in 2^k designs)

Step 3: Calculate F-statistics
F = MS(effect) Γ· MS(Error)

Step 4: Compare with critical F-value
If F > F_critical β†’ effect is significant

Source SS df MS F p-value Significant?
A (Binder)20.7120.7103.5<0.001Yes
B (Force)12.3112.361.5<0.001Yes
C (Lubricant)8.118.140.5<0.001Yes
AB0.810.84.00.046Yes
AC0.210.21.00.317No
BC0.110.10.50.481No
ABC0.010.00.00.995No
Error1.680.2---
Excel Implementation: Use Data Analysis Toolpak β†’ ANOVA: Two-Factor With Replication for 2Β² designs. For higher-order designs, use regression with coded variables.

Model Equation Builder

Once we know which effects are significant, we build a prediction equation:

πŸ’­ Step-by-Step Reasoning: Building the Model

Step 1: Start with the general form
Y = bβ‚€ + b₁X₁ + bβ‚‚Xβ‚‚ + b₃X₃ + b₁₂X₁Xβ‚‚ + ... + Ξ΅

Step 2: Calculate coefficients from effects
bβ‚€ = overall average of all responses
b₁ = Effect_A Γ· 2
b₁₂ = Effect_AB Γ· 2

Step 3: Include only significant terms
From our ANOVA: A, B, C, and AB are significant

Step 4: Write the final model

πŸ§ͺ Example: Tablet Hardness Prediction Model

From our factorial design analysis:

Significant effects:
β€’ Effect_A (Binder) = +2.28 kp
β€’ Effect_B (Force) = +1.76 kp
β€’ Effect_C (Lubricant) = -1.43 kp
β€’ Effect_AB = +0.45 kp
β€’ Overall mean = 7.65 kp

Model coefficients:
bβ‚€ = 7.65
b₁ = 2.28 Γ· 2 = 1.14
bβ‚‚ = 1.76 Γ· 2 = 0.88
b₃ = -1.43 Γ· 2 = -0.72
b₁₂ = 0.45 Γ· 2 = 0.23

Final Model:
Hardness = 7.65 + 1.14Γ—Binder + 0.88Γ—Force - 0.72Γ—Lubricant + 0.23Γ—BinderΓ—Force

Practical use: This model can predict tablet hardness for any combination of factor levels within our experimental range!

Model Validation: Always validate your model with confirmation runs at factor settings not used in the original design. The predicted vs. actual values should agree within experimental error.

πŸ“± Excel Formula for Prediction

If factor levels are in cells A1 (Binder), B1 (Force), C1 (Lubricant):

=7.65 + 1.14*A1 + 0.88*B1 - 0.72*C1 + 0.23*A1*B1