A characterization of the normal distribution based on the sample mean and the residual vector