## 2 Statistical Modeling and Some Theoretical Results
### Analysis of Covariance (ANCOVA)  
Let \(\mathbf{\theta}=(\mu_{E},\mu_{C},\gamma)\). Then, assuming model (1) is correctly specified, the ordinary least squares estimator \(\widehat{\mathbf{\theta}}=(\widehat{\mu}_{E},\widehat{\mu}_{C},\widehat{\gamma})\) for \(\mathbf{\theta}\) is obtained using linear model theory [13] as  
\[ \begin{array}{ll}\widehat{\mu}_{E}&=\overline{Y}_{E}-\widehat{\gamma} \overline{x}_{E}\\ \widehat{\mu}_{C}&=\overline{Y}_{C}\\ \widehat{\gamma}&=S_{xy}/S_{xx}\end{array}  \tag{2}\]  
where \(S_{xy}=\sum_{i=1}^{n/2}(x_{i}-\overline{x}_{E})\big{(}Y_{i}-\overline{Y}_{E} \big{)}\) and \(S_{xx}=\sum_{i=1}^{n/2}(x_{i}-\overline{x}_{E})^{2}\). By [PERSON] theorem, \(\widehat{\mathbf{\theta}}\) is best linear unbiased estimator of \(\mathbf{\theta}\), i.e., \(\widehat{\mathbf{\theta}}\) has smallest variance among all linear unbiased estimators. The variance-covariance matrix of \(\mathbf{\theta}\) is  
\[\text{var}\Big{(}\widehat{\mathbf{\theta}}\Big{)}=\sigma^{2} \begin{pmatrix}\frac {2}{n}+\frac{\overline{x}_{E}^{2}}{S_{xx}}&0&-\frac{\overline{x}_{E}}{S_{xx}} \\ 0&\frac{2}{n}&0\\ -\frac{\overline{x}_{E}}{S_{xx}}&0&\frac{1}{S_{xx}}\end{pmatrix} . \tag{3}\]  
**Inference on \(\Delta_{0}=\mu_{E}-\mu_{C}\)**  
The point estimate of \(\Delta_{0}=\mu_{E}-\mu_{C}\) is \(\widehat{\Delta}_{0}=\widehat{\mu}_{E}-\widehat{\mu}_{C}\), where \(\widehat{\mu}_{E}\) and \(\widehat{\mu}_{C}\) are from Equation (2). Note that \(\widehat{\Delta}_{0}\) follows a normal distribution with mean \((\mu_{E}-\mu_{C})\) and variance  
\[\text{var}(\widehat{\mu}_{E}-\widehat{\mu}_{C})=\sigma^{2}\Bigg{(}\frac{4}{n} +\frac{\overline{x}_{E}^{2}}{S_{xx}}\Bigg{)}. \tag{4}\]  
In practice, the error variance \(\sigma^{2}\) is unknown, as it is estimated using a residual sum of squares obtained from model (1), as  
\[\widehat{\sigma}^{2}=\frac{1}{n-3}\sum_{i=1}^{n}\Big{(}Y_{i}-\widehat{Y}_{i} \Big{)}^{2} \tag{5}\]  
where \(\widehat{Y}_{i}=\widehat{\mu}_{E}+\widehat{\gamma}x_{i}\), if the \(i\)th subject is in group \(E\), or \(\widehat{Y}_{i}=\widehat{\mu}_{C}\), if the \(i\)th subject is in group \(C\). The right-hand side of Equation (5) is essentially the sum of squared residuals divided by the degrees of freedom; the \(i\)th residual \(Y_{i}-\widehat{Y}_{i}\) represents the difference between the \(i\)thactual and linear model-fitted observations. From the classical linear model theory [13], \(\widehat{\sigma}^{2}\) in Equation (5) is an unbiased estimator of \(\sigma^{2}\) and \(\frac{(n-3)\widehat{\sigma}^{2}}{\sigma^{2}}\) follows a chi-square distribution with \(n-3\) degrees of freedom. This provides a basis for constructing statistical tests and estimators. For instance, for testing \(H_{0}:\mu_{E}-\mu_{C}=0\), we use a test statistic  
\[t=\frac{\overline{Y}_{E}-\overline{Y}_{C}-\widehat{\gamma}\overline{x}_{E}}{ \widehat{\sigma}\sqrt{\frac{4}{n}+\frac{\overline{x}_{E}^{2}}{S_{xx}}}}, \tag{6}\]  
which, under \(H_{0}\), follows a standard \(t\)-distribution with \(n-3\) degrees of freedom. \(H_{0}\) is rejected at significance level \(\alpha\), if \(|t|>t_{a/2,n-3}\), where \(t_{a/2,n-3}\) is the upper \(\alpha/2\) percent point of the \(t\) distribution with \(n-3\) degrees of freedom. A \(100(1-\alpha)\%\) confidence interval for \(\mu_{E}-\mu_{C}\) can be obtained as  
\[\overline{Y}_{E}-\overline{Y}_{C}-\widehat{\gamma}\overline{x}_{E}\pm t_{a/2,n-3}\widehat{\sigma}\sqrt{\frac{4}{n}+\frac{\overline{x}_{E}^{2}}{S_{xx}}} \tag{7}\]  
**Inference on the linear slope \(\gamma\)**  
From Equation (2), the point estimate of \(\gamma\) is obtained as \(\widehat{\gamma}=S_{xy}/S_{xx}\), where \(S_{xy}=\sum_{i=1}^{n/2}(x_{i}-\overline{x}_{E})\big{(}Y_{i}-\overline{Y}_{E} \big{)}\) and \(S_{xx}=\sum_{i=1}^{n/2}(x_{i}-\overline{x}_{E})^{2}\).