I'll break down the process for testing equivalence between manual and digital measurements using two one-sided t-tests (TOST - Two One-Sided Tests) procedure.
Equivalence Testing Methodology
Key Concepts:
Null Hypothesis (H0): The difference between methods is NOT within an acceptable range
Alternative Hypothesis (Ha): The difference IS within a predefined acceptable range
Steps:
Define Equivalence Margins
Establish ±Δ (delta) - acceptable difference range
Typically based on:
Clinical significance
Measurement precision
Practical limitations
Two One-Sided T-Tests
Test 1: Is the lower bound of the confidence interval > -Δ?
Test 2: Is the upper bound of the confidence interval < +Δ?
Statistical Procedure:
python
def equivalence_test(manual, digital, delta):
# Calculate mean difference
mean_diff = np.mean(digital - manual)
# Perform paired t-test
t_stat_lower, p_lower = scipy.stats.ttest_1samp(digital - manual, -delta)
t_stat_upper, p_upper = scipy.stats.ttest_1samp(digital - manual, delta)
# Both p-values must be < significance level (typically 0.05)
if p_lower < 0.05 and p_upper < 0.05:
return "Methods are equivalent"
else:
return "Methods are not equivalent"
Practical Example:
python
import numpy as np
import scipy.stats
# Sample measurements
manual_measurements = [10.2, 11.5, 9.8, 10.3, 10.7]
digital_measurements = [10.1, 11.4, 9.9, 10.2, 10.6]
# Define acceptable difference
delta = 0.5 # ±0.5 units considered equivalent
# Perform equivalence test
def equivalence_test(manual, digital, delta):
differences = digital - manual
# One-sided t-tests
t_lower, p_lower = scipy.stats.ttest_1samp(differences, -delta)
t_upper, p_upper = scipy.stats.ttest_1samp(differences, delta)
print(f"Lower bound p-value: {p_lower}")
print(f"Upper bound p-value: {p_upper}")
# Both p-values must be < 0.05 to conclude equivalence
if p_lower < 0.05 and p_upper < 0.05:
return "Methods are equivalent"
else:
return "Methods are not equivalent"
result = equivalence_test(manual_measurements, digital_measurements, delta)
print(result)
Considerations:
Sample Size: Larger samples increase test reliability
Delta Selection: Critical for meaningful results
Assumptions:
Normally distributed differences
Paired/coordinated samples
Consistent measurement conditions
Advantages:
Directly tests practical equivalence
Accounts for both statistical and practical significance
Provides clear decision criteria
Potential Pitfalls:
Sensitive to delta selection
Assumes normality
Can be overly conservative
Recommended Process:
Define scientific/practical equivalence range
Collect paired measurements
Perform TOST procedure
Interpret results considering context
Would you like me to elaborate on any specific aspect of equivalence testing?