# Survival Function vs. Hazard Function

I have number of water tanks, I want to calculate the probability that a water tank of age $$a=i$$ is leaking, $$L(a=i)$$

I calculate the conditional probability $$l(a)$$, of a water tank leaking given that it hasn't leaked previously as a function of age and then compute

$$L(i) = l(i-1) + [1-l(i-1)]\times l(i)$$,

The probability a tank is leaking at age $$i$$

I posted a recent question on how best to calculate $$l(a)$$ and I was pointed in the direction of survival analysis. I've computed the Survival function and the Hazard but I have now confused myself as to how these relate to the above.

If the survival function in the context of this question gives the probability that a leak has not yet occured at age $$i$$, $$S(i) = P(a>i)$$, then is

$$L(i)=1-S(i)$$, the probability that a leak has occured at $$a\leq i$$?

If the Hazard function, $$h(i)$$, in this context gives, for a tank that has not leaked at age $$i$$, the probability that it will not leak until age $$i+di$$, then is

$$h(i) = l(i)$$?

and if my understanding is incorrect, then how do I relate survival analysis to my problem in order to calculate $$L(i)$$, the probability that a tank is leaking at age $$i$$