🎯 Learning Objectives
By the end of this practice session, you will be able to:
- Select the appropriate t-test for different pharmaceutical scenarios
- Perform step-by-step calculations for one-sample and two-sample t-tests
- Interpret t-test results in the context of formulation development
- Apply Excel functions for t-test calculations
- Make regulatory-compliant conclusions from statistical tests
🧭 T-Test Selection Framework
Ask: "What am I comparing?"
One group vs. standard → One-sample t-test
Two independent groups → Two-sample t-test
Same subjects, two conditions → Paired t-test
Check Assumptions
✓ Data should be approximately normal
✓ Observations should be independent
✓ For two-sample: check if variances are equal
Choose Significance Level
α = 0.05 (most common in pharmaceuticals)
α = 0.01 (more stringent for critical decisions)
📊 One-Sample T-Test
When to Use
Compare a sample mean against a known value (e.g., label claim, specification limit, target value).
Where: x̄ = sample mean, μ₀ = hypothesized mean, s = sample SD, n = sample size
Scenario: A pharmaceutical company produces tablets with a label claim of 250 mg. Quality control tests 12 tablets to verify the average weight meets the specification.
Step-by-Step Solution:
State Hypotheses
H₀: μ = 250 mg (tablets meet label claim)
H₁: μ ≠ 250 mg (tablets do not meet label claim)
α = 0.05 (two-tailed test)
Calculate Sample Statistics
Let's think step-by-step:
Sample mean (x̄):
Sum = 248.2 + 251.1 + 249.8 + ... + 251.4 = 3000.8 mg
x̄ = 3000.8 ÷ 12 = 250.07 mg
Sample standard deviation (s):
Using the formula: s = √[Σ(x - x̄)² / (n-1)]
s = 1.52 mg
Sample size: n = 12
Calculate t-statistic
t = (x̄ - μ₀) / (s / √n)
t = (250.07 - 250) / (1.52 / √12)
t = 0.07 / (1.52 / 3.464)
t = 0.07 / 0.439
t = 0.159
Find Critical Value and p-value
Degrees of freedom: df = n - 1 = 11
Critical value: t₀.₀₂₅,₁₁ = ±2.201 (two-tailed)
p-value: p ≈ 0.876 (using t-distribution)
Make Decision
Since |t| = 0.159 < 2.201 and p = 0.876 > 0.05:
Decision: Fail to reject H₀
Conclusion: There is insufficient evidence to conclude that the tablet weights differ significantly from the 250 mg label claim.
Function: =T.TEST(array, μ₀, tails, type)
For one-sample t-test: =T.TEST(A1:A12, 250, 2, 1)
Alternative functions:
- =AVERAGE(A1:A12) → Calculate sample mean
- =STDEV.S(A1:A12) → Calculate sample standard deviation
- =T.INV.2T(0.05, 11) → Get critical t-value
📈 Two-Sample Independent T-Test
When to Use
Compare means of two independent groups (e.g., different formulations, different batches, treatment vs. control).
t = (x̄₁ - x̄₂) / (s_pooled × √(1/n₁ + 1/n₂))
s_pooled = √[(s₁²(n₁-1) + s₂²(n₂-1)) / (n₁+n₂-2)]
Scenario: A pharmaceutical company wants to compare the dissolution rate of two tablet formulations (A and B) at 30 minutes.
Formulation A (% dissolved) | Formulation B (% dissolved) |
---|---|
78.2 | 82.1 |
79.8 | 83.4 |
77.5 | 81.8 |
80.1 | 84.2 |
78.9 | 82.7 |
79.3 | 83.1 |
78.6 | 82.5 |
79.7 | 83.8 |
Step-by-Step Solution:
State Hypotheses
H₀: μ₁ = μ₂ (no difference between formulations)
H₁: μ₁ ≠ μ₂ (formulations have different dissolution rates)
α = 0.05 (two-tailed test)
Calculate Sample Statistics
Formulation A:
x̄₁ = 79.01%, s₁ = 0.91%, n₁ = 8
Formulation B:
x̄₂ = 82.95%, s₂ = 0.86%, n₂ = 8
Check Equal Variances (F-test)
F = s₁²/s₂² = 0.91²/0.86² = 0.828/0.740 = 1.12
F_critical(7,7,0.05) = 3.79
Since F < F_critical, assume equal variances
Calculate Pooled Standard Deviation
s_pooled = √[(s₁²(n₁-1) + s₂²(n₂-1)) / (n₁+n₂-2)]
s_pooled = √[(0.91²×7 + 0.86²×7) / (8+8-2)]
s_pooled = √[(5.80 + 5.18) / 14]
s_pooled = √[10.98 / 14] = 0.885%
Calculate t-statistic
t = (x̄₁ - x̄₂) / (s_pooled × √(1/n₁ + 1/n₂))
t = (79.01 - 82.95) / (0.885 × √(1/8 + 1/8))
t = -3.94 / (0.885 × √0.25)
t = -3.94 / (0.885 × 0.5)
t = -8.90
Find Critical Value and p-value
Degrees of freedom: df = n₁ + n₂ - 2 = 14
Critical value: t₀.₀₂₅,₁₄ = ±2.145
p-value: p < 0.001 (highly significant)
Make Decision
Since |t| = 8.90 > 2.145 and p < 0.001 < 0.05:
Decision: Reject H₀
Conclusion: There is strong evidence that Formulation B has significantly higher dissolution rate than Formulation A (82.95% vs 79.01%, p < 0.001).
Equal variances: =T.TEST(array1, array2, 2, 2)
Unequal variances: =T.TEST(array1, array2, 2, 3)
F-test for variances: =F.TEST(array1, array2)
🔗 Paired T-Test
When to Use
Compare two measurements on the same subjects (e.g., before/after treatment, crossover studies, matched pairs).
Where: d̄ = mean difference, s_d = standard deviation of differences
Scenario: A crossover bioavailability study compares AUC values for test and reference formulations in 10 healthy volunteers.
Subject | Test AUC (ng·h/mL) | Reference AUC (ng·h/mL) | Difference (T-R) |
---|---|---|---|
1 | 125.3 | 128.7 | -3.4 |
2 | 134.8 | 132.1 | 2.7 |
3 | 118.2 | 121.5 | -3.3 |
4 | 142.6 | 139.8 | 2.8 |
5 | 127.9 | 125.3 | 2.6 |
6 | 136.4 | 134.7 | 1.7 |
7 | 129.1 | 131.8 | -2.7 |
8 | 145.2 | 143.9 | 1.3 |
9 | 122.8 | 126.2 | -3.4 |
10 | 138.7 | 136.5 | 2.2 |
Step-by-Step Solution:
State Hypotheses
H₀: μ_d = 0 (no difference between formulations)
H₁: μ_d ≠ 0 (formulations have different bioavailability)
α = 0.05 (two-tailed test)
Calculate Difference Statistics
Differences: -3.4, 2.7, -3.3, 2.8, 2.6, 1.7, -2.7, 1.3, -3.4, 2.2
Mean difference (d̄):
d̄ = (-3.4 + 2.7 + ... + 2.2) ÷ 10 = -0.15 ng·h/mL
Standard deviation of differences (s_d):
s_d = 2.84 ng·h/mL
Calculate t-statistic
t = d̄ / (s_d / √n)
t = -0.15 / (2.84 / √10)
t = -0.15 / (2.84 / 3.162)
t = -0.15 / 0.898
t = -0.167
Find Critical Value and p-value
Degrees of freedom: df = n - 1 = 9
Critical value: t₀.₀₂₅,₉ = ±2.262
p-value: p ≈ 0.871
Make Decision
Since |t| = 0.167 < 2.262 and p = 0.871 > 0.05:
Decision: Fail to reject H₀
Conclusion: There is no significant difference in bioavailability between the test and reference formulations (mean difference = -0.15 ng·h/mL, p = 0.871).
Function: =T.TEST(array1, array2, 2, 1)
Alternative approach:
- Create difference column: =B2-C2
- Calculate mean difference: =AVERAGE(difference_range)
- Calculate SD of differences: =STDEV.S(difference_range)
- Calculate t: =mean_diff/(sd_diff/SQRT(COUNT(difference_range)))
🏋️♂️ Practice Exercises
Scenario: A batch of tablets should contain 25 mg of active ingredient. Test the following sample:
Tasks:
- Perform a one-sample t-test (α = 0.05)
- Calculate 95% confidence interval for the mean
- Interpret results for regulatory compliance
Scenario: Compare dissolution rates between two production batches:
Tasks:
- Test for equal variances
- Perform appropriate two-sample t-test
- Draw conclusions about batch differences
Scenario: Test the stability of tablets stored under two different conditions using paired design:
Tasks:
- Perform paired t-test
- Calculate the effect size
- Recommend storage conditions
📋 Interpretation Guidelines
p-value Interpretation:
- p ≤ 0.001: Highly significant evidence
- 0.001 < p ≤ 0.01: Strong evidence
- 0.01 < p ≤ 0.05: Moderate evidence
- p > 0.05: Insufficient evidence
Effect Size Considerations:
Cohen's d = (x̄₁ - x̄₂) / s_pooled
- d = 0.2: Small effect
- d = 0.5: Medium effect
- d = 0.8: Large effect
Pharmaceutical Context:
- Consider clinical significance, not just statistical significance
- Report confidence intervals for practical meaning
- Consider regulatory requirements (e.g., ±10% for content uniformity)
- Account for measurement uncertainty and method validation