Вы находитесь на странице: 1из 44

2018-04

Parameter Identification using Standard Transformations: An Alternative


Hypothesis Testing Method

Hugo Hernandez
ForsChem Research, 050030 Medellin, Colombia
hugo.hernandez@forschem.org

doi: 10.13140/RG.2.2.14895.02728

Abstract

Current statistical hypothesis testing methods were developed more than 100 years ago, when
computers were not yet available. Even though they have been very useful, they present
certain limitations in particular because all their underlying assumptions are not usually met.
Misuse of these methods has led in the past to erroneous conclusions and a growing sense of
unreliability. In this report, parameter identification using numerical optimization is proposed
as an alternative method for testing hypothesis. The method is based on finding, by numerical
optimization, the best probability model(s) describing the data samples. Then, by using
different statistical or heuristic criteria, it is possible to decide which hypothesis (the null or the
alternative) cannot be rejected based on the information available. The proposed method
allows considering a wide range of probability distribution functions based on standard
random variables, including general polynomial distributions capable of describing any arbitrary
distribution. The proposed method is expected to work for testing any hypothesis, regardless
of any assumptions on the model or the data. The reliability of the method can be improved by
enriching the library of standard random probability models. A software implementation of this
method (considering 17 different probability models) in R language is available.

Keywords

Hypothesis Test, Numerical Optimization, Parameter Identification, Probability Models,


Standard Random Variables, Statistical Confidence

