Application of bayesian scientific approach to constructing the statistical estimations for solving metrological and measurement problems Aplicación del enfoque científico bayesiano a la construcción de estimaciones estadísticas para resolver problemas metrológicos y de medición

Nowadays, constructing effective statistical estimates with a limited amount of statistical information constitutes a significant practical problem. The article is devoted to applying the Bayesian scientific approach to the construction of statistical estimates of the parameters of the laws of distribution of random variables. Five distribution laws are considered: The Poisson law, the exponential law, the uniform law, the Pareto law, and the ordinary law. The concept of distribution laws that conjugate with the observed population was introduced and used. It is shown that for considered distribution laws, the parameters of the laws themselves are random variables and obey the typical law, gamma law, gamma normal law, and Pareto law. Recalculation formulas are obtained to refine the parameters of these laws, taking into account posterior information. If we apply the recalculation formulas several times in a row, we will get some convergent process. Based

on a converging process, it is possible to design a process for self-learning a system or self-tuning a system. The developed scientific approach was applied to solve the measuring problems for the testing measuring devices and technical systems. The results of constructing point estimates and constructing interval estimates for these laws' parameters are given. The results of comparison with the corresponding statistical estimates constructed by the classical maximum likelihood method are presented.
Keywords: measurement accuracy, Bayesian scientific approach, a posteriori information, metrological and measurement problems.

