Bias can occur in diagnostic testing when the test results are systematically different from the true values.