Residual and Past Discrete Tsallis and Renyi Extropy with an Application to Softmax Function

In this paper, based on the discrete lifetime distribution, the residual and past of the Tsallis and Renyi extropy are introduced as new measures of information. Moreover, some of their properties and their relation to other measures are discussed. Furthermore, an example of a uniform distribution of the obtained models is given. Moreover, the softmax function can be used as a discrete probability distribution function with a unity sum. Thus, applying those measures to the softmax function for simulated and real data is demonstrated. Besides, for real data, the softmax data are fit to a convenient ARIMA model.


Introduction
The entropy function has resulted in a substantial turn in the theory of information, such as the measure of uncertainty information. For a discrete random variable (R.V.) X = {x 1 , x 2 , . . . , x N }, and p = {p 1 , p 2 , . . . , p N } is the corresponding probability vector, p i = P(X = x i ), i = 1, 2, . . . , N. Thus, Shannon [1] produced the non-negative discrete entropy function as follows: Lad et al. [2] originated the extropy as a dual model of uncertainty. The non-negative extropy of the discrete R.V. X is given by Several measures of entropy and its generalization have been presented in the literature. Through the various generalizations of uncertainty, Tsallis [3] introduced the Tsallis entropy. The Tsallis entropy of the discrete R.V. X, 1 = α > 0, is given by when α is 1, then lim α→1 T α (p) = S(p).
Recently, Xue and Deng [4] proposed the measure Tsallis extropy, as a complementary dual of the Tsallis uncertainty function and studied its maximum value. Then, Balakrishnan et al. [5] studied the Tsallis extropy and applied it to pattern recognition. The Tsallis extropy of the discrete R.V. X, 1 = α > 0, is given by when α is 1, then lim α→1 TES α (p) = ES α (p). Based on the continuous lifetime distribution, Ebrahimi [6] discussed the measure of the entropy of the residual lifetime distribution. Furthermore, Di Crescenzo and Longobardi [7] presented the measure of the entropy of the past lifetime distribution.
Based on the discrete lifetime distribution, Gao and Shang [8] developed the generalized past entropy via the grain exponent based on oscillations. Li and Shang [9] introduced the modified discrete generalized past entropy via the grain exponent.
The innovation of this paper lies in presenting the residual and past versions of the Tsallis and Renyi extropy based on the discrete lifetime distribution. Moreover, we apply those models to the softmax function for simulated and real data. Besides, we discuss the residuals of the softmax real data and give a suitable ARIMA model to fit the data. The remaining article is structured as follows: Section 2 gives the suggested models with their properties and relation to other measures. Besides, we give an example of the models for a uniform distribution. Section 3 applies the softmax function to the suggested models on simulated and real data. Furthermore, we discuss the residuals and the fit ARIMA model to the softmax U.S. consumption data. Finally, Section 4 finishes the article with some conclusions.

The Suggested Models
Extropy is a favorite instrument to enhance the Tsallis entropy, which is the dual model of information entropy. The Tsallis extropy combines the advantages of the Tsallis entropy and extropy. In this section, we present the residual and past versions of the Tsallis extropy based on the discrete lifetime distribution.
Let the discrete R.V. X supported with S = {x 1 , x 2 , . . . , x N }, and the corresponding probability vector p = {p 1 , p 2 , . . . , p N }. Then, the residual and past discrete Tsallis entropy, 1 = α > 0, is given, respectively, by where P t = P(X ≤ t) = ∑ t i=1 p i and P t = 1 − P t , and the interceptive parameter t is between 1 and N. Moreover, the residual and past discrete extropy is given, respectively, by Motivated by the concept of the Tsallis extropy and the discrete lifetime distribution, we introduce the residual and past of the Tsallis extropy, respectively, as follows: In the following proposition, we illustrate the past and residual Tsallis extropy behavior according to the value of α.
The past Tsallis extropy given in Equation (10) can be rewritten as follows: Moreover, we have that the term N(1 − P t ) ≥ 0 is greater than the other two terms, and P t ≥ p i , i = 1, 2, . . . , N. Then, the proof is obtained.

2.
The residual Tsallis extropy given in Equation (9) can be rewritten as follows: Moreover, the proof is obtained similarly.

Example 1.
Suppose that the discrete R.V. X has a uniform distribution over {1, . . . , N}. Then, the residual and past Tsallis extropy are given, respectively, by In the following proposition, we will establish the relation between the past and residual Tsallis extropy and the past and residual extropy.

1.
From (10) and applying L Hôpital s rule, we have

2.
From (9) and applying L Hôpital s rule, we have In the next proposition, we will obtain the relation between the past and residual Tsallis extropy and the past and residual Tsallis entropy when the choice of the parameter α = 2.
Proposition 3. Suppose that the discrete R.V. X has finite support with the corresponding probability vector p = {p 1 , p 2 , . . . , p N }. Then, from the past and residual Tsallis extropy given in Equations (10) and (9), respectively, and the past and residual Tsallis entropy given in Equations (6) and (5), respectively, we have:

2.
From (9), when α = 2, we have In the following theorem, we will show the relation between the past and residual Tsallis extropy and past and residual Tsallis entropy according to the value of α. Theorem 1. Assume that the discrete R.V. X has finite support {x 1 , x 2 , . . . , x N } with the corresponding probability vector p = {p 1 , p 2 , . . . , p N }. Then, from the past and residual Tsallis extropy given in Equations (10) and (9), respectively, and the past and residual Tsallis entropy given in Equations (6) and (5), respectively, we have:

