# Unconstrained Estimation of Multitype Car Rental Demand
## 2 Unconstrained Estimation
### Unconstrained Estimation Methods
#### 2.2.1 Expectation Maximization  
EM is one of the most common methods to restore incomplete data by using the iterative algorithm in statistics. The EM algorithm is mainly composed of two steps, E (expectation) and M (maximization)--that is, after initializing the parameters to be estimated through the observable incomplete data information, the conditional expectation of missing information in the incomplete data is calculated by parameter estimation, and the missing information is replaced accordingly. In step E, an expected log-likelihood function of complete data is obtained. In step M, the improved parameter values are obtained by using this function through the maximum likelihood estimation method. The whole process will be repeated until convergence [31].  
Considering the unconstrained demand \(X\) in \(\Delta t\) with the expectation \(\mu\) and variance \(\sigma^{2}\), the initial values are then  
\[\mu(i,t)^{(0)}=\frac{\sum\limits_{j=1}^{1}IB(i,j,t)I(i,j,t)}{\sum\limits_{j=1} ^{1}I(i,j,t)} \tag{1}\]  
\[\sigma^{2}(i,t)^{(0)}=\frac{\sum\limits_{t=1}^{1}\Bigl{\{}[IB(i,j,t)-\mu(i,t)^ {(0)}]I(i,j,t)\Bigr{\}}^{2}}{\sum\limits_{t=1}^{1}I(i,j,t)-1} \tag{2}\]  
When all data is constrained, \(\mu(i,t)\) and \(\sigma^{2}(i,t)\) cannot be initialized properly, and the repairing process is abandoned. Let the unconstrained preliminary estimation value be equal to the increment of the observed value; then, the unconstrained estimation value after \(k\) iterations will be  
\[IU(i,j_{j},t)^{(k)}=IB(i,j,t)+IU(i,j,t)^{(k-1)} \tag{3}\]  
When only one set of data is constrained, \(\sigma^{2}(i,t)\) initialization is abandoned, and the convergence is tested directly by \(\mu(i,t)\). The \(k\)th iteration is divided into two steps.  
Step E: unconstrained estimation value is  
\[IU(i,j,t)^{(k)}=\text{E}[X|X\geq IU(i,j,t)^{(k-1)}]=\frac{\int_{IU(ij,j)^{(k-1 )}}^{\infty}xf(x)\text{d}x}{\int_{IU(ij,j)^{(k-1)}}^{\infty}f(x)\text{d}x} \tag{4}\]where \(f(x)\) is the normal probability density function, and \(IU(i,j,t)^{(0)}=IB(i,j,t)\) when \(k=0\).  
Step M: find the partial derivative of the log-likelihood function \(Q(\mu,\sigma^{2})\) versus \(\mu(i,t)^{(k-1)}\) and \(\sigma^{2}(i,t)^{(k-1)}\), and let them equal 0 to calculate the re-estimated \(\widehat{\mu}\) and \(\widehat{\sigma}^{2}\).  
\[Q(\mu,\sigma^{2})=\ln L(\mu,\sigma^{2})=-\frac{\mathrm{J}}{2}\ln 2\pi- \mathrm{J}\ln\sigma-\frac{\sum\limits_{j=1}^{\mathrm{J}}\left[IB(i,j,t)-\mu \right]^{2}I(i,j,t)+\sum\limits_{j=1}^{\mathrm{J}}\left[IB(i,j,t)-\mu\right]^{ 2}\left[1-I(i,j,t)\right]}{2\sigma^{2}} \tag{5}\]  
\[\widehat{\mu}=\mu(i,t)^{(k)}=\frac{1}{\mathrm{J}}\left\{\sum\limits_{j=1}^{ \mathrm{J}}IB(i,j,t)I(i,j,t)+\sum\limits_{j=1}^{\mathrm{J}}IU(i,j,t)^{(k-1)} \left[1-I(i,j,t)\right]\right\} \tag{6}\]  
\[\widehat{\sigma}^{2}=\sigma^{2}(i,t)^{(k)}=\frac{1}{\mathrm{J}-1}\left\{\sum \limits_{j=1}^{\mathrm{J}}\left[IB(i,j,t)-\mu(i,t)^{(k-1)}\right]^{2}I(i,j,t)+ \sum\limits_{j=1}^{\mathrm{J}}\left[IU(i,j,t)^{(k-1)}-\mu(i,t)^{(k-1)}\right] ^{2}\left[1-I(i,j,t)\right]\right\} \tag{7}\]  
Convergence condition: the operation should be stopped when \(\left|\mu(i,t)^{(k)}-\mu(i,t)^{(k-1)}\right|\leq\varepsilon\) or \(\left|\sigma^{2}(i,t)^{(k)}-\sigma^{2}(i,t)^{(k-1)}\right|\leq\varepsilon\), where \(\varepsilon\) is any small given number. Otherwise, go back to step E and continue iterating.