 # Empirical distributions of the robustified t-test statistics

Based on the median and the median absolute deviation estimators, and the Hodges-Lehmann and Shamos estimators, robustified analogues of the conventional t-test statistic are proposed. The asymptotic distributions of these statistics are recently provided. However, when the sample size is small, it is not appropriate to use the asymptotic distribution of the robustified t-test statistics for making a statistical inference including hypothesis testing, confidence interval, p-value, etc. In this article, through extensive Monte Carlo simulations, we obtain the empirical distributions of the robustified t-test statistics and their quantile values. Then these quantile values can be used for making a statistical inference.

## Code Repositories

### R-package

R Packages developed by Professor Chanseok Park

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

For statistical hypothesis testing, one of the widely-used conventional methods is using the Student

-test statistic,

 T=¯X−μS/√n,

where is the sample mean and

is the sample standard deviation. However, a statistical inference using this Student

-test statistic is extremely sensitive to data contamination.

In this article, we briefly review recently developed alternative methods proposed by Park (2018) and Jeong et al. (2018) which are shown to be robust to data contamination. Their statistics are developed based on the median and the median absolute deviation estimators, and the Hodges-Lehmann estimator (Hodges and Lehmann, 1963) and the Shamos estimator (Shamos, 1976)

. They have shown that these statistics are pivotal and converge to the standard normal distribution.

However, when the sample size is small, it is not appropriate to use the asymptotic property of these statistics (i.e., the standard normal distribution) for making a statistical inference. This motivates us to implement extensive Monte Carlo simulations to obtain the empirical distributions of the robustified -test statistics and calculate their related quantile values, which can then be used for making a statistical inference.

## 2 Robustified t-test statistics

For the sake of completeness, in this section, we briefly review the test statistics proposed by Park (2018) and Jeong et al. (2018).

By replacing the mean and the standard deviation with the median and the median absolute deviation (MAD), respectively, Park (2018) proposed the following robustified -test statistic

 T=^μm−μ^σM/√n,

where and . He also showed that the above statistic is a pivotal quantity. However, it does not converge to the standard normal distribution. He suggested the following statistic which converges to the standard normal distribution.

 TA=√2nπΦ−1(34)⋅median1≤i≤nXi−μmedian1≤i≤n∣∣Xi−median1≤i≤nXi∣∣d⟶N(0,1), (1)

where

is the inverse of the standard normal cumulative distribution function and

denotes convergence in distribution.

Analogous to the idea of Park (2018), Jeong et al. (2018) also proposed another robustified -test statistic in which the Hodges-Lehmann estimator (Hodges and Lehmann, 1963) and the Shamos estimator (Shamos, 1976) are considered. It is given by

 T=^μH−μ0^σS/√n,

where and represent the Hodges-Lehmann and the Shamos estimators, respectively. Note that the Hodges-Lehmann estimator is defined as

 ^μH=mediani≤j(Xi+Xj2)

and the Shamos estimator is defined as

 ^σS=mediani≤j(|Xi−Xj|).

It is easy to show that the above test statistic by Jeong et al. (2018) is also a pivotal quantity. However, it does not converges to the standard normal distribution. In Section 2.2 of Jeong et al. (2018), they suggested the following

 TB=√6nπΦ−1(34)mediani≤j(Xi+Xj2)−μmediani≤j(|Xi−Xj|), (2)

which converges to the standard normal distribution and is also pivotal.

## 3 Empirical distributions

As afore-mentioned, the robustified statistics, in (1) and in (2), converge to the standard normal distribution. However, when a sample size is small, it is not appropriate to use the standard normal distribution.

It may be impossible to find the theoretical distributions of and . Thus, we will obtain the empirical distributions of and using extensive Monte Carlo simulations and calculate their empirical quantiles which are useful for estimating critical values, confidence interval, p-value, etc. We used the R language (R Core Team, 2018) to conduct simulations summarized as follows. We generated one hundred million () samples of size from the standard normal distribution to obtain the empirical distributions of and , where . Using these samples, we can obtain the empirical distribution of or for each of size . Then by inverting the empirical distribution, we obtained the empirical quantiles of .

We provide these empirical quantile values in Table 1 for and Tables 2 for . In these two tables, we provide the lower quantiles of 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 0.975, 0.98, 0.99, and 0.995 for sample sizes ranging from to with an increment by one.

It is worthwhile to discuss the accuracy of the empirical quantiles obtained above. Let be the empirical quantile of obtained from the replications and be the true quantile of . Then it is easily seen from Corollary 21.5 of van der Vaart (1998) that the sequence

is asymptotically normal with mean zero and variance

. Thus, the standard deviation of the empirical quantile of , is approximately proportional to which has its maximum value at . Consequently, the empirical quantile values are computed with an approximate accuracy of . With , we have which roughly indicates that the empirical quantile values are accurate up to the fourth decimal point.

Given that the probability density functions of

and are symmetric at zero, we have and . Letting be the th lower quantile so that , we have . Thus, it is enough to find the th quantile only when . Let be the cumulative distribution function of . Then we have

 G(x)=P[|X|≤x]=P[−x≤X≤x]=F(x)−F(−x)=2F(x)−1.

Substituting into the above, we have . Thus, we have

 qp=G−1(2p−1),

which is more effective than using in obtaining empirical quantile values. In what follows, we illustrate the use of the empirical quantiles.

