Estimators for Bernoulli trials I have failure data for an experience over  $T$  years: at the beginning of each year I have $n_t$ subjects and $d_t$ of these subjects experience a "failure" at the end of the year. 
Now if I assume that the trials are iid Binomial and the probability of failure $p$ is homogenous (i.e. constant over time), the ML estimator is given by
$$\hat{p}=\frac{\sum\limits_{i=1}^T d_t}{\sum\limits_{i=1}^T n_t}$$  
However, there is an alternate estimator:
$$\bar{p}=\frac{1}{T}\sum\limits_{i=1}^T \frac{d_t}{n_t}.$$ 
What would be the assumptions and the model so that the estimate is $\bar{p}$? 
===========================
EDIT:
The question is not about the relative merits of the two estimators. For example, it is not necessary to assume homogeneity for the second estimator. I am wondering about the assumptions that would "naturally" lead to the second estimator. 
===========================
EDIT2:
I am in a situation where $\bar{p}$ is imposed as an estimator. I need to come up with confidence intervals or credible intervals for the estimate. My idea was to determine the assumptions (possibly a hierarchical model) and do a MCMC using JAGS...
 A: Your model for estimator $\hat{p}$ is actually of a single system that was operated $n_i$ times in year $i$, $1 \leq i \leq T$, and failed $d_i$ times that year. Presumably the system was successfully repaired and restored to perfect working
condition before the next time it was operated.
Your model for estimator $\bar{p}$ is that of $n_i$ independent 
copies of Model $i$ of
the system being put in operation in year $i$ and $d_i$ of those copies
failing independently.  You wish to estimate the average failure rate 
per year over $T$ years. 
A: I believe both can be considered as estimators of $p$ for the same model under different 'estimating equations'. It $appears$ to me that both estimators have the same mean (see the discussion below). Therefore, I don't think biasedness is a useful criteria to pick one. Let me define $N:=\sum_{t=1}^T n_t$, then
$$\hat p = \sum_{t=1}^T \frac{d_t}{N} =\sum_{t=1}^T \frac{n_t}{N}\frac{d_t}{n_t} .$$
Therefore, if $n_t$ does not change much over time, $\frac{n_t}{N} \approx \frac{1}{T}$, the estimators will be very similar. But if this values are different, they will differ of course. Check the following R code for an illustration.
ss = c(10,50)
e1 = function(x) return(sum(x)/sum(ss))
e2 = function(x) return(mean(x/ss))
e1v = e2v = rep(0,100)
for(j in 1:100){
    x = rbinom(length(ss), size = ss, 0.5)
    e1v[j] = e1(x)
    e2v[j] = e2(x)
}
plot(e1v-e2v,type='l',col='red')
plot(e1v,type='l',col='red',ylim=c(0.2,0.8))
points(e2v,type='l',col='blue')

Second code
ss = seq(10,20,1)
e1 = function(x) return(sum(x)/sum(ss))
e2 = function(x) return(mean(x/ss))
e1v = e2v = rep(0,10000)
for(j in 1:10000){
x = rbinom(length(ss), size = ss, 0.5)
e1v[j] = e1(x)
e2v[j] = e2(x)
}

c(quantile(e1v,0.025),quantile(e1v,0.975))
 hist(e1v)

 c(quantile(e2v,0.025),quantile(e2v,0.975))
 hist(e2v)

