Learning Objectives
Building on Worksheet 1, you will now master:
- Calculate and interpret measures of dispersion (variability)
- Apply coefficient of variation for pharmaceutical quality assessment
- Understand USP compliance requirements for weight variation
- Create basic visualizations for data interpretation
- Perform complete pharmaceutical batch analysis
🏭 Real-World Scenario
You've completed the central tendency analysis in Worksheet 1. Now your QC manager wants to understand the variability in the manufacturing process. "Are our tablets consistently close to target, or do we have concerning variations that might indicate process issues?" This worksheet focuses on measuring and interpreting data spread.
Part 1: Measures of Dispersion
Why Dispersion Matters in Pharmaceuticals
🧠 Step-by-Step Reasoning: The Importance of Variability
📊 Example: Two Manufacturing Lines
Line A weights: 549.8, 549.9, 550.0, 550.1, 550.2 mg (Mean = 550.0 mg)
Line B weights: 545.0, 548.0, 550.0, 552.0, 555.0 mg (Mean = 550.0 mg)
Question: Which line would you prefer for production? Why?
Range - The Simplest Measure
🧠 Step-by-Step: Calculating Range
Range shows the total spread from lowest to highest value
From our tablet weight data (Worksheet 1):
Maximum = 552.8 mg, Minimum = 548.2 mg
Range = Maximum - Minimum = 552.8 - 548.2 = 4.6 mg
The tablets vary by 4.6 mg across the entire batch
📐 Range Formula
💻 Excel Implementation
=MAX(range) - MIN(range)
Example: =MAX(A1:F5) - MIN(A1:F5)
Standard Deviation - The Gold Standard
🧠 Step-by-Step: Understanding Standard Deviation
Standard deviation measures average distance of values from the mean
Think of it as "typical deviation from target"
For each value, find: (Value - Mean)
Example: If value = 548.2 and mean = 550.29
Deviation = 548.2 - 550.29 = -2.09 mg
Squaring removes negative signs and emphasizes larger deviations
(-2.09)² = 4.37 mg²
Sum all squared deviations ÷ (n-1) = Variance
Using n-1 gives us the sample standard deviation
√Variance = Standard Deviation
This returns us to original units (mg)
📐 Standard Deviation Formula
Where: s = sample standard deviation, x̄ = mean, n = sample size
📋 Worked Example: Standard Deviation Calculation
Let's calculate standard deviation for a subset of our tablet weights:
Weight (x) | Mean (x̄) | Deviation (x - x̄) | (x - x̄)² |
---|---|---|---|
548.2 | 550.29 | -2.09 | 4.37 |
552.1 | 550.29 | 1.81 | 3.28 |
549.8 | 550.29 | -0.49 | 0.24 |
551.3 | 550.29 | 1.01 | 1.02 |
550.7 | 550.29 | 0.41 | 0.17 |
Sum of (x - x̄)² | 9.08 |
s² = Σ(x - x̄)² / (n-1)
s² = 9.08 / (5-1)
s² = 9.08 / 4 = 2.27 mg²
s = √(variance)
s = √2.27
s = 1.51 mg
💻 Excel Functions
=STDEV.S(range) - Sample standard deviation
=STDEV.P(range) - Population standard deviation
=VAR.S(range) - Sample variance
Note: Use STDEV.S for batch data (sample from larger population)
🔥 Exercise 1.1: Calculate Standard Deviation
Calculate the standard deviation for this dissolution data (% dissolved at 15 minutes):
Dissolution Data (%) | |||
---|---|---|---|
72.8 | 75.2 | 73.9 | 74.1 |
Step 1: Calculate the mean: _______________
Step 2: Complete the deviation table:
x | x - x̄ | (x - x̄)² |
---|---|---|
72.8 | _____ | _____ |
75.2 | _____ | _____ |
73.9 | _____ | _____ |
74.1 | _____ | _____ |
Sum | 0 | _____ |
Step 3: Variance = Σ(x - x̄)² / (n-1) = _____ / 3 = _____
Step 4: Standard Deviation = √(variance) = _____
Excel Formula: =STDEV.S(______)
Part 2: Coefficient of Variation (CV%)
The Relative Measure of Variability
🧠 Step-by-Step: Why CV% is Crucial
Standard deviation is in original units - hard to compare different measurements
Is 1.5 mg variation in weight the same as 1.5% variation in assay?
CV% expresses standard deviation as a percentage of the mean
This allows comparison across different types of measurements
USP and ICH guidelines often specify CV% limits
Common acceptance criteria: CV% < 2% for weight, < 5% for assay
Lower CV% = More consistent process
Higher CV% = More variable process (needs investigation)
📐 Coefficient of Variation Formula
📋 Worked Example: CV% Calculation
Using our tablet weight data from earlier:
Mean (x̄) = 550.29 mg
Standard Deviation (s) = 1.51 mg
(from our previous calculations)
CV% = (s / x̄) × 100
CV% = (1.51 / 550.29) × 100
CV% = 0.274%
💻 Excel Implementation
=(STDEV.S(range)/AVERAGE(range))*100
Example: =(STDEV.S(A1:F5)/AVERAGE(A1:F5))*100
📋 USP Acceptance Criteria
Weight Variation (USP <905>):
- For tablets ≥ 324 mg: No individual weight deviates by more than ±5% from average
- CV% typically should be < 2% for good manufacturing control
- If CV% > 3%, investigate process parameters
🔥 Exercise 2.1: CV% Analysis and Compliance
You receive assay results for content uniformity testing. Calculate CV% and assess compliance:
Assay Results (% of labeled claim) | ||||
---|---|---|---|---|
98.9 | 101.2 | 99.7 | 100.8 | 99.1 |
100.3 | 98.6 | 101.1 | 99.8 | 100.5 |
Calculate step-by-step:
1. Mean = _______________
2. Standard Deviation = _______________
3. CV% = (SD / Mean) × 100 = _______________
Excel formulas:
Mean: _______________
STDEV: _______________
CV%: _______________
Compliance Assessment:
Is CV% < 5%? (Circle: YES / NO)
Are all individual values within 85-115%? (Circle: YES / NO)
Overall conclusion: _______________
Part 3: Quartiles and Outlier Detection
Understanding Data Distribution with Quartiles
🧠 Step-by-Step: Quartile Concepts
Quartiles divide sorted data into four equal parts
Q1 = 25th percentile, Q2 = 50th percentile (median), Q3 = 75th percentile
IQR = Q3 - Q1
Shows spread of middle 50% of data (less affected by outliers)
Values beyond Q1 - 1.5×IQR or Q3 + 1.5×IQR are potential outliers
This is the "1.5 × IQR rule"
Outliers might indicate equipment malfunction, operator error, or raw material issues
📐 Quartile and Outlier Formulas
📋 Worked Example: Outlier Analysis
Let's analyze a tablet hardness dataset for outliers:
Data (sorted): 8.2, 8.5, 8.7, 8.8, 9.0, 9.1, 9.2, 9.3, 9.4, 9.6, 12.1 kP
Q1 position = (11+1)/4 = 3rd value
Q1 = 8.7 kP
Q3 position = 3×(11+1)/4 = 9th value
Q3 = 9.4 kP
IQR = Q3 - Q1
IQR = 9.4 - 8.7 = 0.7 kP
1.5 × IQR = 1.5 × 0.7 = 1.05 kP
Q1 - 1.5×IQR
8.7 - 1.05 = 7.65 kP
(No values below this)
Q3 + 1.5×IQR
9.4 + 1.05 = 10.45 kP
(12.1 kP exceeds this limit)
💻 Excel Functions for Quartiles
=QUARTILE.INC(range, 1) - First quartile (Q1)
=QUARTILE.INC(range, 2) - Second quartile (Q2, median)
=QUARTILE.INC(range, 3) - Third quartile (Q3)
=QUARTILE.INC(range, 3) - QUARTILE.INC(range, 1) - IQR
🔥 Exercise 3.1: Complete Outlier Analysis
Analyze this particle size data (micrometers) for outliers:
Raw Data: 45.2, 47.8, 48.1, 48.9, 49.2, 49.7, 50.1, 50.8, 51.2, 65.3
Step 1: Sort the data (if needed): _______________
Step 2: Find quartiles:
Q1 (position ___): _______________
Q3 (position ___): _______________
Step 3: Calculate IQR = Q3 - Q1 = _______________
Step 4: Calculate boundaries:
Lower boundary = Q1 - 1.5×IQR = _______________
Upper boundary = Q3 + 1.5×IQR = _______________
Step 5: Identify outliers: _______________
Excel formulas:
Q1: _______________
Q3: _______________
IQR: _______________
Part 4: Complete Batch Analysis Project
Comprehensive Quality Assessment
🎯 Project Scenario
You're conducting a complete quality assessment of three tablet batches (A, B, C) before release. Your manager needs a comprehensive report including central tendency, variability, and compliance assessment.
📊 Batch Data: Weight Variation (mg)
Tablet # | Batch A | Batch B | Batch C |
---|---|---|---|
1 | 248.7 | 251.2 | 249.8 |
2 | 250.1 | 248.9 | 250.3 |
3 | 249.8 | 252.1 | 248.9 |
4 | 250.3 | 247.8 | 251.1 |
5 | 249.6 | 253.0 | 249.7 |
6 | 250.0 | 249.7 | 250.2 |
7 | 249.9 | 251.8 | 250.8 |
8 | 250.2 | 248.3 | 249.5 |
9 | 249.7 | 252.5 | 250.6 |
10 | 250.4 | 250.1 | 249.4 |
📋 USP Weight Variation Requirements
For tablets weighing 250 mg (average):
- No tablet should deviate by more than ±7.5% from average weight
- Acceptance range: 231.25 mg to 268.75 mg
- Target CV%: < 2% for excellent control, < 3% acceptable
🔥 Final Exercise: Complete Batch Analysis Report
Complete the comprehensive analysis for all three batches:
BATCH A ANALYSIS
Central Tendency:
Mean = _____ mg | Median = _____ mg | Mode = _____
Dispersion:
Range = _____ mg | Standard Deviation = _____ mg | CV% = _____%
Quartiles & Outliers:
Q1 = _____ mg | Q3 = _____ mg | IQR = _____ mg
Outlier boundaries: _____ to _____ mg | Outliers detected: _____
USP Compliance:
Individual weights within ±7.5%? (Circle: YES / NO)
CV% acceptable? (Circle: YES / NO)
BATCH B ANALYSIS
Central Tendency:
Mean = _____ mg | Median = _____ mg | Mode = _____
Dispersion:
Range = _____ mg | Standard Deviation = _____ mg | CV% = _____%
USP Compliance:
Individual weights within ±7.5%? (Circle: YES / NO)
CV% acceptable? (Circle: YES / NO)
BATCH C ANALYSIS
Central Tendency:
Mean = _____ mg | Median = _____ mg | Mode = _____
Dispersion:
Range = _____ mg | Standard Deviation = _____ mg | CV% = _____%
USP Compliance:
Individual weights within ±7.5%? (Circle: YES / NO)
CV% acceptable? (Circle: YES / NO)
FINAL RECOMMENDATION
Best performing batch: _____ (justify with statistics)
Batches approved for release: _____
Batches requiring investigation: _____
Key findings and recommendations:
_________________________________________________
_________________________________________________