INTRODUCTION
The problem of constructing effective statistical estimates is an important applied task. This problem has to be solved when conducting scientific research related with processing of statistical data in areas such as biochemistry, machine vision problem, automated digital control problem, the development and implementation of the concept of a smart home -a smart city, problem of economical simulation, for the purpose of development and implementation of new technologies in manufacture (Vishnyakov & Egorov, 2013: Duyguİçen, 2019: Yang et al, 2018: Higgins et al, 2019: Touzani et al, 2019: & Butenweg, 2019.
In (Ayvazyan, 2008). the general scheme of the Bayesian approach in statistical estimation in econometrics was described. Some other applied problem of applications of Bayesian scientific approach including the construction and investigation of self-leaning systems and development of pattern recognition problem are described in (Kropotov, & Vetrov, 2007: Yochan & Jinkyun, 2019, Wang et al, 2019: Geweke & Durham, 2019: Michael et al, 2018.
Investigations described in there were devoted to practical problems of construction of effective statistical estimation when processing measurement results, when setting and studying measurement problems, and when processing the results of tests of measuring equipment. In the Bayesian approach is described in the problems of constructing statistical estimates in case when the studied statistical sampling of data has a normal distribution law. However, for other distribution laws in solving metrological problems, the Bayesian approach has not yet been developed and used (Lavrik et al, 2019: Francisco et al, 2019: Gao et al, 2019: Mishchenko et al, 2021.
This article describes a method for constructing statistical parameter estimates for solving measurement problems and processing test results for five fairly common distribution laws: Poisson's law, exponential law, uniform law, Pareto law with unknown shape parameter and known shift parameter and normal law in two cases: as with unknown means and known dispersion, as unknown means and unknown dispersion. The concept of distributions conjugated with the observed population is introduced and used. The method for calculating specific values of the parameters of conjugated distribution laws was developed. Algorithm for correcting these parameters is described with joint consideration of a priori and posterior information was created. Examples of constructing of point estimates and of interval estimates are presented : Volchkov et al, 2019: Khayrullin, 2019.

General scheme of the Bayesian approach in statistical estimation
Let the distribution law of the analyzed random variable depends on s -dimensional vector of numerical parameters ) ,..., , ( Here capital letter is used to denote vector, and small letters are used to denote scalar quantities. The problem is to construct the best, in a certain sense, statistical estimation  of this vector of parameters on the base of available statistical sampling ) ,..., , ( Here capital letter is used to denote statistical data in general and small letters are used to denote specific realizations of a random variable.
The general logic scheme of the Bayesian scientific approach in statistical estimation procedure is presented in Figure1.

Figure1. General logical scheme of the Bayesian approach in statistical estimation
Let us describe the implementation of the Bayesian estimation scheme for the components of vector of parameter  . A priori information about the vector of parameters is based on the background of the functioning of the analyzed process and on expert evaluations of its essence and specificity too. We assume that a priori information is given by means of function of the distribution density ) -the meaning of the density function of the observed random variable ) ,..., , ( ,..., , 2 1 with a fixed one  are statistically independent and its form a random sample from the analyzed set. So, getting new statistical data, we attach the corresponding sample (empirical) information to the available a priori information about the parameter (as a function ) (  The calculation of the posterior distribution ) ,..., , ( marked by a wave from above is carried out using the Bayes formula: (2) The construction of Bayesian point estimates and interval estimates is based on knowledge of the posterior distribution ) ,..., , ( 2 1 n X X X   given by relation (2). In particular, the average value of this distribution is used as Bayesian point estimates: it is enough for us to know only the numerator of the right-hand side of (2), since the denominator of this expression plays the role of a normalizing factor and does not depend on  . This fact greatly simplifies the process of practical construction of statistical estimates.
We also note one important optimal property of the estimate if it is closed with respect to operation (2) of converting a priori distribution law to the posterior one. Thus, the use of probability distributions conjugate with respect to L laws as a priori laws makes it necessary only to recalculate the numerical values of the parameters of the known distribution law in the transition from a priori distribution law to a posterior distribution law.  . Now we provide that the conditions for the existence of a conjugate a priori distribution are satisfied for all the distribution laws considered above.
Poisson distribution: We have: In this case, we have:

Distribution uniform on a closed interval
In this case, we have: m = 1; Pareto distribution with an unknown shape parameter value  and a known shift value 0 x : Normal distribution law with known dispersion 2 0  : Respectively:

Normal distribution with unknown means
Let random value  has the normal distribution Thus, for each considered distribution laws, there is an a priori distribution law conjugate with likelihood function L (4). These conjugate law depends on one or two unknown parameters.

The technique of finding a set of a priori distribution laws conjugating with the observed general statistical set
The general form of the posterior distribution ) ,..., , ( (2) is determined, accurate to the normalizing constant, only by the numerator of the right-hand side of this formula. Therefore, bellow when analyzing equalities that are accurate up to the normalizing constant, we will use the sign  .
We describe the main steps of the technique.
Step 1: Check condition (4) for the existence of a set of a priori distributions conjugate to the likelihood function L .
Step 2: If the likelihood function L admits representation (4) Note that for the a priori distributions determined in this way, the well-known rule of normalizing the probability density function may be violated. However, this does not cause "technical inconvenience", since recalculation of such an "improper" a priori density function ) (  into a posterior one according to formula (2) gives an ordinary density function ) ,..., , ( satisfies the normalization condition. Step 3: The posteriori distribution function is recalculated using formula (2). Note that the first recount immediately yields the corresponding form of a posterior distribution associated with the likelihood function.
Step 4: The parameters of the distribution density conjugating with the likelihood function are refined.
Let us demonstrate the implementation of the technique for the distribution laws considered above.
Poisson stream. It follows from the meaning of the parameter  that it can only take positive values, therefore, we determine Then, given the fact that The right-hand side of this relation is (up to a normalizing factor not dependent on  ) the gamma distribution density law with parameters Consequently, the family of conjugate a priori distributions of the parameter  of the observed general population belongs to the class of gamma distribution laws (5) Then, given the fact that we have But the right-hand side of the last relation is (up to a normalizing factor independent on  ) the Pareto distribution density of the form The right-hand side of (8) under condition (7) determines (up to a normalizing factor independent of the parameter  ) the gamma distribution density (5)  Thus, the conjugate a priori distributions of the shape parameter  of the observed Paretodistributed general population belong to set of gamma -distribution laws.

Normal distribution law with known dispersion:
Since the parameter  can take any positive or negative values, we determine The right-hand side of formula (9) is (up to a normalizing factor independent of  ), the density of the normal distribution with average value x and dispersion n / ) itself belongs to the class of normal distribution law (9).

Normal distribution law with unknown means and unknown dispersion:
Note that for the Problem 2 the right-hand side is (up to a normalizing factor independent of  and h ) the density of two-dimensional gamma -normal distribution law : Consequently, the set of conjugate a priori distribution laws of a two-dimensional parameter belongs to the class of two -dimensional gamma-normal distribution law (10).

Method for calculating specific parameter values in conjugate a priori distribution laws.
Let we know the a priori mean values of the estimated parameter ) ,..., , ( from the solution of the system of equations The solution to has the form: 1312 Using as a priori laws the probability distributions associated with the observed general population allows us to determine their general form, i.e., it defines a whole set of a priori distribution laws )} ; ( { D   . However, when implementing the Bayesian approach, we must operate with a specific a priori distribution law, which requires knowledge of the numerical values 0 D of the parameters D . Since the calculation of parameters for the normal law with unknown means and known dispersion is obviously, we describe the procedure for calculating parameters only for the normal law with unknown means and unknown dispersion. From the properties of two-dimensional gamma -normal distribution law it follows that the partial a priori distribution of a parameter h is a gamma distribution law with parameters  and  . Therefore, using the given values of (13)

1313
In view of (13), using the gamma distribution (5) as the a priori distribution of the parameter, we have: . This confirms that the conjugacy of the a priori gamma distribution, and the posterior gamma distribution is determined by the parameters Exponential distribution. Using the gamma distribution (5) as the a priori distribution of the parameter, we have: We see that the posterior distribution of the parameter again obeys the gamma distribution law (5), but with the parameters Uniform distribution. Using the Pareto distribution (6) as the a priori distribution of the parameter, we have: It follows that the posterior distribution of the parameter  is described, as well as the a priori distribution, by the Pareto law, but with the parameters: Pareto distribution. Using the gamma distribution (5) as the a priori distribution of the parameter  , we have: It can be seen that the posterior distribution of the parameter  again obeys the gamma distribution law (5), but with the parameters Normal law with known dispersion.
Note that the average value 1 d and dispersion 2 d of a posterior normal distribution law are the weighted average values of a priori and sample mean and variances, respectively.
Normal law with known dispersion. When implementing the general scheme for converting a priori parameters into a posteriori parameters ones in this case, one should take into account the representation of the likelihood function L in the form (6); a priori density form of twodimensional gamma -normal distribution (10)   randomly selected values of the measured parameter y (see Table 2). . Table 3 shows the point estimates and confidence intervals based on the Bayesian approach and the MLM. It can be seen that the application of the Bayesian approach allows one to construct more accurate and reliable estimates. Figure 2 shows a general view of gamma -normal distribution law.  is 0,95 and 0,975, respectively. Note that with increasing n confidence areas will become more and more similar to ellipses, since the gammanormal distribution will tend to a two-dimensional normal law. We also note that currently in the scientific works of other authors the methods for constructing confidence regions which have the shapes of ellipses, rectangles, ellipsoids are described and implemented. Thus, results of simulation demonstrate that the Bayesian approach made it possible to narrow the confidence interval by 1.9 times in comparison with the maximum likelihood method.

DISCUSSIONS
Modern innovative projects lead to the need to develop new measurement technical means and devices with specified technical, metrological and operational characteristics. The above characteristics of a new creating product are detailed in the relevant technical specifications of the development of a new product. Before the introduction of these technical means and devices or before the state acceptance of these technical means and devices, a whole test cycle is carried out. The goal of testing these devices is to confirm the specified characteristics defined in the technical projects. To achieve this goal, the results of testing are carefully analyzed, including processed by statistical methods.
The article presents a method for constructing statistical estimates of the distribution parameters of random variables for the following laws: Poisson law, exponential law, uniform law, Pareto law and normal law. The presented results, cover a fairly wide variety of distribution laws encountered in the practice of solving measurement problems, in the practice of solving problems of increasing the quality of construction materials and in the practice of working the results of testing of measuring devices.
When constructing statistical estimates based on the Bayesian approach, distributions conjugating with the observed general statistical set play an important role. The article formulates the necessary conditions for the existence of conjugate distributions. An algorithm for calculating the unknown parameters of the above distribution laws, as well as an algorithm for calculating the unknown parameters of the conjugate distributions are described.
The Bayesian approach can provide significant gains in accuracy with limited sample sizes and numbers compared to the traditional maximum likelihood method. This circumstance makes the proposed method especially effective in the tasks of evaluating the metrological characteristics of measuring complexes and measuring instruments, in the case when repeated repetition of tests seems burdensome or impossible. In the case when we are able to increase the volume and number of sampling data, both approaches as Bayesian approach as MLM will give ever closer results.
Using a priori information about an unknown parameter (unknown parameters) allows us to construct effective statistical estimates. In the examples considered in the paper the Bayesian scientific approach allowed us to halve the range of confidence intervals in comparison with the classical MLM.
The results obtained in the article can find application in the development of measurement methods, in the verification and calibration of measuring instruments, in the development of practical methods for identifying systematic errors and so on.
The algorithms and results obtained in the article are aimed at methodological support of the problems described above. The algorithms are based on taking account the available statistical data together with a priori information about the process or object under study.
The developed method can be used in order to create self-learning and self-tuning systems. For this purpose, it is necessary to consistently apply relevant recalculation formulas.