## 4 Illustrative examples

### 4.1 Confidence intervals

It deserves mentioning that the above robustified statistics of Park (2018) and of Jeong et al. (2018) are simple and easy to implement in practical applications. More importantly, they are pivotal quantities and converge to the standard normal distribution.

Let and with . Let and be the and upper quantiles of the distribution of the statistic , respectively. Then we have

 P(qα1≤TA≤qα2)=1−α.

Thus, solving the following for

 qα1≤TA≤qα2,

we can obtain a % confidence interval for as follows:

 [median1≤i≤nXi−qα2√π/2Φ−1(34)√n∣∣Xi−median1≤i≤nXi∣∣, median1≤i≤nXi−qα1√π/2Φ−1(34)√n∣∣Xi−median1≤i≤nXi∣∣].

If we consider the equi-tailed confidence interval (), then we have and since the distribution of is symmetric. The end points of the confidence interval are given by

In a similar way as done above, we can also obtain a % confidence interval for using the statistic . This is given by

 mediani≤j(Xi+Xj2)−qα1√π/6Φ−1(34)√nmediani≤j(|Xi−Xj|)],

where and be the and upper quantiles of the distribution of , respectively. The end points of the equi-tailed confidence interval are also easily obtained as

 mediani≤j(Xi+Xj2)±qα/2√π/6Φ−1(34)√nmediani≤j(|Xi−Xj|). Figure 1: Confidence interval and its corresponding interval length of the three statistics. (a) Confidence intervals. (b) Interval lengths.

As an illustration, we consider the data set provided by Example 7.1-5 of Hogg et al. (2015). In the example, the data on the amount of butterfat in pounds produced by a typical cow are provided. These data are 481, 537, 513, 583, 453, 510, 570, 500, 457, 555, 618, 327, 350, 643, 499, 421, 505, 637, 599, 392. Assuming the normality, they obtained the confidence interval based on the Student -test statistic which is given by

 [472.80, 542,20].

To investigate the effect of data contamination, we replaced the last observation (392) with the value of ranging from to in a grid-like fashion. In Figure 1 (a), we plotted the low and upper ends of the confidence intervals based on the Student, and versus the value of . In Figure 1 (b), we plotted the interval lengths of the confidence intervals under consideration. As shown in Figure 1, the confidence interval based on the conventional Student -test statistic changes dramatically while the confidence intervals based on and do not change much.

### 4.2 Empirical powers

Using the confidence interval, we can easily employ the robustified -test statistics and to perform the hypothesis test of versus . In this subsection, we compare the empirical statistical powers of these two statistics with the power using the conventional Student

-test statistic. Here, the statistical power of a hypothesis test is the probability that the test correctly rejects the null hypothesis when the alternative hypothesis is true. Figure 2: The empirical powers for H0:μ=0 versus H1:μ≠0 with sample size n=10. (a) No contamination and (b) Contamination (x1=10).

To obtain the power curve of a hypothesis test, we generated the first sample of size from . The second sample of size is also generated from but one observation in the sample is contaminated by assigning the value of . For a given value of , we generated a sample and performed the hypothesis test. We repeated this hypothesis test 10,000 times. By calculating the number of rejections of divided by the 10,000, we can obtain the empirical power at a given value of . The value of is changed from to in a grid-like fashion. These results are plotted in Figure 2.

As shown in Figure 2 (a), the empirical power using the conventional Student -test statistic has the highest when there is no contamination. Note that the power using is very close to that using the Student -test statistic while the power using loses power noticeably. However, when there is contamination, the powers based on and clearly outperform that based on the conventional method as shown in Figure 2 (b).

## 5 Concluding remarks

For brevity reasons, we only provide the empirical quantiles of 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 0.975, 0.98, 0.99, and 0.995 for each of sample sizes, .

These empirical quantiles can be sufficient for most practical problems. However, to obtain an accurate p-value for hypothesis testing, we need more accurate empirical quantiles values at more various probabilities. We are currently developing the R package which provides all the detailed empirical quantiles which will be enough for calculating the p-value. We are planning to upload the developed R package to CRAN:

https://cran.r-project.org/

## Acknowledgment

This work was supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (No. NRF-2017R1A2B4004169).

## References

• Hodges and Lehmann (1963) Hodges, J. L. and E. L. Lehmann (1963). Estimates of location based on rank tests. Annals of Mathematical Statistics 34, 598–611.
• Hogg et al. (2015) Hogg, R. V., E. A. Tanis, and D. L. Zimmerman (2015). Probability and Statistical Inference (9 ed.). Pearson.
• Jeong et al. (2018) Jeong, R., S. B. Son, H. J. Lee, and H. Kim (2018). On the robustification of the -test statistic. Presented at KIIE Conference, Gyeongju, Korea. April 6, 2018.
• Park (2018) Park, C. (2018). Note on the robustification of the Student -test statistic using the median and the median absolute deviation. https://arxiv.org/abs/1805.12256.
• R Core Team (2018) R Core Team (2018). R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing.
• Shamos (1976) Shamos, M. I. (1976). Geometry and statistics: Problems at the interface. In J. F. Traub (Ed.), Algorithms and Complexity: New Directions and Recent Results, pp. 251–280. New York: Academic Press.
• van der Vaart (1998) van der Vaart, A. W. (1998). Asymptotic statistics. Cambridge University Press.