Mathematics and statistics Flashcards
How would you set up a stability programme for a tablet product?
- Prepare a stability protocol, including:
• Product name, batch numbers, packaging configurations
• Storage conditions and durations
• Test parameters and specifications
• Analytical methods (validated in line with ICH Q2)
• Acceptance criteria based on release and shelf-life specs
• Test schedule and responsibilities - Define test parameters based on product characteristics:
• Typically: assay (e.g. API content), degradation products, impurities, moisture content (if relevant), dissolution, physical appearance, hardness, friability. - Establish acceptance criteria, aligned with the product specification and justified by development data and regulatory filings (e.g. MA or IMPD).
- Testing frequency (per ICH Q1A(R2)):
• Long-term: at 0, 3, 6, 9, 12, 18, 24, 36 months (depending on the intended shelf-life)
• Accelerated: typically at 0, 3, 6 months
• Intermediate (if needed): 0, 6, 12 months- Storage conditions:
• Long-term: e.g. 25°C/60%RH or 30°C/65%RH• Intermediate: 30°C/65%RH
• Accelerated: 40°C/75%RH
• Specific conditions (e.g. 5°C or photostability) if required
- Storage conditions:
- Use of bracketing and matrixing (ICH Q1D):
• If scientifically justified, to reduce the number of test samples/timepoints
• Bracketing: test extremes (e.g. lowest and highest strengths or pack sizes)
• Matrixing: test a subset of time points for each batch/condition - Data evaluation:
• Plot stability data against time and assess trends
• Use statistical analysis (e.g. regression) to support shelf-life assignment
• Stability commitment should include post-approval monitoring (ongoing stability)
Where would you find guidance bracketing and matrixing? Can you please explain what do they mean?
Where would you find guidance on bracketing and matrixing?
Guidance is found in ICH Q1D: Bracketing and Matrixing Designs for Stability Testing of New Drug Substances and Products.
⸻
What is Bracketing?
Bracketing is a stability testing design where only samples from the extremes of certain design factors (e.g., highest and lowest strengths) are tested at all time points.
This assumes that the stability of intermediate levels is represented by the extremes.
Typical use cases:
• When the product formulations across strengths are qualitatively (Q1) and quantitatively (Q2) the same.
• Packaging configurations or container sizes differ only in fill volume or strength.
• E.g., test 5 mg and 50 mg tablets, and bracket 10 mg, 20 mg, etc.
⸻
What is Matrixing?
Matrixing is a design where a subset of the total number of samples is tested at each time point.
Different samples are tested at different time points in a staggered fashion according to a predefined matrix.
This reduces the total number of tests without compromising the ability to detect stability trends.
Typically applied to:
• Multiple strengths
• Multiple batches
• Multiple package configurations
E.g., test all strengths and batches, but not every combination at every time point—rotate time points based on a matrix design shown in Q1D.
⸻
Important considerations:
• Both approaches must be justified scientifically and based on product knowledge.
• The assumptions used in bracketing or matrixing must be verified in confirmatory (full) stability studies during product lifecycle.
• Not appropriate for all products (e.g., highly variable or unstable formulations).
You have a tablet product that is printed with the product name on it. What maths and stats would you expect to see on the process?
- AQL (Acceptance Quality Limit)
• Based on ISO 2859-1 sampling plans
• Defines the maximum acceptable number of defects in a batch sample before rejecting the batch
• Typically used for visual inspection of printing quality
• Critical defects (e.g. wrong print): AQL 0.065
• Major defects (e.g. missing print): AQL 0.4–1.0
• Minor defects (e.g. slight misalignment): AQL 1.5–4.0
⸻
- Control Charts
a. Shewhart Control Charts (e.g. p-chart, np-chart)
• Monitor proportion or count of defectives over time
• Helps detect process instability, shifts, or trends
• Typically used during routine inspection of printed tablets
b. CUSUM Charts (Cumulative Sum Control Charts)
• More sensitive to small shifts in process mean
• Useful when you want to detect gradual deterioration in print quality or alignment
⸻
- Process Capability: Cp, Cpk
• Used to assess how capable the process is of staying within spec limits for print position, contrast, etc.
• Cp: measures potential capability (doesn’t consider centering)
• Cpk: measures actual capability (accounts for mean shift)
• Cp/Cpk ≥ 1.33 is generally acceptable
⸻
- Performance Indices: Pp, Ppk
• Similar to Cp/Cpk but based on actual performance data over time (not controlled conditions)
• Pp/Ppk are more relevant when evaluating overall process performance, not just a validation run
⸻
- Optional: Pareto Analysis or Histogram
• Used to visualise types of printing defects and prioritise improvement efforts (80/20 rule)
• Histograms help visualise distribution of print alignment or ink intensity
What is an AQL?
QL stands for Acceptable Quality Level. It is a statistical quality control tool used to determine how many defective units are acceptable in a batch based on a predefined sampling plan.
AQL is widely applied in visual inspection and physical quality checks, especially for:
* Packaging (e.g. blister seal integrity, label alignment)
* Solid dosage forms (e.g. tablet colour, shape, coating defects)
The AQL defines the maximum number of non-conforming units allowed in a sample before the lot is rejected
What standards define AQL?
AQL is defined in ISO 2859-1, which sets out the sampling procedures for inspection by attributes based on acceptable quality limits. It’s the standard commonly followed for tablet and packaging inspections in GMP environments.
What standards define AQL?
You choose a sample size code based on batch size and (General) inspection level (typically Level II). (Special for small batch)
The standard then tells you:
* How many units to sample
* The maximum number of defects allowed for the batch to pass.
What is the significance of AQL, explain high level with respect to consumers and producers’ point of view. What are the criteria for selecting the defects.
AQL (Acceptance Quality Limit) is a statistical tool used for inspection by attributes, typically applied to starting materials, packaging components, and finished products. The sampling plans and acceptance criteria are defined in ISO 2859-1.
⸻
Significance of AQL – High Level:
From the Consumer’s Point of View:
• The ideal is zero defects, especially for critical attributes (e.g. correct tablet, legible printing, no contamination).
• However, complete 100% inspection is often not practical or effective.
• AQL offers a controlled and risk-based approach to ensure product quality remains within acceptable limits to protect patient safety.
From the Producer’s Point of View:
• AQL provides a statistical and economically efficient method to monitor batch quality.
• It balances quality assurance with practical manufacturing variability.
• Helps to detect trends, reduce risk of batch rejection, and avoid unnecessary over-inspection.
⸻
How AQL Works:
• AQL defines the maximum number of acceptable defective units in a sample before the entire batch is rejected.
• Sampling plans depend on:
• Batch size
• Inspection level (pharma typically uses General Inspection Level II)
• AQL value assigned based on defect criticality
⸻
Criteria for Selecting Defect Categories:
Defects are classified based on their impact on product safety, efficacy, and usability:
• Critical defects: likely to cause harm to the patient (e.g. wrong label or product mix-up)
– AQL: usually 0 or 0.065
• Major defects: may affect product function or appearance (e.g. missing print, cracked tablet)
– AQL: e.g. 0.4–1.0
• Minor defects: do not affect safety or function, but may impact aesthetics (e.g. slight smudge)
– AQL: e.g. 1.5–4.0
What generic maths and stats in relation to assay?
Model Answer:
For assay results, which measure the amount of active pharmaceutical ingredient (API) in a product, several mathematical and statistical tools are applied to ensure quality, consistency, and compliance with specifications:
⸻
- Percentage (% Assay)
• Assay results are typically expressed as a percentage of label claim (e.g. 98.5% w/w of stated content).
• Specification limits are commonly defined (e.g. 95.0–105.0% for tablets).
• Out-of-spec (OOS), out-of-trend (OOT), and shift detection all rely on accurate % assay data.
⸻
- Control Charts (Shewhart or CUSUM)
• Used to monitor assay values over time for trends, shifts, or variability:
• Shewhart X̄-R or X̄-S charts: monitor batch-to-batch average and variability.
• CUSUM charts: more sensitive to small but persistent shifts in the process mean.
⸻
- Process Capability and Performance: Cp, Cpk, Pp, Ppk
• These indices assess how well the manufacturing process performs relative to assay specification limits:
• Cp/Cpk: based on controlled conditions (validation stage)
• Pp/Ppk: based on actual long-term data (routine manufacturing)
• Target: Cpk or Ppk ≥ 1.33 indicates a capable and reliable process
⸻
- Standard Deviation and %RSD
• Used to assess the precision of the assay method (especially during validation per ICH Q2).
• %RSD (Relative Standard Deviation) is critical when interpreting assay variability.
⸻
- Regression Analysis (if trend evaluation needed)
• Applied during stability studies or trending to detect decreasing assay over time.
• Slope and confidence intervals used to estimate shelf life and support expiry dating.
⸻
Summary
“For assay results, I would expect use of basic percentage calculations, capability indices (Cp/Cpk, Pp/Ppk), control charts (Shewhart or CUSUM), and statistical measures like %RSD and regression where applicable. These tools are essential for ensuring the assay is within spec, the process is under control, and trends are detected early.”
Explain Cp and Cpk?
Explain Cp and Cpk
Cp and Cpk are process capability indices used to statistically evaluate how capable a process is of producing outputs that meet specifications.
⸻
- Cp – Process Capability
• Cp measures the potential capability of a process, assuming it is centered within the specification limits.
• It compares the spread of the process (its variability) to the width of the specification range.
Formula:
Cp = (USL – LSL) / (6 × σ)
• USL = Upper Spec Limit, LSL = Lower Spec Limit
• σ = Standard deviation of the process
• A Cp > 1.33 suggests the process has low variability and good potential capability
• But Cp doesn’t tell you if the process is centered
⸻
- Cpk – Process Capability Index
• Cpk measures the actual capability of the process, taking into account how centered the process mean is within the specification limits.
• It accounts for both variation and shift.
Formula:
Cpk = min [(USL – μ) / (3σ), (μ – LSL) / (3σ)]
• μ = process mean
• Cpk shows how close the process is to either limit
• A Cpk < Cp indicates the process is not centred
• A Cpk ≥ 1.33 is usually considered acceptable in pharmaceutical manufacturing
⸻
Summary (High-Level Explanation):
Cp tells you how wide or narrow your process spread is compared to specs, assuming it’s centered.
Cpk tells you how close the mean is to the spec limits — i.e. if the process is actually running well.
For both, values ≥1.33 indicate a capable and robust process.
Explain linear regression?
Linear Regression
Linear regression is a statistical method used to model the relationship between two variables — typically an independent variable (x) and a dependent variable (y).
In pharmaceutical analysis, it’s often used to assess:
• The relationship between concentration (x) and instrument response (y) in analytical method validation (e.g. assay, UV, HPLC, etc.)
⸻
Key components:
• Regression line equation:
y = mx + c
Where:
• m = slope (how much y changes for each unit of x)
• c = y-intercept (value of y when x = 0)
• R² (Coefficient of Determination):
• Indicates how well the data fit the regression line
• Value ranges from 0 to 1
• R² ≥ 0.99 is typically expected in analytical method validation to show good linearity
• An R² > 0.9 might be acceptable for preliminary assessments
⸻
In validation (ICH Q2 context):
• Linear regression is used to demonstrate linearity — that the method provides results that are directly proportional to concentration within a given range.
• This supports accuracy and precision of the method.
⸻
Summary:
“Linear regression evaluates the strength and direction of the linear relationship between two variables, such as concentration and analytical response. The R² value reflects how well the data fit a straight line, with ≥0.99 typically expected in validated methods.”
Correlation coefficient?
- Correlation Coefficient (r):
• Measures the strength and direction of a linear relationship between two variables (e.g. concentration vs response)
• Range: –1 to +1
• +1 = perfect positive linear relationship
• –1 = perfect negative linear relationship
• 0 = no linear relationship
⸻
- Coefficient of Determination (R²):
• This is r squared (i.e. R² = r²)
• Measures the proportion of the variance in the dependent variable that is predictable from the independent variable
• Range: 0 to 1
• R² = 1 = perfect linear fit
• R² = 0 = no linear relationship
⸻
Example:
• If r = 0.998, then R² = (0.998)² = 0.996
• So, 99.6% of the variation in the response can be explained by the variation in concentration
⸻
Summary for viva:
“The correlation coefficient (r) tells you the strength and direction of a linear relationship, while the coefficient of determination (R²) tells you how well the data fit a linear model. R² is simply r squared. In method validation, both are used to support linearity, but R² is more commonly reported.”
You’re getting periodic failures on your AQL sampling . What are you going to do about it? The failures are throughout the batch.
If I’m observing periodic failures in AQL sampling across multiple timepoints or batches, and the failures are spread throughout the batch, this suggests a systemic issue rather than a localised or random defect. Here’s how I would respond:
⸻
- Initiate a Deviation and Investigation
• Open a formal deviation in the QMS.
• Begin a root cause investigation to determine why the defects are occurring — assess:
• Supplier/material issues
• Equipment malfunction or drift
• Operator training
• Environmental conditions
• Process control or batch segregation failure
⸻
- Apply ISO 2859-1 Escalation Rules
• Based on the sampling plan, if there are repeated failures:
• Switch to a tighter inspection level (e.g. from General Level II to III) as per ISO 2859-1 switching rules.
• Possibly move from normal to tightened inspection if the rules for switching apply (e.g. 2 out of 5 lots failing).
• This increases detection power and reflects a loss of process control.
⸻
- Implement CAPA
• Define and implement Corrective and Preventive Actions (CAPA) to address the root cause.
• Examples: retraining, process changes, additional in-process controls, enhanced equipment checks, or supplier requalification.
• Ensure effectiveness check is defined and documented.
⸻
- Maintain Tighter Inspection Until Recovery
• Continue tightened inspection until at least 5 consecutive batches pass inspection.
• Then, according to ISO 2859-1, consider returning to normal inspection.
⸻
- Evaluate Product Impact
• Assess whether the batch is still acceptable for release.
• If defect types are critical or the defect rate exceeds acceptance limits, batch rejection or recall may be necessary.
• As a QP, I’d ensure patient safety is prioritised in the decision.
⸻
Summary:
“I’d escalate the inspection level under ISO 2859-1, investigate the root cause via deviation/CAPA, and only consider returning to normal inspection after demonstrating sustained control through 5 consecutive passes. Meanwhile, I’d assess the impact on batch quality and patient safety to support QP certification decisions.”
You are working in an OSD facility your QC lab report to you that your tablet hardness is out of control - what would be your strategy to assessing and controlling this statistically?
If I’m informed that tablet hardness is out of control in an OSD (oral solid dosage) facility, I would follow a structured approach combining QA principles and statistical tools to assess and regain process control.
⸻
- Initiate Deviation and Perform Impact Assessment
• Raise a formal deviation and perform an impact assessment:
• Does the hardness deviation affect dissolution, disintegration, or product performance?
• Any implications for batches already manufactured or released?
• Check batch history and trending.
⸻
- Investigate the Root Cause
• Conduct a structured investigation into possible causes:
• Granulation parameters (e.g. moisture content, particle size)
• Compression force settings or tablet press performance
• Material variability (API or excipients)
• Environmental factors or calibration issues
⸻
- Use Statistical Tools for Analysis
a. Control Charts (e.g. Shewhart X̄-R or X̄-S charts)
• Review historic and current control charts to assess:
• If the process is in statistical control
• Presence of trends, shifts, or cycles
b. Process Capability Indices (Cp and Cpk)
• Cp: tells if the process variation fits within spec limits
• Cpk: tells if the process mean is centred within the limits
• A value of ≥ 1.33 is typically expected in pharma for a capable and robust process
• If Cp and/or Cpk are < 1.33, this supports the need for CAPA
⸻
- Implement CAPA and Monitor Effectiveness
• Implement corrective and preventive actions based on root cause
• Recalculate Cp and Cpk after CAPA to confirm improved capability
• Define effectiveness checks, including trending of hardness and reassessment of variability
⸻
- Monitor Long-Term Stability of the Process
• Continue using control charts and Pp/Ppk (long-term performance metrics) to verify ongoing process robustness
• Consider increased sampling temporarily to confirm stability
⸻
Summary:
“My approach would combine deviation management, root cause investigation, and the application of control charts and process capability indices. If Cp and Cpk improve to ≥1.33 and are sustained, this indicates the process is stable and capable. As a QP, I’d also assess any batch impact and ensure robust CAPA with effectiveness checks.”
Addition to Root Cause Investigation Section:
As part of the investigation, I would review historical tablet hardness data using control charts (e.g. Shewhart X̄-R charts) to determine:
• Whether this is an isolated incident or part of a gradual trend
• If there has been a shift in process mean or increased variability
If a trend or change point is identified, I would:
• Cross-reference this timeframe against batch records, change controls, deviations, or equipment maintenance logs
• This helps to correlate any process or equipment changes with the observed drift in hardness
The goal is to identify whether any uncontrolled change or process deviation might have contributed to the loss of control.
⸻
Optional Summary Sentence for Viva:
“So I’d use statistical tools not only for current data but also to review historical trends, which helps detect subtle shifts over time and trace them back to possible root causes.”
You receive a call from the laboratory to inform you that the hardness of tablet you prepare is out of control – can you detail what you would do to bring the process back into control using statistics.
a. Went through use of control charts
b. Pp and PpK then when in control Cp and CpK
c. Common and special cause variation
d. How monitor using SPC – outliers / rules for control charts
- Statistical Process Control
Question: Explain statistical process control and how control limits are defined.
odel Answer: SPC monitors process variability. Control limits = ±3 SD from mean (Shewhart chart).
Tips: CP/CPK > 1.33 desirable. Use CPK/PPK for capability vs performance. Use PPK for historical data (e.g., PQR).
Scinario: You are a new QP of a large generic manufacturer company. You came to know that the ongoing stability programme is not up to date with most of the products? Your concerns as a QP? How will you manage the situation? (About 25 minutes)
Follow up: r. You have a lot of batches on market and how will you manage this, you do not have staff to perform all testing.
Follow up: s. Yes, you can transfer it to another registered laboratory listed on the MA. What will you require to see? How do you know transfer was successful?
Follow up: t. All transfers have been carried out 3 years ago and no testing since then, are you concerned?
Follow up: u. How will you prioritise what you need to test, there are 60 odd products?
Follow up: v. So now you have tested the annual stability of all the 15 products, all of them fail the test results at the current timepoint.
Follow up: w. How will you assess the data? What statistics you are going to use?
Follow up: x. What other data you will require to make assessment on your batches?
Follow up: y. How will you know which batches might be affected?