๐Ÿ“š Theoretical Foundation

๐Ÿญ Real Pharmaceutical Scenario

Quality Control Laboratory Challenge: You've just received 50 tablets from Batch #2024-045 of Acetaminophen 500mg tablets. The USP specification states that individual tablet weights should be within ยฑ5% of the average weight. Your task is to analyze the weight distribution to determine if this batch meets quality standards.

Let's think step-by-step how frequency distributions help us solve this...

๐Ÿง  Step-by-Step Reasoning: Why Frequency Distributions Matter

Step 1: The Raw Data Problem
Raw data: 248.2, 251.7, 249.8, 252.1, 247.9, 250.3... (50 values)
Challenge: Looking at 50 individual numbers tells us nothing about patterns!
Step 2: Grouping Creates Clarity
Instead of 50 individual values, we group them into ranges:
246-248 mg: 4 tablets, 248-250 mg: 12 tablets, 250-252 mg: 18 tablets...
Insight: Now we can see the distribution pattern!
Step 3: Visual Representation
A histogram shows us immediately if our tablets follow a normal distribution
Business Impact: Normal = consistent manufacturing process
Step 4: Quality Decision
If 95% of tablets fall within ยฑ2 standard deviations, the batch passes quality control
Regulatory Compliance: USP <905> weight variation requirements

Sturges' Rule for Optimal Number of Classes:

k = 1 + 3.322 ร— logโ‚โ‚€(n)

Where k = number of classes, n = sample size

For 50 tablets: k = 1 + 3.322 ร— logโ‚โ‚€(50) = 1 + 3.322 ร— 1.699 = 6.64 โ‰ˆ 7 classes

๐Ÿ”ง Interactive Frequency Distribution Builder

๐Ÿ“ Data Input

๐Ÿ“ˆ Live Visualization

Enter data and click "Generate Frequency Table" to see histogram

๐Ÿ’ป Excel Implementation Guide

๐Ÿ“Š Excel FREQUENCY Function Tutorial

The FREQUENCY function returns a vertical array of frequencies for tablet weight ranges.

Step-by-Step Excel Implementation:

Step 1: Set up your data
Column A: Tablet weights (A1:A50)
Column C: Bin boundaries (C1:C8 for 7 classes)
Step 2: Create bin boundaries
If data ranges from 247 to 253 mg, create bins:
C1: 248, C2: 249, C3: 250, C4: 251, C5: 252, C6: 253, C7: 254
Step 3: Enter FREQUENCY function
Select range D1:D8, then type the formula:
=FREQUENCY(A1:A50,C1:C7)
Press Ctrl+Shift+Enter (array formula)
Step 4: Create histogram
Select bin ranges and frequencies โ†’ Insert โ†’ Chart โ†’ Column Chart
Pro tip: Add normal curve overlay using Chart Tools
๐Ÿ”ง Alternative Excel Methods

Method 1: COUNTIFS for custom ranges

=COUNTIFS(A:A,">="&C1,A:A,"<"&C2)

Method 2: Data Analysis ToolPak

Data โ†’ Data Analysis โ†’ Histogram โ†’ Select input range and bin range

Method 3: Pivot Tables

Insert โ†’ PivotTable โ†’ Drag weight to Rows โ†’ Group by custom ranges

๐Ÿฅ Pharmaceutical Quality Control Applications

๐Ÿ“‹ USP <905> Weight Variation Test

Regulatory Requirement: For tablets weighing 130mg or more, not more than 2 units are outside ยฑ5% of average weight, and no unit is outside ยฑ10%.

Quality Control Decision Process:

Step 1: Calculate average weight
xฬ„ = ฮฃx/n = (248.2 + 251.7 + ... + 249.7)/20 = 250.1 mg
Step 2: Determine acceptance limits
ยฑ5% limits: 250.1 ร— 0.05 = ยฑ12.5 mg โ†’ 237.6 to 262.6 mg
ยฑ10% limits: 250.1 ร— 0.10 = ยฑ25.0 mg โ†’ 225.1 to 275.1 mg
Step 3: Count tablets outside limits using frequency table
Frequency table shows: 0 tablets outside ยฑ10%, 1 tablet outside ยฑ5%
Decision: PASS (โ‰ค2 tablets outside ยฑ5%, 0 tablets outside ยฑ10%)

๐Ÿ’Š Content Uniformity Assessment

Use frequency distributions to analyze API content variation across tablet batch.

  • Target: 500mg ยฑ 10mg acetaminophen per tablet
  • Acceptance criteria: 85% - 115% of label claim
  • Method: Create frequency table of assay results
  • Decision: Pass if all values within 85-115% range

โœ… Knowledge Check

Quick Quiz: Test Your Understanding

Question 1: If you have 80 tablet weights to analyze, how many classes should you use according to Sturges' rule?




Question 2: In a frequency histogram, if most values cluster around the center with few values at the extremes, this suggests: