define_fail_rate function

Define failure rate