Proof. From Equations
It can be simply noted that: if 0 < α < 1, then In the sequel, the results follow.

Residual and Past Discrete Renyi Extropy
In the same manner, we can discuss the residual and past discrete Renyi extropy. Let the discrete R.V. X supported with S = {x 1 , x 2 , . . . , x N }, and the corresponding probability vector p = {p 1 , p 2 , . . . , p N }. Then, the Renyi extropy was introduced by Liu and Xiao [10] as follows: Motivated by the concept of the Renyi extropy and the discrete lifetime distribution, we introduce the residual and past of the Renyi extropy, respectively, as follows: In the following proposition, we will show the relation between the past and residual Renyi extropy and the past and residual extropy.

Proposition 4.
Assume that the discrete R.V. X has finite support with the corresponding probability vector p = {p 1 , p 2 , . . . , p N }. Then, from the past and residual Renyi extropy given in Equations (13) and (12), respectively, and the past and residual extropy given in Equations (8) and (7), respectively, we have:

Example 2.
Suppose that the discrete R.V. X has a uniform distribution over {1, . . . , N}. Then, the residual and past Renyi extropy are given, respectively, by

Applications
In this section, we will use different data sources and the softmax function to obtain the corresponding probability vector p, then discuss the behavior of the residual and past Tsallis extropy.

Softmax Function
It has been noted in the real world that the actual R.V. may be continuous in disposition, but discrete when we observe it, for example in a hospital, the number of days a patient stays or a patient survives after treatment. Accordingly, it is appropriate to fit these positions by discrete distributions developed from continuous distributions. One of the most well-known functions in engineering and science is the softmax function. It has usage in many fields such as game theory [11][12][13], reinforcement learning [14], and machine learning [15,16]. This normalized exponential function is used to transform a vector y = (y 1 , y 2 , . . . , y N ) t ∈ R N into a unit sum vector ∈ (0, 1) N as follows SMAX(y) i = e y i ∑ N l=1 e y l = e y−log(∑ N l=1 e y l ) , i = 1, 2, . . . , N. 3.

Standard Normal Distribution
In this part, we generate data from standard normal distribution (N(0, 1)) and use the softmax function to obtain the corresponding probability vector with a unity sum. Figures 1 and 2 show the simulated data of N(0, 1), besides the softmax data when N = 30 and 100, respectively. For the softmax data when N = 30, we see the mean = 0.0333 and the variance = 0.001195, and it shows the quantile-quantile plot of the softmax data, which can be noted to be far from normality. When N = 100, we see that the mean = 0.01 and the variance = 0.0002753. Therefore, we can see that the variance is decreasing by increasing the sample. Furthermore, in the quantile-quantile plot of the softmax data, it starts to be closer to normality, but still, the extremely standardized residuals (on both ends) are more extensive than they would be for normal data. Moreover, Figures 3 and 4 show the past and residual Tsallis extropy when α = 0.2, 0.8, 3, 15, which can be noted as follows: By increasing t, the past Tsallis extropy decreases (increases) for α > 1 (0 < α < 1). Furthermore, the residual Tsallis extropy increases (decreases) for α > 1 (0 < α < 1).    This part presents the quarterly changes in U.S. consumption and personal income data from 1970 to 2016. First, we want to discuss the softmax data obtained from our data. Figure 5 displays the U.S. consumption and income data and the corresponding softmax data. Figure 6 shows the data analysis of the softmax U.S. consumption and personal income, such that the mean of softmax U.S. consumption is 0.00534759 and the variance is 0.000011557 and the mean softmax of U.S. personal income is 0.00534759 and the variance is 0.0000149023. Moreover, the extremely standardized residuals (on both ends) are larger than they would be for normal data.
In Figure 7, based on the softmax U.S. consumption data, we see the residuals of the data before fitting them to a preferred model. Therefore, there are significant spikes in the ACF according to its residuals. Then, our aim now is to find a suitable model based on the ACF. Correspondingly, Figure 7 shows the residuals of the model fit to the data. Thus, the best model that fits the data is ARI MA(0, 1, 1)(2, 0, 2) 4 with p-value = 0.1502, AIC = 350.51, and it accepts the Ljung-Box test. Accordingly, all the spikes are within the significant ACF limits, except for a single spike that exceeds a small limit. Note that the general form of a seasonal ARIMA model is ARI MA(p, b, q)(p, b, q) s , where (p, b, q) s and (p, b, q) are the seasonal and non-seasonal part of of the model, respectively, and s is the number of observations per year.

Conclusions
In this article, we offered the residual and past discrete Tsallis and Renyi extropy. Moreover, we discussed some properties and relations of the residual and past discrete Tsallis entropy with respect to our models. Moreover, we chose the softmax function as a discrete probability distribution function and studied its behavior for simulated and real data. We discussed the residuals of the softmax data for real data and suggested that the appropriate ARIMA model fits the data. Furthermore, we obtained the past and residual Tsallis extropy and studied its increasing and decreasing according to the value of α. Finally, we can apply those models to ordered variables and their concomitants for future work. For more details, see [17][18][19]. For applications, see [20][21][22].

Data Availability Statement:
The simulated data used to support the findings of this study are included within the article.