Understanding survival at time function This question is related to a few others (Here,Here) on the topic as I have been searching for information. Hopefully this one is sufficient.
1) I am seeing differences in the relationship between survival at time t, S(t) and the hazard at time t, h(t).
In Singer and Willet page 337 (10.5) they define the estimated survival $\hat{S}(t_{j})$ = $[1-\hat{h}(t_{j})][1-\hat{h}(t_{j-1})][1-\hat{h}(t_{j-2})]....[1-\hat{h}(t_{1})]$. They also define a life table as such:

In other sources Will Potts and others, they define $\hat{S}(t)$=$\prod_{t_{j}< t}(1-h(t_{j}))$ implying that the value of the hazard at time t is not included in the calculation for Survival at time t.
Which is correct? Is the difference in how the life table is set up?
2) How would you calculate the mean time time (restricted since there is censoring at the end of the collection period). Would you sum all $\hat{S}(t)$ (including the 1 at time zero) to arrive at 7.7? You always her it is the "area under the survival curve".
3) How would you calculate the residual mean lifetime for those that survived to the end of, say year 4? Is it summing all $\hat{S}(t)$ from 0.6209 through 0.41123 divided by 0.6209
Using the fact that the formula for the mean residual survival time mrl(u)  = E(T -u | T>u) is given by $\frac{1}{S(u)}\int_u^{\infty} S(t)\, dt$ and our "u" is 4 here (since we are saying T>4 in the conditional expectation)?
 A: I give some elements for 1 and 2 and I let the residual survival time  for you ;-) 
You can get more details by googling "grouped survival data" or something like that...
(Take care of distinguishing between "grouped" and "clustered"!)
1
Let $h(t_j)$ be the probability that a teacher employed at the beginning of the year $t_{j - 1}$ left during the year: 
$h(t_j) = \Pr[T < t_j \mid T \geq t_{j - 1}]; \hspace{0.75cm} j = 1, 2, \ldots$
As for the survival function at $t_j$, we have
$S(t_j) = \Pr(T \geq t_1) \Pr(T \geq t_2 \mid T \geq t_1) \ldots \Pr(T \geq  t_j \mid T \geq t_{j - 1})$
$\phantom{S(t_j) } = (1 - h(t_1)) (1 - h(t_2)) \ldots (1 - h(t_j))$
which is your first formula. 
For example
$\hat{S}(t_3) = (1 - \hat{h}(t_1)) (1 - \hat{h}(t_2)) (1 - \hat{h}(t_3))$
$\phantom{S(t_3)} = (1 - 0.1157) (1 - 0.1102) (1 - 0.1158) = 0.6957$
Now, $S(.)$ is constant between two $t_j$'s and therefore
$S(t) = \prod_{t_j \leq t} (1 - h(t_j))$
which should be your second formula.
For example, $\hat{S}(t) = 0.6957$ for all $t \in [t_3, t_4)$.
2
$\hat{S}(t_6)=0.5189$ and $\hat{S}(t_7)=0.4877$. Therefore, the median survival time is $t_7$, i.e., the year at which $50 \%$ of the teachers have already left.
A: I believe you are correct in questioning the Potts' citation (which I took the liberty of using as my template for editing the expression in your question). Looking at both Therneau and Gramsch "Modeling Survival Data" and Kalbfleisch and Prentice "Statistical Analysis of Failure Time Data", the definition of S(t) is Pr(T>t) and all of their interval survival estimates are closed on the right ... so it should be $\hat{S}(t)$=$\prod_{t_{j} \leq t}(1-\hat{h}(t_{j}))$. Any other interpretation would either leave vacant all of the interval between time_0 and the first event or would assign it a lower probability than unity. Either choice seems counter-factual.
A: Let us take your example of those who lasted at least four years, and then look at the residual mean lifetime.  
$295$ of those left in the time interval $[4,5)$, which means that these lasted strictly less than five years, i.e. they did not last a full further year.  
By including $0.6209$ in the sum in the numerator of your calculation, you are treating them as all lasting the full fifth year, when in fact they all left earlier in that year. Similarly with all the other years.  So your method is biased upwards.
If you wanted to adjust for this bias and you thought that teachers left on average a quarter of the way through the year, you could take your method and subtract $0.75$ from the final result, or you could leave out the initial term in the sum in the numerator of your calculation and add $0.25$ to the final result.  Both methods come to the same answer.    
