Missing Value (notes for myself)

Jul 19, 2025·
Shonn Cheng
Shonn Cheng
· 4 min read

p.16-17

Introduction

This part explains the detailed steps of calculating Little’s test statistic to check for the Missing Completely at Random (MCAR) assumption, as described in the provided example. The test is based on comparing the means of observed and missing data patterns, with the computation of the test statistic TLT_L and its interpretation.

Step 1: Define the Grand Means and Covariance Matrix

From the given example, the maximum likelihood estimates of the grand means μ\mu and the variance-covariance matrix Σ\Sigma are as follows:

μ^=[20.3114.29],Σ^=[27.2713.8013.8036.15] \hat{\mu} = \begin{bmatrix} 20.31 \\ 14.29 \end{bmatrix}, \quad \hat{\Sigma} = \begin{bmatrix} 27.27 & -13.80 \\ -13.80 & 36.15 \end{bmatrix}
  • 20.31 is the mean of the first variable (denoted as v1v_1), i.e., the average value for the first variable across all observations.

  • 14.29 is the mean of the second variable (denoted as v2v_2), i.e., the average value for the second variable across all observations.

  • 27.27 is the variance of the first variable (v1v_1), representing the spread of values for the first variable.

  • 36.15 is the variance of the second variable (v2v_2), representing the spread of values for the second variable.

  • -13.80 is the covariance between the first and second variables. This tells us how the two variables vary together. A negative value indicates that as one variable increases, the other tends to decrease.

These are the benchmarks against which we compare the pattern-specific means for the observed data.

Step 2: Define the Pattern-Specific Means

There are two missing data patterns in the dataset, represented by the two groups. For this example, the two groups have the following arithmetic means:

Group 1 (for v1=2,v2=1v_1 = 2, v_2 = 1):

Y1=[23.2712.79] \mathbf{\overline{Y}}_1 = \begin{bmatrix} 23.27 \\ 12.79 \end{bmatrix}

Group 2 (for v1=2,v2=0v_1 = 2, v_2 = 0):

Y2=[17.19NA] \mathbf{\overline{Y}}_2 = \begin{bmatrix} 17.19 \\ {NA} \end{bmatrix}

Step 3: Compute the Test Statistic

The formula for the test statistic TLT_L is as follows:

TL=g=1Gng(Ygμg)Σ1(Ygμg) T_L = \sum_{g=1}^{G} n_g \left( \mathbf{Y}_g - \mu_g \right)^\top \Sigma^{-1} \left( \mathbf{Y}_g - \mu_g \right)

Where:

  • ngn_g is the number of cases in group gg,
  • Yg\mathbf{Y}_g is the group-specific mean,
  • μg\mu_g is the grand mean for the variable,
  • Σ1\Sigma^{-1} is the inverse of the covariance matrix.

For Group 1:

The difference between Group 1’s mean and the grand mean is:

Y1μ=[23.2712.79][20.3114.29]=[2.961.50] \mathbf{Y}_1 - \mu = \begin{bmatrix} 23.27 \\ 12.79 \end{bmatrix} - \begin{bmatrix} 20.31 \\ 14.29 \end{bmatrix} = \begin{bmatrix} 2.96 \\ -1.50 \end{bmatrix} (Y1μ)=[2.961.50] \left( \mathbf{Y}_1 - \mu \right)^\top = \begin{bmatrix} 2.96 & -1.50 \end{bmatrix}

Σ=[27.2713.8013.8036.15] \Sigma = \begin{bmatrix} 27.27 & -13.80 \\ -13.80 & 36.15 \end{bmatrix}

For any 2x2 matrix:

A=[abcd] A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}

The inverse of this matrix A1A^{-1} is given by:

A1=1det(A)[dbca] A^{-1} = \frac{1}{\text{det}(A)} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix}

Where det(A)\text{det}(A) is the determinant of the matrix, and it is calculated as:

det(A)=adbc \text{det}(A) = ad - bc

The determinant of Σ\Sigma, denoted det(Σ)\text{det}(\Sigma), is calculated as:

