Author: Uditha Amarananda Wijesuriya

# Ada-Plot and Uda-Plot

#### Uditha Amarananda Wijesuriya

## Introduction

As alternatives for Ad-plot and Ud-plot, two novel statistical plots, Ada-plot and Uda-plot derived from the empirical centralized cumulative average deviation function (eccadf), \(C_n(t)\) invented by author, will be illustrated with examples (Wijesuriya 2025a, 2025b, 2025c). Suppose that \(X_1,X_2,...,X_n\) is a random sample from a unimodal distribution. Then for a real number \(t\), the eccadf computes the sum of the deviations of the data that locate \(t\) distance from the sample average, divided by the sample size \(n\). The Ada-plot detects critical properties of the distribution such as symmetry, skewness, and outliers of the data. Next, the Uda-plot derived from 3 theorems by author is prominent on assessing normality (Wijesuriya 2025a). The extreme values in the data could be removed using 1.5IQR rule prior to create the robust version of the Uda-plot. To visualize two innovative plots, let adaplots package be installed, including stats and ggplot2 in R.

    library(ggplot2)
    library(adaplots)

### Ada-Plot

The first exhibit, Ada-plot consists of \(n\) ordered pairs of the form \((x_i,A_n(|x_i-\bar{X}|))\) for \(i=1,2,...,n\), where

\(A_n(t)=\min\limits_{t} C_n(t)+\max\limits_{t} C_n(t)-C_n(t)\)

#### Example 1

    set.seed(2025)
    X<-matrix(rnorm(100, mean = 2 , sd = 5))
    adaplot(X, title = "Ada-plot", xlab = "x", lcol = "black", rcol = "grey60")

Figure 1. The points in Ada-plot are evenly distributed around the sample average and hence, it indicates the symmetric property of the distribution. Further, the points in both lower and upper ends appear to be potentially outliers.

#### Example 2

    set.seed(2025)
    X<-matrix(rbeta(100, shape1 = 10, shape2 = 2))
    adaplot(X, title = "Ada-plot", xlab = "x", lcol = "black", rcol = "grey60")

Figure 2. The points below the average in Ada-plot widely spread. Thus, the distribution is apparently left skewed.

#### Example 3

    set.seed(2025)
    X<-matrix(rf(100, df1 = 10, df2 = 5))
    adaplot(X, title = "Ada-plot", xlab = "x", lcol = "black", rcol = "grey60")

Figure 3. The points situated above the average in Ada-plot widely dispersed contrary to Figure 2. Thus, the distribution is apparently right-skewed.

### Uda-Plot

Suppose that the random sample is from a normal distribution with mean \(\mu\) and variance \(\sigma^2\). Then the second illustration, Uda-plot is defined by \(n\) ordered pairs of the form \((x_i,W_n(x_i))\) for \(i=1,2,...,n\), where \(s^2\) is the sample variance and \(W_n(t)\) is as in the article by Wijesuriya (2025a).

#### Example 4

    set.seed(2030)
    X<-matrix(rnorm(30, mean = 2, sd = 5))
    udaplot(X, npdf = FALSE, lcol = "black", rcol = "grey60", pdfcol = "red")

Figure 4. The evenly distributed points about the sample average in Uda-plot follow a bell-shaped curve. Thus, it captures the symmetric property of the distribution.

#### Example 5

    set.seed(2030)
    X<-matrix(rnorm(30, mean = 2, sd = 5))
    udaplot(X, npdf = TRUE, lcol = "black", rcol = "grey60", pdfcol = "red")

Figure 5. The points in the Uda-plot tightly situate around the estimated normal density curve, indicating that the data follow the normal distribution with mean \(\mu\) and variance \(\sigma^2\) being estimated by the sample average \(\bar{X}\) and variance \(s^2\), respectively. Further, the \(d\)-value measures the degree of proximity of Uda-plot to the estimated normal density curve.

#### Example 6

    set.seed(2030)
    X<-matrix(rnorm(2050, mean = 2, sd = 5))
    udaplot(X, npdf = TRUE, lcol = "black", rcol = "grey60", pdfcol = "red")

Figure 6. Uda-plot is indistinguishable from the estimated normal density curve as sample size increases with a higher degree of proximity.

### Robust version of Uda-Plot

The empirical centralized cumulative average deviation function consists of \(|x_i-\bar{X}|\). Also, \(W_n(t)\) depends on \(C_n(t)\). Since the sample average is sensitive for outliers, eliminating extreme values and then creating Uda-plot make the robust version. User can opt in TRUE for excld option in udaplot function, to exclude extreme values using the \(1.5IQR\) rule. Herein \(IQR\) stands for interquartile range.

#### Example 7

    set.seed(2030)
    X<-matrix(c(rnorm(50, mean = 2, sd = 5), runif(4, 17, 30)))
    udaplot(X, npdf = TRUE, lcol = "black", rcol = "grey60", pdfcol = "red")

Figure 7. Uda-plot for 50 simulated data from \(N(2,5)\) contaminated with four simulated from \(Uniform(17,30)\), follows most part of the desirable normal density. Notably, the four points in the upper end overestimate the normal curve.

#### Example 8

    set.seed(2030)
    X<-matrix(c(rnorm(50, mean = 2, sd = 5), runif(4, 17, 30)))
    udaplot(X, excld = TRUE, npdf = TRUE, lcol = "black", rcol = "grey60", pdfcol = "red")

Figure 8. Uda-plot for the data in Figure 7 together with \(1.5IQR\) rule, indicates a close fit with the estimated normal density, improving the robustness. Herein \(d\)-value increases from 0.90 to 0.93, confirming normality.

## Reference

Wijesuriya, Uditha Amarananda. 2025a. “Ada-Plot and Uda-Plot as Alternatives for Ad-Plot and Ud-Plot.” Communications in Statistics-Theory and Methods, 2025a. https://doi.org/10.1080/03610926.2025.2558108.
———. 2025b. “Ad-Plot and Ud-Plot for Determining Distributional Characteristics and Normality.” Communications in Statistics-Theory and Methods, 2025b. https://doi.org/10.1080/03610926.2024.2440583.
———. 2025c. “Adplots: Ad-Plot and Ud-Plot for Visualizing Distributional Properties and Normality,” 2025c. https://doi.org/10.32614/CRAN.package.adplots.