03/05/2018 ForsChem Research Reports 2018-04 (1 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

1. Introduction

Hypothesis testing is a key element of scientific research [1]. Hypothesis testing can be
considered as a natural consequence of the philosophical dichotomy presented by René
Descartes in the 17th century when, in the words of Eudoxus, he stated that: “It is impossible
that one and the same thing should exist and at the same time should not exist.” [2] Statistical
hypothesis testing methods were mainly developed by William Gosset (Student) [3], Ronald
Fisher [4], Jerzy Neyman and Egon Pearson [5] at the beginning of the 20th century, and soon
they gained wide popularity in the scientific community for different scientific, sociologic and
political reasons [6]. However, misuse, misunderstanding and methodological biases have
raised serious questions about the use of statistical hypothesis testing for attaining scientific
conclusions [6-10].

Some difficulties experienced with traditional statistical hypothesis testing methods include:

 Data are assumed to come from a population with a specific probability distribution
(usually limited to normal and binomial). §
 In the case of two-sample tests, usually the same type of distribution is assumed for
both populations.
 Significance limits are arbitrary (typically 5%). Changing the significance level may
change the conclusion.
 Different results can also be obtained when different methods are used. Thus,
erroneous conclusions can be obtained if the wrong method is used.
 Up to the author’s knowledge, no universal method for hypothesis testing is
available.

Some of these difficulties are caused by the computational limitations at the time when the
theory was developed. Some other, are the result of the incorrect use of these methods.

The purpose of this report is to extend the principle of hypothesis testing to a wide variety of
probability distributions, using current computational capabilities. The proposed idea consists
on using numerical optimization for the identification of the parameters of the probability
distribution of the population, based on standard random variables with any arbitrary
distribution [11]. Once the parameters have been optimally identified, it is possible to test
whether or not they describe the behavior of a sample by quantifying the uncertainty of the
model. It will also be possible to quantify the similitude between different probability
distribution models.

§
Although different non-parametric and distribution-free hypothesis testing methods have been
developed, many ultimately rely on a test for a normal distribution, or on specific statistical tables.

03/05/2018 ForsChem Research Reports 2018-04 (2 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Standard random variables ( ) are normalized representations of the random behavior of


variables. The standard random variable is basically a linear transformation of a random
variable , given by:

(1.1)

where, and represent constant parameters. Therefore, any random variable can be
expressed in terms of a standard random variable as:

(1.2)

Possible types of standard random variables and their main characteristics are summarized in
Table 1. Type I standard random transformations represent the most general case, and are
particularly useful since they can be used for any random variable . Standard random variables
differ from the concept of kernel used in nonparametric statistics because standard random
variables do not need to be symmetric, and common kernels are not necessarily standardized
into one of the three types presented in Table 1.

Table 1. Types of Standard Random Variables


Parameters
Type Properties of Bounds of Bounds of

( ) ( )
( )
[ ) [ )
( )
I ( ) ( ) ( ) ( ) ( )
( ] ( ]
( )
( ) ( )
[ ] [ ]
( ) ( )
[ ) [ ) ( )
II ( ) ( )
( ] [ ) ( )
III ( ) ( ) [ ] [ ]

Table 2 shows a summary of the basic properties of some standard random variables for the
most representative continuous models of probability distribution. In certain cases, different
types of standard random variables are used to describe the same probability model. Similarly,
Table 3 shows a summary of the most representative discrete models of probability
distribution.

03/05/2018 ForsChem Research Reports 2018-04 (3 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Table 2. Standard Random Variables of Common Continuous Probability Distribution Models


Standard
Random Probability density function Cumulative probability
Model Additional information
Variable Type ( ) function ( )
and Bounds

Type I
( )
Normal
∫ √ : Error function
√ √
( ) ̌
̌ ( ̌)
̌ ̌
√ ̌
̌ ̌
( ̌) ̌ ̌ ( ) ( )
Type III √ ( ) ( ) √ ̌ √ ̌
̌
Truncated ̌ √ ̌ √ ̌ ( )
Normal ̌ ̌ ̌ ̌ ̌ ( )( ̌ ( ))
( ) ( ) ( ) ( ) ( ̌)
√ ̌ √ ̌ √ ̌ √ ̌ ̌ ̌

̌ ̌
( ) ( )
√ ̌ √ ̌

Type I
Uniform √
√ √

Type III ( )
Uniform
( )

Type I
Exponential ( ) ( )

Type II
Exponential ( )

Maxwell- Type II
Boltzmann ( ) ( )
[12,13] √

: Gamma function
with Type II : Lower incomplete gamma
( ) ( )
degrees of function
freedom ( ) ( )
( )

Student’s Type I
with ( )( ) ( ) : Incomplete Beta function
degrees of
freedom √( ) ( )

03/05/2018 ForsChem Research Reports 2018-04 (4 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Table 2 (cont.). Standard Random Variables of Common Continuous Probability Distribution


Models
Standard
Random Probability density function Cumulative probability
Model Additional information
Variable Type ( ) function ( )
and Bounds

Gamma Type II
( )
with shape ( )
( ) ( )

Weibull Type II ( )
( ( ) ) ( )
with shape ( ( )) ( ( ) )
( ( ))

Type II ( )
Scopd [14] ( )
( ) ( ) ( ) ( )
√ √

Type III ∑ ( ) ∑
Polynomial ∑
s.to ∑ ,
( ) ∑ ( ( ))

Assuming any arbitrary standard probability distribution, parameters and can be identified
using a data sample taken from the population (Section 2). Some standard probability
distributions have additional parameters that can also be identified. It is possible to find that
different standard probability distributions fit the particular sample distribution, especially for
small samples.

On the other hand, different hypothesis can be tested related to the standard transformation
of random variables. First, it is possible to test if model parameters ( , , , , etc.) estimated
from a sample, corresponds or not to certain assumed values (Section 3). Second, it is possible
to test if the population parameters:

( ) ( )
(1.3)
( ) ( )
(1.4)

identified from different samples can be considered identical or not, even for populations with
different probability distribution models (Section 4).

03/05/2018 ForsChem Research Reports 2018-04 (5 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Table 3. Standard Random Variables of Common Discrete Probability Distribution Models


Standard
Random Cumulative probability
Model Probability mass function ( ) Additional information
Variable Type function ( )
and Bounds

Step size:
Number of elements:
Type III
( )
Uniform ∑
( )

( )

Kronecker delta
Type III
Bernoulli ( ) ( )
( )
( ) ( )
( ): Binomial coefficient
: Incomplete Beta function

Type III
( ) ( ) ( ( ) )
Binomial ( )

( )
( )
( )

: Gamma function
Type II : Regularized gamma
Poisson ( ) function
( )

( )
Type II
Geometric ( ) ( )
( )

∑ ∑ ( )
Type III ( ) ∑∑ ( )
Polynomial
∑∑ ( )
Approximation s.to ∑ ( ) , ( )

∑∑ ( )
∑ ∑ ( )
( ( ))

03/05/2018 ForsChem Research Reports 2018-04 (6 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

In third place, it is possible to test the overall similarity between different probability
distribution models (Section 5), which expressed in terms of standard probability density
functions are:

( ) | | ( )
(1.5)

Specific examples are included at each section, and a brief description of algorithms developed
is included in the Appendix. A script containing all the algorithms written in R language
(https://www.R-project.org/) is available as Supporting Information.

2. Population Parameter Identification using Standard Transformations

Any sample of measurements can be considered a set of elements randomly obtained from a
population with a certain probability distribution. However, since the sample is finite, there are
virtually an infinite number of populations with different probability distribution functions
providing the exact same sample. Thus, the purpose of parameter identification is to determine
the population (or populations) most likely being the source of the sample. If the data sample
contains different measurements, each of them will be present in the sample with a relative
frequency of . That is, each measurement contributes in to the cumulative probability
of the sample, which corresponds to the cumulative probability resolution of the sample. As a
practical example, let us consider the sample of 10 measurements randomly obtained from a
population with a uniform probability distribution between 0 and 1 (Type III standard uniform
distribution), presented in Table 4.

Table 4. Sample of 10 elements randomly obtained from a population with uniform probability
in the range [0, 1]. Data sorted in ascending order.
Cumulative probability range
Rank Measured value
Minimum Maximum
1 0.11012 0 0.1
2 0.17361 0.1 0.2
3 0.25103 0.2 0.3
4 0.36132 0.3 0.4
5 0.39981 0.4 0.5
6 0.43254 0.5 0.6
7 0.58428 0.6 0.7
8 0.59756 0.7 0.8
9 0.87606 0.8 0.9
10 0.98245 0.9 1

03/05/2018 ForsChem Research Reports 2018-04 (7 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

The cumulative probability range indicates the minimum and maximum cumulative probability
represented by each measurement. The resolution in cumulative probability for this sample is
10%. The overall behavior of the cumulative probability for this particular sample is graphically
presented in Figure 1 along with the true cumulative probability of the population source.

Figure 1. Cumulative probability plot of a sample of 10 measurements (blue solid lines)


randomly obtained from a Type III standard uniform distribution (green dotted line).

In this particular case, the maximum difference between the original cumulative probability
function and the cumulative probability observed in the sample is 10.24% for the measurement
ranked in the 8th position. The average absolute difference between the original cumulative
distribution and the vertical bars was 1.96% (considering a 0% difference when the bars are
touched by the original distribution). On the other hand, it may be possible to find cumulative
probability functions touching all vertical bars. An example is the 4th order polynomial
presented in Figure 2. In this case, the maximum difference observed is 0%, because all vertical
bars are touched by the polynomial model. Even though the cumulative probability is described
by a 5th order polynomial, it is only a 4th order polynomial in the probability density function.

Figure 2. Cumulative probability plot of a sample of 10 measurements (blue solid lines)


described by a polynomial model (red dashed line).

03/05/2018 ForsChem Research Reports 2018-04 (8 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Figure 3 presents a graphical comparison of the probability density functions between the
sample, the original uniform distribution, and the fitted polynomial model. After looking at
both the cumulative probability and the probability density function, it can be concluded that
the behavior of a sample does not necessarily represent the exact behavior of the population,
at least for small samples. In other words, sampling is a noisy process that introduces
uncertainty.

Figure 3. Probability density observed in a sample of 10 measurements (blue solid line)


compared with the probability density function of the original population distribution (green
dotted line) and the function described by the fitted polynomial model (red dashed line).

Now, if a limited number of measurements are obtained without knowing the true distribution
of the population, it will not be possible to identify with absolute certainty the original
distribution. However, it will be possible to identify the best model (or models) that describe
the behavior observed in the sample. Since there are different families of parameterized
probability models (uniform, normal, exponential, etc.), it would be desirable to identify the
possible sets of parameters that adequately describe the behavior of the sample. From the
previous example, it can be seen that the best fit does not necessarily represent the true
distribution of the population. Therefore, any model describing the cumulative probability of
the data available within the resolution of the sample should be considered as a possible
distribution of the population. On the other hand, models that deviate beyond the resolution
of the sample are less probable to correspond to the true distribution and might be rejected.

By considering the standard transformation given by Eq. (1.1), each family of probability
distribution models can be described as function of at least two parameters ( and ) and one
standard random distribution. Thus, the difference or error ( ) between the cumulative
distribution described by the model and the cumulative distribution observed at each
measurement (ranked in ascending order) in the sample can be calculated as follows:

03/05/2018 ForsChem Research Reports 2018-04 (9 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

( ) ( )

( )

{ ( ) ( )
(2.1)

where represents the cumulative distribution function of the corresponding standard


random variable, is the value of the measurement ranked at the -th position in ascending
order, and is the total number of elements in the sample.

The optimal set of parameters of a family of probability models can be found by solving the
following optimization problem:
( )

**

(2.2)

Different objective functions of the error can be used for identifying optimal sets of
parameters. Some of these objective functions are summarized in Table 5.

Table 5. Examples of objective functions to be used in the optimization problem for parameter
identification (Eq. 2.2)
Mathematical Model Rejection
Objective Function
Expression Criterion
Maximum difference in
( )
cumulative probability
Average difference in ∑
〈 〉 〈 〉
cumulative probability

Sum of squared differences



in cumulative probability

When a model is within the resolution of the data, then:

〈 〉
(2.3)

Different results might be obtained when the model cannot fit all sample data. In this case,
different optima might be found for each objective function. It will then be necessary to clearly

**
This constraint is included because a value of corresponds to a deterministic variable.

03/05/2018 ForsChem Research Reports 2018-04 (10 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

identifying criteria for rejecting a model. Some heuristic “rules of thumb” proposed in this
work are found in the last column of Table 5. A model is considered inadequate when all three
heuristics result in rejections. However, in Section 3, an alternative statistical approach for
estimating the confidence in the rejection of a model will be presented.

The method used for solving the optimization problem can be either deterministic or
stochastic, and can be either gradient-based or heuristic. In addition, any valid starting point
can be used for the optimization. For Type I standard variables, it is recommended to begin the
optimization with the following initial values of the parameters:


̅
(2.4)
∑ ( ̅)

(2.5)

Bounded Type I, Type II and Type III standard random variables should also consider the natural
bounds of the measured variable as starting point in the optimization. In addition, for
additional parameters, a reasonable starting point (considering the data sample) is
recommended. In the case of the polynomial distribution, because it is highly constrained, it is
advisable to perform a polynomial least-squares regression for identifying the initial
parameters to be used in the optimization.

It is important to recall again that even though an optimum set of parameters is found by
optimization, it does not necessarily correspond to the true distribution of the population
originating the sample. Figure 4 and Table 6 summarizes the optimum sets of parameters
found for most probability distributions models considered in Table 2, using the average
difference in cumulative probability as objective function, and a bound constrained quasi-
Newton (L-BFGS-B) optimization method [15].

For the present example, the expected value of the different models obtained by optimization
was in the range
( )
(2.6)

whereas the standard deviation was in the range:

( )
(2.7)

03/05/2018 ForsChem Research Reports 2018-04 (11 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Figure 4. Cumulative probability distribution of the optimal models describing a data sample,
for different families of probability distributions. Top left: Type I distributions. Top right: Type II
distributions. Bottom: Type III distributions.

As it can be seen, both the sample statistics ( ̅ ) and the original


population parameters ( ) lie within those ranges. In Section 3, it will be
shown how optimal parameter identification can be used as an alternative method for
hypothesis testing.

If none of these models provides a good fit of the data, there are additional strategies. First,
kernels typically used for nonparametric regression can be considered.[16] Those kernels need
to be standardized before using. Standardized uniform, Gaussian and polynomial kernels have
already been considered in Table 2. Second, nonlinear transformations of the original raw data
can be made, using the same identification procedure. Transformations such as logarithms,
exponentials, squared roots, reciprocals, polynomials, and many other are possible. For
example, a log-normal distribution can be identified by using a logarithm transformation of the
data with a normal distribution model. In another example, the exponential distribution is the
result of using a negative logarithm transformation with a uniform distribution model.

03/05/2018 ForsChem Research Reports 2018-04 (12 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Table 6. Optimal parameters found for describing the data in Table 4 using different
distribution models
Standard Optimal Parameters
Model Distribution 〈 〉 ( ) ( ) ( )
Type Other

Normal I 0.4349 0.2851 0.697% 0.4349 0.0813 0.2851

Truncated ̌ 0.0660
III 0.0986 1.7494 0.037% 0.4827 0.0767 0.2769
Normal ̌ 0.2426

Uniform I 0.4356 0.2146 1.042% 0.4356 0.0461 0.2147

Uniform III 0.1014 0.6897 1.200% 0.4463 0.0396 0.1991

Exponential I 0.5186 0.3856 0.573% 0.5186 0.1487 0.3856


Exponential II 0.1330 0.3857 0.573% 0.5187 0.1488 0.3857
Maxwell-
II -0.2097 0.6668 0.208% 0.4570 0.0792 0.2814
Boltzmann
Chi2 II 0.0270 0.4681 4.7770 0% 0.4951 0.0917 0.3029

Student’s t I 0.4455 0.2897 9.0255 0.674% 0.4455 0.0839 0.2897

7.397
Fisher’s F II -0.0203 0.5234 0% 0.5030 0.1089 0.3300
23.99
Gamma II 0.0175 0.4745 2.4171 0% 0.4920 0.0932 0.3052

Weibull II 0.0798 0.4119 1.4243 0% 0.4917 0.0860 0.2934

Scopd II 0.1357 0.4543 1.074% 0.5900 0.4420 0.6648

0.4444
4.4683
4th-order
III 0.0000 1.0000 1.4702 0% 0.4660 0.0702 0.2650
Polynomial
-23.2807
18.2582

Third, it is possible to provide even more flexibility in the description of the probability
distribution by creating additional standard distributions from the combination of different
standard distributions available. The simplest case is the linear combination of two different
independent Type I standard distributions, where:


(2.8)

where is a constant value, which can be considered or not as an additional parameter for
identification in the optimization. The standard distribution obtained in this case is also Type I
because its expected value and variance are:

03/05/2018 ForsChem Research Reports 2018-04 (13 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

( ) ( )
( )

(2.9)

( ) ( )
( )
(2.10)

The probability density function for this multivariate model can be obtained from the variable
transformation theorem [17] as:

( ) √ ∫ (√ ) ( )

(2.11)

and therefore, the cumulative probability distribution function is:

( ) ∫ √ ∫ (√ ) ( )

(2.12)

Even though the mathematical complexity increases, the new combinations of standard
variables enrich the library of standard distributions available for identification.

Let us consider for example the standard function obtained by combining a normal distribution
with a Type I uniform distribution using . The new combined standard function will be:


(2.13)

with probability density function:

(√ )

( ) √ ∫
√ √

√ √ √ √ √
( ( ) ( ))
√ √ √
(2.14)

and cumulative probability function:

03/05/2018 ForsChem Research Reports 2018-04 (14 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

√ √ √ √ √
( ) ∫ ( ( ) ( ))
√ √ √

√ √ √ √ √ √ √
( ) ( ) ( ) ( )
√ √ √ √ √
(
(√ √ ) (√ √ )


)
(2.15)

Figure 5 shows the probability density function and the cumulative probability function for this
combined standard distribution.

Figure 5. Type I standard distribution resulting from the combination of the Normal standard
and the Type I uniform distribution in ratio 1:3. Left: Probability density function. Right:
Cumulative probability function.

The last approach is the use of multidimensional models for describing the probability
distribution of the population of interest [11]. Although any arbitrary nonlinear model can be
used, it is particularly interesting to combine discrete and continuous distribution models as
follows:

( ) ( )
(2.16)

03/05/2018 ForsChem Research Reports 2018-04 (15 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

where the subscript indicates a discrete probability model and the subscript a continuous
probability model. If the continuous model is the normal distribution, such an approach will
lead to multimodal distributions. For example, the combination of a discrete Bernoulli
distribution with a continuous Normal distribution yields the following Type I standard bimodal
normal (Binormal) distribution:

( ̌ )
( ̌ ) ̌
( ̌ ))
̌ ̌ (
( ) ̌ ̌
( ̌ ̌ ) √ ̌
̌
√ ( ( ̌ ))
̌
[ ]
(2.17)

and cumulative probability function:

̌ ( ̌ )
( ) ̌ ( ( )) ̌
( ̌ ̌ ) √ ̌
̌
√ ( ( ̌ ))
̌
[ ( ( ))]
(2.18)

̌
where ̌ , ̌ , and ̌ √ ̌
.

A standard binormal distribution with ̌ , ̌ , and ̌ is presented in Figure 6.

Figure 6. Type I standard binormal distribution with parameters ̌ , ̌ , and ̌ .


Left: Probability density function. Right: Cumulative probability function.

03/05/2018 ForsChem Research Reports 2018-04 (16 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

3. Hypothesis Testing of Individual Population Parameters identified from a


Sample

As it was previously mentioned, parameter identification of probability distribution models can


be used for hypothesis testing. In this section, testing hypothesis involving only one sample will
be considered. Hypothesis testing requires choosing between two mutually exclusive
hypotheses denoted as the null hypothesis ( ) and the alternative hypothesis ( ). The null
hypothesis indicates that two elements may have the same value or behavior. The alternative
hypothesis, on the contrary, states that those two elements are significantly different. Using
optimal parameter identification for hypothesis testing, when at least one set of parameters is
found to be consistent with the null hypothesis, then it cannot be rejected. On the other hand,
if the parameters found for the best-fitted probability model are not consistent with the null
hypothesis, the alternative hypothesis cannot be rejected. The conclusions should be
expressed in this way for the following reasons. In the first case, even though one feasible
model is found, it is not necessarily the true probability distribution model. Furthermore, if the
resolution is poor, additional information may yield a different result. In the second case, if the
best model available does not provide a good fit, it may still be possible that a larger sample
also yield a different result. In addition, when testing specific parameters, it is possible that the
right model is not in the library of available models. Therefore, the proposed method relies on
using a comprehensive library of standard distribution models, in order to reduce the
uncertainty of a null hypothesis rejection.

3.1. Testing the data sample against a specific probability distribution model

As a first case of hypothesis testing with one sample, let us assume that we want to know if the
data obtained corresponds or not to a random sample of a population with known probability
distribution. In this case, the null and alternative hypotheses to be tested are:

( )
( )
(3.1)

where represents the sample, represents the population with known distribution,
are known parameters, and is a known standard distribution (with all its parameters also
known).

The first step is to calculate the average difference in cumulative probability 〈 〉 †† between the
data and the known distribution (see Table 5 and Eq. 2.1). If the average difference is exactly
zero, then the null hypothesis cannot be rejected. Please notice that this result will be

††
Alternatively, the maximum difference or the squared difference in cumulative probability can also be
used.

03/05/2018 ForsChem Research Reports 2018-04 (17 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

influenced by the size of the sample, as it changes the resolution in cumulative probability.
Thus, smaller samples will have less statistical power to reject the null hypothesis.

If the average difference 〈 〉 is greater than zero, other criteria are needed for rejecting the null
hypothesis. Previously it was mentioned that if the data meet all three rejection criteria
presented in Table 5, it is possible to reject the model. However, an alternative statistical
criterion for rejecting the model will be discussed.

Let us partition the cumulative distribution space in bins with an amplitude of each,
where corresponds to the number of elements in the sample and is the resolution of the
data. For any distribution model, the probability of randomly choosing an element from one
particular bin is . Thus, the number of elements in the sample belonging to any particular
bin can be described by a binomial distribution with trials and probability . Therefore, the
probability of sampling elements from a specific bin will be:

( )
( ) ( ) ( )( ) ( )
( )
(3.2)

which also corresponds to the probability of obtaining at least one bin with elements from
the sample. If corresponds to the maximum number of elements observed in a bin, for all
bins, then the probability of obtaining such result from the sampling process will also be ( ).
This means that a model with a number of maximum elements in a bin can be rejected with a
confidence:

( )
( )
( )
(3.3)

For example, let us test if the sample presented in Table 4 can be described by a uniform
distribution in the range [ ]. The hypotheses to be tested are:

( )
( )
(3.4)

Table 7 summarizes the calculations performed for testing the hypotheses given in Eq. (3.4). It
can be found that the average difference in cumulative probability between the observed
sample and the uniform model is 〈 〉 . Now, since the maximum number of
elements in a bin is , then ( ) ( ) and . Thus,
the uniform model can be rejected only with a confidence of . At this point, it is the
decision of the analyst whether to reject or not the model, based on such confidence level.

03/05/2018 ForsChem Research Reports 2018-04 (18 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Table 7. Calculations used for testing the hypotheses in Eq. (3.4)


Bin range Cumulative
Element Elements
x   probability
or Bin min max in Bin
difference
1 0.11012 0.11012 0.11012 0.0 0.1 0.01012 0
2 0.17361 0.17361 0.17361 0.1 0.2 0 2
3 0.25103 0.25103 0.25103 0.2 0.3 0 1
4 0.36132 0.36132 0.36132 0.3 0.4 0 2
5 0.39981 0.39981 0.39981 0.4 0.5 0.00019 1
6 0.43254 0.43254 0.43254 0.5 0.6 0.06746 2
7 0.58428 0.58428 0.58428 0.6 0.7 0.01572 0
8 0.59756 0.59756 0.59756 0.7 0.8 0.10244 0
9 0.87606 0.87606 0.87606 0.8 0.9 0 1
10 0.98245 0.98245 0.98245 0.9 1.0 0 1
Following conventional statistical criteria ( ), the uniform model cannot
be rejected.

Table 8 summarizes the heuristic criteria for model rejection proposed in the previous section.
Using these heuristics is also concluded that the uniform model should not be rejected.

Table 8. Criteria for model rejection in the testing of hypotheses given by Eq. (3.4).
Model Rejection
Values obtained Reject?
Criterion

( ) YES

〈 〉

〈 〉 NO

∑ NO

Let us now assume that we want to test if a normal distribution with mean 0.5 and standard
deviation 0.1 can describe the sample. Then, the hypothesis to be tested will be:

( )
( )
(3.5)

Table 9 and Table 10 summarize the corresponding calculations for testing these hypotheses. In
this case, since 〈 〉 , ( ) ( ) and . The

03/05/2018 ForsChem Research Reports 2018-04 (19 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

alternative hypothesis cannot be rejected with a confidence of . The heuristic criteria


also suggest rejecting the proposed normal distribution model with mean 0.5 and standard
deviation 0.1.

Table 9. Calculations used for testing the hypotheses in Eq. (3.5)


Bin range Cumulative
Element Elements
x   probability
or Bin min max in Bin
difference
1 0.11012 -3.89880 0.00005 0.0 0.1 0 4
2 0.17361 -3.26386 0.00055 0.1 0.2 0.09945 1
3 0.25103 -2.48967 0.00639 0.2 0.3 0.19361 1
4 0.36132 -1.38677 0.08276 0.3 0.4 0.21724 0
5 0.39981 -1.00186 0.15821 0.4 0.5 0.24179 0
6 0.43254 -0.67459 0.24997 0.5 0.6 0.25003 0
7 0.58428 0.84278 0.80032 0.6 0.7 0.10032 0
8 0.59756 0.97555 0.83536 0.7 0.8 0.03536 0
9 0.87606 3.76063 0.99992 0.8 0.9 0.09991 2
10 0.98245 4.82453 1.00000 0.9 1.0 0 2

Table 10. Criteria for model rejection in the testing of hypotheses given by Eq. (3.5).
Model Rejection
Values obtained Reject?
Criterion

( ) YES

〈 〉

〈 〉 YES

∑ YES

From Eq. (3.2), the minimum confidence of rejecting a model when the maximum number of
elements in a cumulative probability bin is 3, will range between ( ) and
( ) (using Stirling’s approximation). Since these values are in the
conventional range of statistical confidence used in testing hypotheses, a simple condition for
rejecting the null hypothesis is finding a maximum number of elements per bin greater or equal
than 3.

03/05/2018 ForsChem Research Reports 2018-04 (20 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

3.2. Testing the data sample against a specific population parameter

It is also possible to test whether or not the sample is represented by any population with a
certain parameter (e.g. expected value or variance), independently of the distribution or any
other parameter. For example, let us test if the data presented in Table 4 can be represented or
not by a population with a mean value of 0.5:

( )
( )
(3.6)

In this case, the following optimization problem must be solved for each distribution model
considered:

( )

( )

(3.7)

If the optimum obtained for any distribution model is zero, then the null hypothesis
cannot be rejected. Also, if , but the minimum value between the different models of
the maximum number of elements per bin is less than 3, then the null hypothesis cannot be
rejected with a minimum confidence between 94 and 96%.

Beginning with the normal distribution model, the optimization yields the following optimal
solution to Eq. (3.7):

〈 〉

(3.8)

Since the null hypothesis cannot be rejected. That is, the mean value of the population
from which the sample was taken is not significantly different from . Furthermore, none of
the heuristic criteria defined in Table 5 rejects the model, which is in agreement with the
previous conclusion. No additional models must be optimized since it was already
demonstrated that there exists at least one distribution adequately describing the sample data,
with an expected value of .

03/05/2018 ForsChem Research Reports 2018-04 (21 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Let us now test the standard deviation of the sample. Consider the following hypotheses to be
tested:

( )
( )
(3.9)

The optimization problem is now formulated as follows:

( )

( )
(3.10)

The optimal results for the most representative models from Table 2 are summarized in Table
11. The minimum maximum number of elements per bin among all the models was 4. Therefore,
using this set of models the alternative hypothesis cannot be rejected with a minimum
confidence of 94.3%. For all these models, the evaluation of heuristic criteria at the optimum
values resulted in the unanimous rejection of the null hypothesis.

Table 11. Optimal models identified for some standard distributions of Table 2, used for testing
the hypotheses given in Eq. (3.10).
Standard Optimal Parameters
Model Distribution 〈 〉
Type Other

Normal I 0.4136 0.1 7.63% 25.61% 0.1338 4

Truncated ̌ 0.4007
III 0.1103 0.7567 7.62% 25.51% 0.1332 4
Normal ̌ 0.1330

Uniform III 0.2609 0.3464 8.20% 23.35% 0.1442 4

Exponential II 0.3305 0.1 8.22% 22.10% 0.1279 4

Chi2 II 0.1200 0.3005 18.065 7.63% 23.52% 0.1296 4

Student’s t I 0.4112 0.1 17.053 7.63% 25.85% 0.1346 4

26.362
Fisher’s F II 0.1029 0.3176 7.64% 23.49% 0.1303 4
96.549

Weibull II 0.1563 0.2624 2.8449 7.63% 24.48% 0.1307 4

-1.6004
-20.3494
4th-order
III 0.1101 0.3476 87.3141 7.80% 30% 0.1554 4
Polynomial
-136.744
73.2777

03/05/2018 ForsChem Research Reports 2018-04 (22 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

3.3. Testing the data sample against a family of models of probability distribution

It would also be possible to map the possible values of the parameters in a given probability
distribution model, which would not result in a model rejection. Figure 7 for example, shows
the possible values of the mean and standard deviation in a normal probability model which
would not be rejected, considering different criteria. Figure 8 shows the region obtained when
all three heuristic criteria are used for rejecting the model.

Figure 7. Valid regions of values for the parameters ( ) and ( ) of a Normal distribution
model, identified from the data presented in Table 4. Green region: Values not rejected by
hypothesis testing. Purple region: Values rejected by hypothesis testing. Top left: Maximum
number of elements per cumulative probability bin criterion. Top right: Average difference in
cumulative probability criterion. Bottom left: Maximum difference in cumulative probability
criterion. Bottom right: Sum of squared differences in cumulative probability criterion.

03/05/2018 ForsChem Research Reports 2018-04 (23 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Figure 8. Valid regions of values for the parameters ( ) and ( ) of a Normal distribution
model, identified from the data presented in Table 4. Green region: Values not rejected by at
least one heuristic criterion given in Table 5. Purple region: Values unanimously rejected by the
three heuristics.

The heuristic criteria provides a range of values for the parameters with lower statistical
confidence compared to the alternative statistical criterion ( ), which is evident because
the valid region of values is smaller. However, the heuristic criteria are more oriented towards
the model performance, and therefore, for practical purposes they can be used as an
alternative to the statistical criteria for testing hypothesis.

4. Hypothesis Testing of Population Parameters identified from different


Samples

One of the most important applications of hypotheses testing is the comparison between
different data samples. In particular, we might be interested in comparing either the complete
probability distribution model, or just specific population parameters.

4.1. Testing two or more data samples against a common probability distribution model

If two or more samples were randomly taken from the same population, then it would be
expected that all samples could be represented by the same model of probability distribution.
The hypotheses to be tested can be expressed as follows:

03/05/2018 ForsChem Research Reports 2018-04 (24 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

(4.1)

Each sample ( ) should be tested against the model combining all sets of data samples
( ). Since the combined model contains a larger number of elements, it will be
obtained with a smaller (better) resolution in cumulative probability, and thus, it would be
more reliable.

The data sample included in Table 4 will be denoted as sample 1 ( ), whereas samples 2 ( )
and 3 ( ) are presented in Table 12. Sample 2 (containing 8 elements) was obtained from the
same population of sample 1 (uniform distribution between 0 and 1). On the other hand,
sample 3 (also with 8 elements) was obtained from a normal distribution with and
.

Table 12. Samples of 8 elements randomly obtained from two populations: : Uniform
probability in the range [0, 1]. : Normal distribution with and . Data sorted in
ascending order.
Measured value Measured value Cumulative probability range
Rank
Sample 2 ( ) Sample 3 ( ) Minimum Maximum
1 0.00616 1.63176 0.0% 12.5%
2 0.09499 1.97061 12.5% 25.0%
3 0.15033 2.08686 25.0% 37.5%
4 0.24442 2.12689 37.5% 50.0%
5 0.36195 2.35256 50.0% 62.5%
6 0.45029 2.41857 62.5% 75.0%
7 0.90463 2.68526 75.0% 87.5%
8 0.95468 2.69328 87.5% 100.0%

Let us first test if samples 1 and 2 can be described by the same distribution model. A model for
the extended sample was obtained by optimization using the standard distributions
presented in Table 2. The best model obtained was a 4th order polynomial (Type III) probability
distribution model with the following results (parameters and model performance):

〈 〉

(4.2)

03/05/2018 ForsChem Research Reports 2018-04 (25 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Thus, hypotheses given in Eq. (4.1) can be expressed as:

( [ ] )
( [ ] )
(4.3)
The test in Eq. (4.3) yields the following results:

〈 〉

(4.4)

No rejection criterion is met and therefore the null hypothesis cannot be rejected. That is,
sample 1 can be considered to belong to the same population as the extended sample .
Let us now test the hypotheses for :

( [ ] )
( [ ] )
(4.5)
Resulting in:
〈 〉

(4.6)

It is concluded that samples 1 and 2 do not show significant statistical differences, and they can
be considered random samples from the same population.

If we want to compare samples 1 and 3, we must first find the best model for the extended
sample . The best model obtained by optimization was again a 4th order polynomial
distribution model with the following parameters and performance:

〈 〉

(4.7)

03/05/2018 ForsChem Research Reports 2018-04 (26 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

The hypotheses to be tested for sample 1 are:

( [ ] )
( [ ] )
(4.8)

with the following results:


〈 〉

(4.9)

Clearly, the alternative hypothesis cannot be rejected, that is, sample 1 is significantly different
from the extended sample . On the other hand, the hypotheses tested for sample 3 are:

( [ ] )
( [ ] )
(4.10)

Then,
〈 〉

(4.11)

The alternative hypothesis cannot be rejected in this case either. Samples 1 and 3 do not
represent the same population.

It may be possible in some cases to find a fuzzy region where the statistical criterion might
indicate that the null hypothesis cannot be rejected, whereas the heuristics suggest that the
alternative hypothesis cannot be rejected, or vice versa. The recommendation in these
situations is getting additional data if possible, in order to improve the resolution of the test. If
no additional data is available, then the statistical criterion should prevail.

Let us now consider the extended sample . The best model obtained corresponds
th
to a 4 order polynomial distribution with the following parameters and performance:

03/05/2018 ForsChem Research Reports 2018-04 (27 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

〈 〉

(4.12)

Testing the hypotheses

( [ ] )
( [ ] )
(4.13)

The following results are obtained for sample 1:

〈 〉

(4.14)

For sample 2:
〈 〉

(4.15)

And for sample 3:


〈 〉

(4.16)

Since at least one of the samples is significantly different to the extended sample, then it can
be concluded that the three samples do not belong to the same population. In other words, at
least one of the samples is significantly different to the others. In the case of the second
sample, it was not possible to reject the null hypothesis. This is probably because the sample
considered was too small and no significant difference could be detected.

03/05/2018 ForsChem Research Reports 2018-04 (28 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

4.2. Testing the parameters estimated for two samples

If the full distribution models for two samples do not need to be compared, but just their
estimated population parameters ( ( ) or ( )), then the hypotheses will be expressed as:

( ) ( )
( ) ( )
(4.17)
or
( ) ( )
( ) ( )
(4.18)

For testing these hypotheses, it is recommended to assume only Type I standard distribution
models because the optimization problem is greatly simplified. For testing the hypotheses
given in Eq. (4.17) using Type I standard distributions, the following optimization problem must
be solved:

( ) ( )

(4.19)

where

( ) ( )

( )

( ) ( )
{
(4.20)

( ) ( )

( )

( ) ( )
{
(4.21)

03/05/2018 ForsChem Research Reports 2018-04 (29 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

The performance of the best models for each sample obtained is analyzed either using
statistical or heuristic criteria. If the model is rejected for at least one of the samples, then the
alternative hypothesis cannot be rejected.

For testing the hypotheses presented in Eq. (4.18), the following optimization problem must be
solved, considering Type I standard distributions:

( ) ( )

(4.22)
where

( ) ( )

( )

( ) ( )
{
(4.23)

( ) ( )

( )

( ) ( )
{
(4.24)

As an example, let us test if the populations represented by samples 2 and 3 may have the
same mean value, according to Eq. (4.17). After solving the optimization problem (4.19) for
different combinations of Type I standard models, the following optimal set of parameters and
performance were obtained for an exponential distribution on and a Binormal distribution
on :

̌ ̌ ̌
〈 〉 〈 〉

(4.25)

03/05/2018 ForsChem Research Reports 2018-04 (30 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Thus, there is no evidence that the mean value for both populations can be the same, and
therefore, the alternative hypothesis cannot be rejected.

If the equal variance test is performed (Eq. 4.18) for samples 2 and 3, then after solving the
optimization problem in Eq. (4.22) for normal distributions, the following results are obtained:

̌ ̌ ̌
〈 〉 〈 〉

(4.26)

This proofs that the standard deviations (or variances) of both populations can be equal, and
therefore, the null hypothesis cannot be rejected.

5. Comparison of Probability Distributions between two Populations

Finally, it is also interesting to obtain a quantitative measure of the similitude between two
different probability distribution models. Previously in Table 5, different performance values
were introduced when comparing cumulative probability distributions. Even though they allow
selecting the closest model in a group of possible distributions, they do not quantify the
similitude between two probability distribution models. Thus, let us define the similitude ( )
between two probability distribution models as:

( ) ∫ ( ( ) ( ))

(5.1)

The similitude between distribution models is related to the relative probability error [14]
by:
∫ ( ) ( )
( ) ( )
(5.2)

For example, let us assume that we want to determine the similitude between a Type I
standard Normal distribution and a Type III standard Uniform distribution. The similitude
between those models will be:

03/05/2018 ForsChem Research Reports 2018-04 (31 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

( )
( ) ∫ ( ) ∫ ∫ ∫ √
√ √

(5.3)

The graphical comparison between these two models can be seen in Figure 9. The left plot
corresponds to the probability density function, whereas the right plot corresponds to the
cumulative probability function. The similitude, defined by Eq. (5.1) or (5.2), represents the
common area between both models in the probability density plot.

Figure 9. Graphical comparison between the Type I standard Normal distribution (blue solid
line) and the Type III standard Uniform distribution (red dashed line). Left: Probability density
function. Right: Cumulative probability function.

In another example, the similitude between the Type I standard Normal distribution and the
Type I standard Student’s t distribution with is (Figure 10):

( )( )
( ) ∫
√ √ ( )
( )
(5.4)

Please notice that even though the cumulative probability distributions are almost identical,
the similitude between their probability density functions is only 95.04%. The comparison
between the cumulative probability distribution can be done using the model performance
metrics presented in Table 5.

03/05/2018 ForsChem Research Reports 2018-04 (32 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Figure 10. Graphical comparison between the Type I standard Normal distribution (blue solid
line) and the Type I standard Student’s t distribution with 5 degrees of freedom (green dashed
line). Left: Probability density function. Right: Cumulative probability function.

The comparison between two probability density distribution models can be expressed as the
following test:

( ) ( )
( ) ( )
(5.5)

Different criteria for rejecting the null hypothesis might be proposed. One simple approach is
to compare the similitude between the models with a certain minimum confidence . Thus, the
null hypothesis is rejected when:

( )
(5.6)

Furthermore, it is also possible to determine the similitude between two probability models
only in a certain specified range. In this case,

∫ ( ( ) ( ))
( [ ])
∫ ( ) ∫ ( )
(5.7)

For the same range, the relative probability error is:

∫ ( ) ( )
( [ ]) ( [ ])
∫ ( ) ∫ ( )
(5.8)

03/05/2018 ForsChem Research Reports 2018-04 (33 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

6. Conclusion

Current hypothesis testing methods are already more than one century old. During all this time,
there has been a huge progress in computational capabilities. In the present report, alternative
hypothesis testing methods are proposed based on the identification of random population
distribution parameters by numerical optimization. The proposed method allows considering a
wider range of probability distribution functions, including general polynomial distributions
capable of describing any arbitrary distribution. As usual, the purpose of hypothesis testing is
deciding which hypothesis (null or alternative) better describes the behavior of experimental
data samples. In the case of one-sample tests, it is possible to test whether:
 The sample may belong or not to a population with a specific probability distribution
model
 Certain parameters of the population (expected value, variance, standard deviation)
represented by the sample may take or not a specific value
 The sample may be represented or not by a certain family of probability distribution
models.
In the case of two-sample tests, it is possible to test whether:
 Both samples may belong or not to the same population
 Both samples may take or not the same value for certain parameters of the
corresponding populations (expected value, variance, standard deviation)
 The probability distribution models describing the population for each sample may be
considered similar or not.

In addition to the conventional statistical confidence criterion for rejecting the null hypothesis,
three different heuristic criteria are proposed measuring the fitness of the particular model(s)
considered by the hypothesis to the sample data. Although the use of objective quantitative
metrics (either statistical or heuristic) allow obtaining reproducible results methods for
analyzing the data, the criteria used for those metrics will always remain subjective. In the end,
the analyst must define the rejection criteria based on the particular problem considered, and
on the impact and implications of such decision. The consideration of both statistical and
heuristic criteria provides more information to the analyst during the decision process, and
therefore, it is strongly advisable.

It is expected that the proposed method for hypothesis testing can overcome certain
limitations of the current methods available, and that it can be used as a tool for data analysis
and decision-making in a wide range of application fields, particularly in scientific research.

03/05/2018 ForsChem Research Reports 2018-04 (34 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Acknowledgments

The author gratefully acknowledges Prof. Dr. Silvia Ochoa (Universidad de Antioquia,
Colombia), for helpful discussions on this topic.

This research did not receive any specific grant from funding agencies in the public,
commercial, or not-for-profit sectors.

References

[1] Kothari, C. R. (2004). Research methodology: Methods and techniques. 2nd Ed. New Delhi:
New Age International.

[2] Descartes, R. (1985). The Search for Truth by means of the Natural Light. In J. Cottingham,
R. Stoothoff, & D. Murdoch (Trans.), The Philosophical Writings of Descartes (pp. 400-420).
Cambridge: Cambridge University Press.

[3] Student. (1908). The probable error of a mean. Biometrika, 6(1), 1-25.

[4] Fisher, R. A. (1950). Statistical methods for research workers. 11th Ed. London: Oliver and
Boyd.

[5] Neyman, J., & Pearson, E. S. (1928). On the use and interpretation of certain test criteria for
purposes of statistical inference: Part I. Biometrika, 20A(1-2), 175-240.

[6] Goodman, S. N. (1999). Toward evidence-based medical statistics. 1: The P value fallacy.
Annals of internal medicine, 130(12), 995-1004.

[7] Moyé, L. & Cohen, M. (2018). Liberation From the P Value’s Tyranny. Circulation Research,
122, 1046-1048.

[8] Cumming, G. (2014). The new statistics: Why and how. Psychological science, 25(1), 7-29.

[9] Ioannidis, J. P. (2018). The Proposal to Lower P Value Thresholds to .005. JAMA, 319 (14),
1429-1430.

[10] Wasserstein, R. L., & Lazar, N. A. (2016). The ASA's statement on p-values: context,
process, and purpose. The American Statistician, 70(2), 129-133.

[11] Hernandez, H. (2018). Multidimensional Randomness, Standard Random Variables and


Variance Algebra. ForsChem Research Reports 2018-02. doi: 10.13140/RG.2.2.11902.48966.

03/05/2018 ForsChem Research Reports 2018-04 (35 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

[12] Hernandez, H. (2017). Standard Maxwell-Boltzmann distribution: Definition and properties.


ForsChem Research Reports 2017-2. doi: 10.13140/RG.2.2.29888.74244.

[13] Hernandez, H. (2017). Standard Maxwell-Boltzmann Distribution: Additional Nonlinear and


Multivariate Properties. ForsChem Research Reports 2017-14. doi: 10.13140/RG.2.2.35761.07520.

[14] Hernandez, H. (2017). Multicomponent Molecular Collision Kinetics: Rigorous Collision Time
Distribution. ForsChem Research Reports 2017-7. doi: 10.13140/RG.2.2.26218.31689.

[15] Byrd, R. H., Lu, P., Nocedal, J. and Zhu, C. (1995) A limited memory algorithm for bound
constrained optimization. SIAM J. Scientific Computing, 16, 1190–1208.

[16] Altman, N. S. (1992). An introduction to kernel and nearest-neighbor nonparametric


regression. The American Statistician, 46(3), 175-185.

[17] Hernandez, H. (2017). Multivariate Probability Theory: Determination of Probability Density


Functions. ForsChem Research Reports 2017-13. doi: 10.13140/RG.2.2.28214.60481.

[18] R Core Team (2016). R: A language and environment for statistical computing. R
Foundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/.

Appendix. Software implementation

The method described in the present report for hypothesis testing based on the optimal
parameter identification of probability distribution models was implemented in R language
[18].

The script, available as Supporting Information, contains the following functions:

RDmodel (sRD, k, c, param)

This function creates a vector with all the information describing the model.

sRD is a number or a name which indicates the standard random distribution considered in the
model. In the current implementation, 17 different standard random distributions were
included. The possible values of sRD are listed in Table A1. At the end of each name, the
standard random variable type was added. When the name is used, it must be given within
quotes (“”). If no value is giving, by default the Normal distribution is considered.

03/05/2018 ForsChem Research Reports 2018-04 (36 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Table A1. Codes, names and parameters of the 17 standard random distribution included in the
algorithm
sRD code sRD Name Default parameters
1 Normal I None
2 Truncated Normal III ̌ ̌
3 Uniform I None
4 Uniform III None
5 Exponential I None
6 Exponential II None
7 Maxwell-Boltzmann II None
8 Chi2 II
9 Student I
10 Fisher II
11 Gamma II
12 Weibull II
13 Scopd II None
14 Polynomial III [ ]
15 Log-Normal II ̌ ̌
16 Normal+Uniform I
17 Binormal I ̌ ̌ ̌

and represent the values of the transformation coefficients used to convert the standard
random distribution into a general random distribution, according to Eq. (1.2). If no values are
given, it will be considered by default that and , corresponding to the original
standard random distribution.

param is a vector of coefficients representing the parameter for each distribution type. If no
parameters are given, the default values will be considered according to Table A1. If the
distribution has more than one parameter, they should be included in the same order indicated
in Table A1. In the case of the polynomial model, the parameters represent the coefficients
from the linear term to the highest order term. The intercept is not included in the parameters
of the polynomial model, because it is calculated automatically so that the total area of the
probability density function is always 1.

Example:
model1 = RDmodel(sRD=17, k=2, c=0.5, param=c(-2,1,0.5))

The result obtained is the following vector:


[ ]

The same result is obtained using:


model1 = RDmodel(sRD="Binormal I", k=2, c=0.5, param=c(-2,1,0.5))

03/05/2018 ForsChem Research Reports 2018-04 (37 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

HypoTest (Sample1, Sample2, RDmodel, E, Var, sRD, disp)

This function is used for hypothesis testing.

Sample1 is the vector containing the data of the sample of interest. This argument is always
required.

Sample2 is an optional argument. It is required when testing two samples. Sample2 is also a
vector of data representing either a second sample, or the complement of Sample1 in an
extended sample.

RDmodel is a vector representing the model to be tested. The RDmodel vector can be created
the RDmodel function described earlier. It is an optional argument, depending on the
hypothesis to be tested.

For one-sample tests, E represents the value of the expected value used as a reference in the
test. For two-sample tests, it is used only as a flag for comparing the expected values of both
samples. In this case, any non-NULL value of E can be used.

Similarly, for one-sample tests, Var represents the value of the population variance used as a
reference in the test. For two-sample tests, it is used only as a flag for comparing the variances
of both samples. In this case, any non-NULL value of Var can be used.

sRD is a vector of numbers indicating the standard random distribution to be considered in the
test. If no sRD vector is given, all possible models will be considered. The use of RDmodel
overrides the information given in sRD.

disp is a Boolean variable indicating if additional results are displayed or not. By default, it is set
as FALSE.

Examples:

Let us first define some data to be used. From the example presented in this report, we
have:

S1=c(0.11012,0.17361,0.25103,0.36132,0.39981,0.43254,0.58428,0.59756,0.87606,0.98245)
S2=c(0.00616,0.09499,0.15033,0.24442,0.36195,0.45029,0.90463,0.95468)

Testing the data sample against a specific probability distribution model : The hypotheses
given in Eq. (3.5) can be tested as follows:

HypoTest(S1,RDmodel=RDmodel(sRD=1,k=0.5,c=0.1),disp=TRUE)

03/05/2018 ForsChem Research Reports 2018-04 (38 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

The following result is obtained:

avgdiff maxdiff SSE m StatReject HeurReject


1 0.1237759 0.250035 0.236858 4 TRUE TRUE
[1] "The Alternative Hypothesis cannot be Rejected. Cumulative
probability resolution = 10 %"

Testing the data sample against a specific population parameter: Hypotheses presented
in Eq. (3.6) can be tested as follows:

HypoTest(S1,E=0.5,disp=TRUE)

[1] "Best model found:"


model type xmin xmax E Var Stdev k
1 Fisher II 2 -0.128482 Inf 0.5 0.1094449 0.3308246 -0.128482
C par
0.628482 v1 = 14.4044173029045 ; v1 = 14.4044173029045
avgdiff maxdiff SSE m StatReject HeurReject
1 0 0 0 1 FALSE FALSE
[1] "The Null Hypothesis cannot be Rejected. Cumulative probability
resolution = 10 %"

Testing Eq. (3.6) using only a normal distribution model is:

HypoTest(S1,E=0.5,sRD=1,disp=TRUE)

[1] "Best model found:"


model type xmin xmax E Var Stdev k c par
1 Normal I 1 -Inf Inf 0.5 0.09254421 0.3042108 0.5 0.3042108 NONE
avgdiff maxdiff SSE m StatReject HeurReject
1 0.01910189 0.08774736 0.01405214 2 FALSE FALSE
[1] "The Null Hypothesis cannot be Rejected. Cumulative probability
resolution = 10 %"

For a variance (or standard deviation) comparison (Eq. 3.9) using a Weibull distribution
model:

HypoTest(S1,Var=0.01,sRD=12,disp=TRUE)

[1] "Best model found:"


Model type xmin xmax E Var Stdev k
1 Weibull II 2 0.1563301 Inf 0.4186934 0.01 0.1 0.1563301
C par
0.2623633 a = 2.8449128105636
avgdiff maxdiff SSE m StatReject HeurReject
1 0.07631703 0.2448014 0.130651 4 TRUE TRUE
[1] "The Alternative Hypothesis cannot be Rejected. Cumulative
probability resolution = 10 %"

03/05/2018 ForsChem Research Reports 2018-04 (39 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Testing two or more data samples against a common probability distribution model:
Testing whether S1 belongs to the same population as S2 can be done as follows:

HypoTest(S1,S2,disp=TRUE)

[1] "Best model found for the extended sample:"


model type xmin xmax E Var
1 Polynomial III 3 0.006158128 0.9825174 0.4413857 0.08622722
Stdev k c
0.2936447 0.006158128 0.9763593
par
a 0 = 1.17205015627389 ;
a 1 = -1.16 721752339294 ;
a 2 = 19.4130584669568 ;
a 3 = -53.4119243543043 ;
a 4 = 36.4676010250652
avgdiff maxdiff SSE m StatReject HeurReject
1 0.004933455 0.02880587 0.001873135 2 FALSE FALSE
[1] "Performance for sample 1:"
avgdiff maxdiff SSE m StatReject HeurReject
1 0.01662549 0.07325032 0.007388809 2 FALSE FALSE
[1] "The Null Hypothesis cannot be Rejected. Cumulative probability
resolution = 10 %"

Testing the parameters estimated for two samples: Comparing the expected value
between two samples (Eq. 4.17) assuming type III uniform distributions:

HypoTest(S1,S2,E=TRUE,sRD=4,disp=TRUE)

[1] "Best models found:"


model type xmin xmax E Var
1 Uniform III 3 0.05549385 0.8096155 0.4325547 0.04739162
Stdev k c par
0.2176962 0.05549385 0.7541216 NONE
avgdiff maxdiff SSE m StatReject HeurReject
1 0.01067538 0.1 0.01003211 3 TRUE FALSE
model type xmin xmax E Var
1 Uniform III 3 -0.1970688 1.062178 0.4325547 0.1321419
Stdev k c par
0.3635133 -0.1970688 1.259247 NONE
avgdiff maxdiff SSE m StatReject HeurReject
1 0.02847207 0.1109159 0.01736572 2 FALSE FALSE
[1] "The Alternative Hypothesis cannot be Rejected for this sample.
A larger sample is needed for a better conclusion! Cumulative
probability resolution = 10 %"

03/05/2018 ForsChem Research Reports 2018-04 (40 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

modsimil (RDmodel1, RDmodel2, xmin, xmax, nsteps)

This function calculates the similitude between two probability distribution models
represented by RDmodel1 and RDmodel2, in the range of values between xmin and xmax. Since
the calculation is numerical, the number of steps used in the integration can be given. By
default, xmin = -10, xmax = 10 and nsteps = 100000.

Example:

Calculate the similitude between the standard normal distribution and the type III
standard uniform distribution in the range from -3 to 3:

modsimil (RDmodel(sRD=1),RDmodel(sRD=4),xmin=-3,xmax=3)

The result obtained is: 0.3418122.

Similarly, the relative probability error between two models can be calculated using:

rperror (RDmodel(sRD=1),RDmodel(sRD=4),xmin=-3,xmax=3)

The result 0.6581878, is the complement of the model similitude calculated above.

Other useful functions include:

RDprop (RDmodel)

This function returns a data frame with the following information about the model described
by the vector RDmodel:

 model: Model name


 type: Type of standard random variable considered
 xmin: Minimum value allowed for the random variable
 xmax: Maximum value allowed for the random variable
 E: Expected value of the random distribution
 Var: Variance of the random distribution
 Stdev: Standard deviation of the random distribution
 k: Value of the transformation coefficient k
 c: Value of the transformation coefficient c
 par: Parameters of the distribution model

03/05/2018 ForsChem Research Reports 2018-04 (41 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Example:
mprop = RDprop(c(17,2,0.5,-2,1,0.5))

The result obtained is the following data frame:


model type xmin xmax E Var Stdev k c par
Binormal I 1 -Inf Inf 2 0.25 0.5 2 0.5 u1 = -2 ; u2 = 1 ; s1 = 0.5

The same result is obtained using the vector created in the previous example:
mprop = RDprop(model1)

RDF (x, RDmodel, cumul)

This function calculates the probability density function or the cumulative probability function
of a model described by RDmodel, when the random variable has a value of x.

x can represent either a single value or a vector of values to be evaluated.

cumul is a parameter with possible values:

0 Probability density function


1 Cumulative probability function

By default, the function RDF calculates the cumulative probability of the distribution.

Example:
f = RDF(1,model1,0)

Returns the probability density function of the Binormal described earlier when x=1.
The result obtained is: 0.2745584
On the other hand, the expression:
phi = RDF(1,model1)

returns the corresponding cumulative probability. In this case: 0.1701717

modperf (x, RDmodel)

This function evaluates the performance (statistical and heuristic) of a certain model RDmodel
to fit a set of data given in x.

03/05/2018 ForsChem Research Reports 2018-04 (42 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

Example:

Evaluate the performance of the type III standard uniform distribution to fit the sample
1 defined before:

modperf(S1,RDmodel(sRD=4))

The result obtained is:

avgdiff maxdiff SSE m StatReject HeurReject


1 0.019593 0.10244 0.01539437 2 FALSE FALSE

The first three results are the heuristic performance metrics. The fourth is the statistical
criterion of model fit. The final columns indicate the statistical and heuristic
recommendations about rejecting the model.

modelpi (x, k, c, sRD, param, E, Var)

This function determines by numerical optimization the best model fitting a data set given in x.
The parameters k, c, sRD, param, E and Var are optional. When some of these parameters are
given, the optimization is restricted only to those values. The output contains the following
information: optimal standard model (sRD), optimal value of k, optimal value of c, optimal
value of other parameters.

Example:

The optimal polynomial distribution fitting the extended sample combining S1 and S2
can be found as follows:

optmodel=modelpi(c(S1,S2),sRD=14)

The result obtained is:

[1] 14.000000000 0.006158128 0.976359303 -1.167217523


19.413058467 -53.411924354 36.467601025

Please notice that the value of the intercept of the polynomial is not considered as a
parameter, because it is calculated directly from a constraint.

03/05/2018 ForsChem Research Reports 2018-04 (43 / 44)


www.forschem.org
Parameter Identification using Standard Transformations:
An Alternative Hypothesis Testing Method
Hugo Hernandez
ForsChem Research
hugo.hernandez@forschem.org

plotRD (RDmodel, xmin, xmax, nsteps)

This function makes two plots for a given probability model RDmodel. The first plot is the
probability density function between xmin and xmax considering nsteps data points. The
second plot is the corresponding cumulative probability plot.

Example:

plotRD(RDmodel(sRD=17,param=c(-3,3,0.8)))

Results in the following plots:

Binormal I
k=0
c=1
u1 = -3 ; u2 = 3 ; s1 = 0.8
0.25
0.20
Probability density function

0.15
0.10
0.05
0.00

-10 -5 0 5 10

Binormal I
k=0
c=1
u1 = -3 ; u2 = 3 ; s1 = 0.8
1.0
0.8
Cumulative probability

0.6
0.4
0.2
0.0

-10 -5 0 5 10

03/05/2018 ForsChem Research Reports 2018-04 (44 / 44)


www.forschem.org

Вам также может понравиться