Steady-state availability
It is the up time divided by the up time plus the down time, over a record long enough to hold many failures.
A supplier’s data sheet says the MTBF is 50,000 hours, the buyer reads “it will last almost six years”, and the first unit fails in month four. A manager hears that the plant has an availability of 99.8 percent, and the same week stock is lost because both compressors stopped together. A site has two failures in a year, calculates an MTBF, and builds a spares budget on a number that could be wrong by a factor of ten. Nobody lied: the numbers were correct and were asked to say more than they can. This lesson shows what MTBF, MTTR and availability mean, how to calculate them from a record, and how far to trust them. #MTBF #Availability #Reliability
By the end of this lesson, you will be able to:
The cold store of this course has two refrigeration compressors, one on duty and one on standby. In normal weather one compressor can hold the load, so when the duty compressor fails the standby takes over and the stock stays cold. In the hottest weeks both may be needed, and then there is no standby.
The owner asks three questions: how often does a compressor fail, how long is it out of service each time, and how much of the year is the store without cooling? The maintenance log holds five years of failures for one compressor, with the running hours at each failure and the hours to return it to service.
The first two questions lead to the MTBF and the MTTR. The third leads to availability, and it has a trap: the two compressors look like two independent chances, but they hang on one electrical supply and reject their heat through one condenser.
A repairable machine runs (up), fails, is repaired (down), and runs again.
The mean of the running times is the MTBF; the mean of the down times is the MTTR.
For a repairable item, add all the running hours in the record and divide by the number of failures:
The inverse is the failure rate,
The simple division is fully meaningful when the failure rate is constant: failures arrive at random and the machine gets neither better nor worse. If the rate changes, the MTBF is still the average of the record, but it describes neither its start nor its end.
With a constant failure rate, the probability of running for a time
Put
Times between random failures are very unequal: many short ones and a few very long ones. The long ones pull the mean up, as a few large salaries pull a mean salary above what most people earn. The median time between failures is
So an MTBF of 50,000 hours is not a promise of 50,000 hours. It is a failure rate of 1 in 50,000 per hour, written the other way up. Of 100 such units running all year (8,760 hours),
The MTTR is the mean of the down times. The difficulty is in what the down time includes. A stop of ten hours may contain forty minutes of work with tools.
A repair time that counts only diagnosis and hands-on work measures the machine and the skill of the technician. One that counts from the stop to the restart measures the whole organisation: how fast the fault is noticed, whether a person is on site, whether the part is on the shelf. Both are useful. Always state which one an MTTR is.
Repair times are also unequal: most are short and a few very long (the part that had to come from another country). Use the mean to calculate total downtime, and report the median and the longest beside it to show a typical stop and a bad one.
Availability is the fraction of the time that the machine is able to do its duty.
Steady-state availability
It is the up time divided by the up time plus the down time, over a record long enough to hold many failures.
The value depends on which MTTR goes in, and so availability has two common meanings.
Take a pump with an MTBF of 6,000 hours and an active repair time of 5 hours. Its inherent availability is
A supplier quotes inherent availability, which the supplier controls. An owner lives with operational availability. A number with no label is usually the more flattering one.
Availability also hides the pattern of the down time: 0.998 can be one stop of 17 hours a year or 100 stops of 10 minutes. A cold room survives the second and not the first. Always give the failure rate and the repair time beside the availability.
A record with 9 failures is a small sample. Run the same machine for the same five years again, and chance alone might give 5 failures or 14, with the MTBF moving to match. An honest report gives a range.
For a constant failure rate, the number of failures in a fixed time follows the Poisson distribution, which gives an exact interval through the chi-square distribution. Let
Confidence interval for the MTBF, record ended at a fixed time
scipy.stats.chi2.ppf(p, k).
If the record ends exactly at a failure, both limits use
Three things to know about this interval:
The interval covers only the scatter of chance under a constant rate, not a changing rate, incomplete records, or a failure never written down.
Units are in series, in the reliability sense, when the system needs all of them: a conveyor needs its motor, its gearbox and its belt. The system is up only when every unit is up, so for units that fail independently the availabilities multiply:
The same rule holds for reliability over a mission time:
Units are in parallel when either one can do the whole duty. The system is down only when both are down. For two independent units with unavailabilities
Two units each down 1 percent of the time give, by this formula, a system down 0.01 percent of the time. That large gain is the reason for a standby, and the place where the arithmetic is most often wrong.
The parallel formula multiplies two probabilities, which is correct only if the two units fail independently. In a real plant they share things. A shared thing that fails stops both units in the same moment, and redundancy inside the pair cannot help. This is a common-cause failure.
Typical shared causes are:
A shared item is in series with the parallel pair:
Once the pair is good, the shared items decide the result. A standby has one more limit: it must start when called. A standby idle for months can hold a fault nobody has seen, because nothing asked it to run.
MTBF.
✅
Failure rate.
Look at the times, not only the mean. The running hours between failures were 7,759, 383, 1,995, 612, 51, 6,965, 7,053, 561 and 8,802. Five of the nine are less than half the MTBF, and the other four are well above it. A mean of 4,667 hours describes no single run. ✅
A year with no failure.
MTTR. The nine down times add to 78.8 hours.
The median is 8.2 hours and the longest is 12.0 hours. This MTTR counts from stop to restart, with all waiting. ✅
Availability.
This is an operational availability for unplanned stops only, because the down times include the waiting and the record has no planned stops. ✅
Downtime a year. The unavailability is
Read it as events. Not 15.7 hours spread thinly through the year, but about 1.8 stops a year of about 9 hours each. ✅
Set up.
Chi-square values. From scipy,
Limits.
With 90 percent confidence the MTBF is between 2,674 and 8,945 hours. ✅
As failures a year.
Effect on availability. With the MTTR held at 8.76 hours, the availability at the two ends is 0.99674 and 0.99902: 27.4 and 8.2 hours of downtime a year. ✅
The true value. The record was generated with a true rate of 1.6 failures a year, an MTBF of
A shorter record. A record of 2 failures in one year gives an MTBF of 4,200 hours with an interval of 1,334 to 23,638 hours. The upper limit is 17.7 times the lower. Such a number cannot support a decision. ✅
A longer record. A record of 36 failures in twenty years gives the same 4,667 hours with an interval of 3,534 to 6,285 hours, a ratio of 1.8. To halve the width of the interval, the record needs about four times as many failures. ✅
One compressor.
Both down together.
✅
Availability of the pair.
The gain on paper. The standby divides the downtime by
Shared items.
System. The shared items are in series with the pair.
✅
Downtime.
The real gain. One compressor on the same shared items would be down
Calls on the standby. The duty compressor fails 1.80 times a year, so the standby is called 1.80 times a year. ✅
Calls that find no standby.
Expected failure cost with no standby fitted.
With a perfect standby.
With the standby as stated.
currency units a year. ✅
Perfect shared items. Set both shared availabilities to 1 and the system value returns to 0.9999965, the independent pair of Step 1. ✅
A standby that never starts. Set the start probability to 0 and the cost of Step 3 becomes
The script generates the compressor record, calculates the three numbers, the confidence interval and the standby case, and saves a plot of the record and of how the interval narrows as failures accumulate.
"""MTBF, MTTR and availability from a failure record, with a confidence interval and a standby unit."""import numpy as npfrom scipy.stats import chi2import matplotlib.pyplot as plt
YEAR = 8400.0 # running hours in a year at the site
def compressor_events(seed=8, years=5): """Failures of one compressor over five years: time of failure and hours of repair.""" rng = np.random.default_rng(seed) hours = years * YEAR n = rng.poisson(1.6 * years) t = np.sort(rng.uniform(0.0, hours, n)).round(0) repair = rng.lognormal(np.log(9.0), 0.8, n).round(1) return t, repair
def mtbf_interval(total_hours, n, confidence=0.90): """Two-sided interval for the MTBF of a constant-rate item, record ended at a fixed time.""" a = 1.0 - confidence lower = 2.0 * total_hours / chi2.ppf(1.0 - a / 2.0, 2 * n + 2) upper = 2.0 * total_hours / chi2.ppf(a / 2.0, 2 * n) return lower, upper
# ---------- Application 1: one compressor, five years ----------t, repair = compressor_events()T = 5 * YEARn = t.sizemtbf = T / nmttr = repair.mean()lam = 1.0 / mtbfA = mtbf / (mtbf + mttr)print("Application 1: one compressor, five years of record")print(f" failures at (h): {t.astype(int).tolist()}")print(f" repair times (h): {repair.tolist()}")print(f" hours between failures: {np.diff(np.concatenate([[0.0], t])).astype(int).tolist()}")print(f" {n} failures in {T:.0f} h: MTBF {mtbf:.0f} h, {lam * YEAR:.2f} failures a year")print(f" total repair {repair.sum():.1f} h, MTTR {mttr:.2f} h, " f"median {np.median(repair):.1f} h, longest {repair.max():.1f} h")print(f" availability {A:.5f} ({100 * A:.3f} %), unavailability {1 - A:.5f}")print(f" downtime a year: {(1 - A) * YEAR:.1f} h from the availability, " f"{repair.sum() / 5:.1f} h from the record")print(f" survive to the MTBF: {np.exp(-1.0):.3f}, a year with no failure: " f"{np.exp(-lam * YEAR):.3f}")lo, hi = mtbf_interval(T, n)print(f" chi-square values: {chi2.ppf(0.95, 2 * n + 2):.2f} (20 degrees of freedom), " f"{chi2.ppf(0.05, 2 * n):.2f} (18)")print(f" 90 % interval for the MTBF: {lo:.0f} to {hi:.0f} h")print(f" as failures a year: {YEAR / hi:.2f} to {YEAR / lo:.2f}")A_lo, A_hi = lo / (lo + mttr), hi / (hi + mttr)print(f" availability at the ends of the interval: {A_lo:.5f} to {A_hi:.5f}, " f"downtime {(1 - A_hi) * YEAR:.1f} to {(1 - A_lo) * YEAR:.1f} h a year")for k, years in ((2, 1), (9, 5), (36, 20)): l2, h2 = mtbf_interval(years * YEAR, k) print(f" a record of {k:2d} failures in {years:2d} {'year' if years == 1 else 'years'}: MTBF {years * YEAR / k:.0f} h, " f"interval {l2:.0f} to {h2:.0f} h (ratio {h2 / l2:.1f})")
zero = 2.0 * YEAR / chi2.ppf(0.90, 2)print(f" a year with no failure at all: 90 % sure only that the MTBF is above {zero:.0f} h")
# ---------- Application 2: duty and standby ----------U = 1.0 - Aprint("Application 2: duty and standby compressors")print(f" one compressor: unavailability {U:.6f}, {U * YEAR:.1f} h a year")U_pair = U * Uprint(f" two independent compressors: unavailability {U_pair:.3e}, " f"availability {1 - U_pair:.7f}, {U_pair * YEAR * 60:.1f} min a year")print(f" gain from the standby if independent: {U / U_pair:.0f} times")H_POWER, H_COND = 4.0, 6.0 # shared items: hours a year out of serviceA_power, A_cond = 1.0 - H_POWER / YEAR, 1.0 - H_COND / YEARA_sys = A_power * A_cond * (1.0 - U_pair)print(f" shared supply {A_power:.6f}, shared condenser {A_cond:.6f}")print(f" system with shared items: availability {A_sys:.6f}, " f"{(1 - A_sys) * YEAR:.2f} h a year")print(f" real gain over one compressor on the same shared items: " f"{(1 - A_power * A_cond * A) / (1 - A_sys):.1f} times")print(f" share of system downtime from the shared items: " f"{100 * (1 - A_power * A_cond) / (1 - A_sys):.1f} %")P_START = 0.95 # chance that the standby takes the load when calledcalls = lam * YEARno_cooling = calls * (1.0 - P_START)print(f" calls on the standby: {calls:.2f} a year; with a start chance of {P_START}: " f"{no_cooling:.3f} a year find no standby, one in {1 / no_cooling:.1f} years")C_NO, C_YES = 380000.0, 150000.0 # cost of a failure without and with the standbyprint(f" expected failure cost a year: no standby {calls * C_NO:,.0f}, " f"perfect standby {calls * C_YES:,.0f}, " f"standby that starts 95 % of the time " f"{calls * (P_START * C_YES + (1 - P_START) * C_NO):,.0f}")
# ---------- Plot ----------fig, ax = plt.subplots(2, 1, figsize=(8, 8))ax[0].vlines(t, 0.0, repair, linewidth=3)ax[0].set_xlim(0.0, T)ax[0].set_xlabel("running hours")ax[0].set_ylabel("repair time (h)")ax[0].set_title("Compressor failures over five years")ks = np.arange(1, 41)lows = np.array([mtbf_interval(k * mtbf, k)[0] for k in ks]) / mtbfhighs = np.array([mtbf_interval(k * mtbf, k)[1] for k in ks]) / mtbfax[1].fill_between(ks, lows, highs, alpha=0.3)ax[1].axhline(1.0, color="gray", linewidth=0.8, linestyle="--")ax[1].axvline(n, color="black", linewidth=0.8)ax[1].set_ylim(0.0, 4.0)ax[1].set_xlabel("number of failures in the record")ax[1].set_ylabel("90 % interval / estimated MTBF")ax[1].set_title("How the interval narrows with more failures")fig.tight_layout()fig.savefig("availability.png", dpi=120)print("Saved availability.png")Expected output
Application 1: one compressor, five years of record failures at (h): [7759, 8142, 10137, 10749, 10800, 17765, 24818, 25379, 34181] repair times (h): [7.1, 12.0, 11.1, 2.4, 12.0, 8.2, 7.4, 7.9, 10.7] hours between failures: [7759, 383, 1995, 612, 51, 6965, 7053, 561, 8802] 9 failures in 42000 h: MTBF 4667 h, 1.80 failures a year total repair 78.8 h, MTTR 8.76 h, median 8.2 h, longest 12.0 h availability 0.99813 (99.813 %), unavailability 0.00187 downtime a year: 15.7 h from the availability, 15.8 h from the record survive to the MTBF: 0.368, a year with no failure: 0.165 chi-square values: 31.41 (20 degrees of freedom), 9.39 (18) 90 % interval for the MTBF: 2674 to 8945 h as failures a year: 0.94 to 3.14 availability at the ends of the interval: 0.99674 to 0.99902, downtime 8.2 to 27.4 h a year a record of 2 failures in 1 year: MTBF 4200 h, interval 1334 to 23638 h (ratio 17.7) a record of 9 failures in 5 years: MTBF 4667 h, interval 2674 to 8945 h (ratio 3.3) a record of 36 failures in 20 years: MTBF 4667 h, interval 3534 to 6285 h (ratio 1.8) a year with no failure at all: 90 % sure only that the MTBF is above 3648 hApplication 2: duty and standby compressors one compressor: unavailability 0.001873, 15.7 h a year two independent compressors: unavailability 3.507e-06, availability 0.9999965, 1.8 min a year gain from the standby if independent: 534 times shared supply 0.999524, shared condenser 0.999286 system with shared items: availability 0.998806, 10.03 h a year real gain over one compressor on the same shared items: 2.6 times share of system downtime from the shared items: 99.7 % calls on the standby: 1.80 a year; with a start chance of 0.95: 0.090 a year find no standby, one in 11.1 years expected failure cost a year: no standby 684,000, perfect standby 270,000, standby that starts 95 % of the time 290,700Saved availability.png1. A borehole pump ran 30,000 hours in a record that holds 6 failures. The down times add to 54 hours, counted from stop to restart. Find the MTBF, the MTTR, the availability and the downtime in a year of 8,400 hours.
MTBF
2. A conveyor needs its motor, its gearbox and its belt. Their availabilities are 0.995, 0.990 and 0.985. Find the availability of the conveyor and its downtime in a year of 8,400 hours.
3. A machine has an MTBF of 3,000 hours. The active repair takes 4 hours on average, and each stop also waits 20 hours on average for a technician to arrive. Find the inherent and the operational availability, and the downtime a year of 8,400 hours for each.
Inherent:
4. A generator has 4 failures in a record of 16,800 running hours that ended at a fixed date. Assume a constant failure rate. Find the MTBF and its 90 percent confidence interval. Use
MTBF
5. Two identical pumps are in parallel, and either can do the duty. Each has an availability of 0.98. Find the availability of the pair if they are independent. Then find it if both are fed from one supply with an availability of 0.999, and give the downtime in a year of 8,400 hours for both cases.
Independent:
A data sheet gives an MTBF of 50,000 hours, almost six years. A site puts 100 new units into service and runs them all year, 8,760 hours. With a constant failure rate, about how many fail in the first year?
Each dot is one machine. All 100 start new at the same moment and each runs until its first failure, at a time drawn from a constant failure rate. The curve counts the machines that still run. Stop at the MTBF: 63 have failed. A few machines run three, four or five times the MTBF, and those long lives pull the mean up to the MTBF while most lives are shorter.
The cold store of Application 2, in a year of 8,400 hours. The shared supply and the shared condenser are in series with the pair, so their hours are lost whatever the compressors do. Set both shared items to zero to see the gain on paper. Set the compressor worse, and the pair still loses little: the shared items decide the result.
Three questions. Each wrong choice is a mistake people really make, so read the note after you answer.
1. A fan has an MTBF of 2,000 running hours. Each repair takes 6 hours of work, and each stop also waits 30 hours on average for the part. What availability does the owner live with?
2. Two identical pumps are in parallel, and either can do the duty. Each pump is down 84 hours a year, and both take power from one supply that is down 8 hours a year. About how many hours a year is there no pumping?
3. A machine had 3 failures in two years (16,800 running hours). After a change of oil it had 1 failure in the next year (8,400 hours). The manager says the change raised the MTBF from 5,600 to 8,400 hours. What do you say?
No comments yet. Questions, results from your own build, a better way to explain it: all welcome.
Kept on this device only. Nothing is sent anywhere.
Tip: select words in the lesson, or tap a figure or an equation, to put a note right there.
The lesson has changed and these words are no longer in it. Your notes are kept, with the words you chose.