det(Σ)=(27.27)(36.15)(13.80)(13.80) \text{det}(\Sigma) = (27.27)(36.15) - (-13.80)(-13.80) det(Σ)=985.8105190.44=795.3705 \text{det}(\Sigma) = 985.8105 - 190.44 = 795.3705 Σ1=1795.3705[36.1513.8013.8027.27] \Sigma^{-1} = \frac{1}{795.3705} \begin{bmatrix} 36.15 & 13.80 \\ 13.80 & 27.27 \end{bmatrix} Σ1=[36.15795.370513.80795.370513.80795.370527.27795.3705] \Sigma^{-1} = \begin{bmatrix} \frac{36.15}{795.3705} & \frac{13.80}{795.3705} \\ \frac{13.80}{795.3705} & \frac{27.27}{795.3705} \end{bmatrix} Σ1=[0.045450520.01735040.01735040.03428591] \Sigma^{-1} = \begin{bmatrix} 0.04545052 & 0.0173504 \\ 0.0173504 & 0.03428591 \end{bmatrix}

First, multiply:[2.961.50]×[0.045450520.01735040.01735040.03428591] \text{First, multiply:} \quad \begin{bmatrix} 2.96 & -1.50 \end{bmatrix} \times \begin{bmatrix} 0.04545052 & 0.0173504 \\ 0.0173504 & 0.03428591 \end{bmatrix}

[(2.96)(0.04545052)+(1.50)(0.0173504)(2.96)(0.0173504)+(1.50)(0.03428591)]=[0.10850790.000071681] \begin{bmatrix} (2.96)(0.04545052) + (-1.50)(0.0173504) & (2.96)(0.0173504) + (-1.50)(0.03428591) \end{bmatrix} = \begin{bmatrix} 0.1085079 & −0.000071681 \end{bmatrix} Then:[0.10850790.000071681]×[2.961.50] \text{Then:} \begin{bmatrix} 0.1085079 & −0.000071681 \end{bmatrix} \quad \times \begin{bmatrix} 2.96 \\ -1.50 \end{bmatrix} (0.1085079)(2.96)+(0.000071681)(1.50)=0.3211834+0.0001075215=0.3212909 (0.1085079)(2.96) + (−0.000071681)(-1.50) = 0.3211834 + 0.0001075215 = 0.3212909

This is the squared difference for Group 1. By multiplying this by n1=141n_1 = 141, you get 45.3020245.30202.

For Group 2:

The difference between Group 2’s mean and the grand mean is:

Y2μ=[17.19NA][20.3114.29]=[3.12NA] \mathbf{Y}_2 - \mu = \begin{bmatrix} 17.19 \\ \text{NA} \end{bmatrix} - \begin{bmatrix} 20.31 \\ 14.29 \end{bmatrix} = \begin{bmatrix} -3.12 \\ \text{NA} \end{bmatrix} (Y2μ)=[3.12NA] \left( \mathbf{Y}_2 - \mu \right)^\top = \begin{bmatrix} -3.12 & NA \end{bmatrix}

For missing data, we can’t compute the full Mahalanobis distance, but for the observed part, we compute:

(Yobsμobs)2Varobs \frac{(Y_{\text{obs}} - \mu_{\text{obs}})^2}{\text{Var}_{\text{obs}}}

Which here becomes:

(17.1920.31)227.27 \frac{(17.19 - 20.31)^2}{27.27} 134×(17.1920.31)227.27=47.8331353136 134 \times \frac{(17.19 - 20.31)^2}{27.27} = 47.8331353136

For this example:

TL=(Y1μ)Σ1(Y1μ)+(Y2μ)Σ1(Y2μ) T_L = \left( \mathbf{Y}_1 - \mu \right)^\top \Sigma^{-1} \left( \mathbf{Y}_1 - \mu \right) + \left( \mathbf{Y}_2 - \mu \right)^\top \Sigma^{-1} \left( \mathbf{Y}_2 - \mu \right)

Substituting the values:

TL=45.30202+47.8331353136=93.13516 T_L = 45.30202 + 47.8331353136 = 93.13516

Step 4: Interpretation of the Result

The computed test statistic TLT_L is 93.13516, which is compared against a chi-square distribution with degrees of freedom u=(2+1)2=1u = (2 + 1) - 2 = 1.

Given that this test statistic is statistically significant (with p<0.001p < 0.001), we can conclude that the missing data is not Missing Completely at Random (MCAR).


Conclusion

This computation demonstrates the process of using Little’s test to evaluate the MCAR assumption in a dataset. The test statistic value indicates that the missing data in this example is not MCAR.