Example usage:

  Blog    |     February 07, 2026

To identify inconsistencies in a "Fake QC Report," we need to analyze the data for logical errors, deviations from standards, or impossible values. Below is a step-by-step approach to detect such issues, followed by an example and a Python solution.

Key Inconsistencies to Check:

  1. Tolerance Violations:

    • Measurements outside the specified tolerance range should be marked as "Fail," not "Pass."
    • Measurements within tolerance should be marked as "Pass," not "Fail."
  2. Impossible Values:

    • Negative measurements (unless allowed by context).
    • Temperatures below absolute zero (-273.15°C).
    • Zero or negative time/duration values.
    • Measurements exceeding physical limits (e.g., length > 1000mm for a 100mm component).
  3. Data Integrity Issues:

    • Missing critical fields (e.g., Measurement, Tolerance, Status).
    • Non-numeric values in numeric fields.
    • Duplicate or invalid Product IDs.
    • Inconsistent units (e.g., mixing mm and cm without conversion).
  4. Logical Errors:

    • All products passing/failing without reason.
    • Measurements clustered exactly at tolerance limits (suggests fabrication).
    • Statuses contradicting tolerance rules.

Example Fake QC Report:

Product ID Measurement (mm) Tolerance (mm) Status Notes
P001 5 ±0.2 Pass Within [10.3, 10.7]
P002 7 ±0.2 Pass Within [10.3, 10.7]
P003 3 ±0.2 Fail Should be Pass (at limit)
P004 8 ±0.2 Pass Should be Fail (outside)
P005 -5.0 ±0.2 Fail Impossible negative value
P006 4 ±0.2 Pass Valid
P007 5 ±0.2 Pass Valid

Inconsistencies:

  • P003: Measurement 3 is within tolerance (5 ± 0.2) but marked "Fail."
  • P004: Measurement 8 exceeds tolerance (>10.7) but marked "Pass."
  • P005: Negative measurement (-5.0) is physically impossible.

Python Solution:

def detect_fake_qc(report):
    fake_ids = []
    tolerance_range = 0.2  # ±0.2 mm
    nominal = 10.5  # Nominal value from the report
    for record in report:
        id = record['id']
        measurement = record['measurement']
        status = record['status']
        # Check for impossible values
        if measurement < 0:
            fake_ids.append(id)
            continue
        # Check tolerance compliance
        lower_bound = nominal - tolerance_range
        upper_bound = nominal + tolerance_range
        if lower_bound <= measurement <= upper_bound:
            expected_status = "Pass"
        else:
            expected_status = "Fail"
        # Compare with reported status
        if status != expected_status:
            fake_ids.append(id)
    return fake_ids
qc_report = [
    {'id': 'P001', 'measurement': 10.5, 'status': 'Pass'},
    {'id': 'P002', 'measurement': 10.7, 'status': 'Pass'},
    {'id': 'P003', 'measurement': 10.3, 'status': 'Fail'},  # Should be Pass
    {'id': 'P004', 'measurement': 10.8, 'status': 'Pass'},  # Should be Fail
    {'id': 'P005', 'measurement': -5.0, 'status': 'Fail'}, # Impossible value
    {'id': 'P006', 'measurement': 10.4, 'status': 'Pass'},
    {'id': 'P007', 'measurement': 10.5, 'status': 'Pass'}
]
fake_products = detect_fake_qc(qc_report)
print("Fake Product IDs:", fake_products)  # Output: ['P003', 'P004', 'P005']

Output:

Fake Product IDs: ['P003', 'P004', 'P005']

Explanation:

  1. P003: Fails because 3 is within tolerance but marked "Fail."
  2. P004: Fails because 8 exceeds tolerance but marked "Pass."
  3. P005: Fails due to the impossible negative measurement.

This solution systematically checks for tolerance violations and impossible values. For real-world


Request an On-site Audit / Inquiry

SSL Secured Inquiry