This work describes the procedure of selecting an approriate probability distribution of any variable uisng Propagate package in R

The propagate package can be install and call in R or RStudio using the following commands

##install.packages("propagate")
library(propagate)
## Warning: package 'propagate' was built under R version 4.1.2
## Loading required package: MASS
## Loading required package: tmvtnorm
## Warning: package 'tmvtnorm' was built under R version 4.1.2
## Loading required package: mvtnorm
## Loading required package: Matrix
## Loading required package: stats4
## Loading required package: gmm
## Warning: package 'gmm' was built under R version 4.1.2
## Loading required package: sandwich
## Warning: package 'sandwich' was built under R version 4.1.2
## Loading required package: Rcpp
## Warning: package 'Rcpp' was built under R version 4.1.2
## Loading required package: ff
## Warning: package 'ff' was built under R version 4.1.2
## Loading required package: bit
## Warning: package 'bit' was built under R version 4.1.2
## 
## Attaching package: 'bit'
## The following object is masked from 'package:base':
## 
##     xor
## Attaching package ff
## - getOption("fftempdir")=="C:/Users/DR9C3F~1.ZUL/AppData/Local/Temp/RtmpCCzjGg/ff"
## - getOption("ffextension")=="ff"
## - getOption("ffdrop")==TRUE
## - getOption("fffinonexit")==TRUE
## - getOption("ffpagesize")==65536
## - getOption("ffcaching")=="mmnoflush"  -- consider "ffeachflush" if your system stalls on large writes
## - getOption("ffbatchbytes")==16777216 -- consider a different value for tuning your system
## - getOption("ffmaxbytes")==536870912 -- consider a different value for tuning your system
## 
## Attaching package: 'ff'
## The following objects are masked from 'package:utils':
## 
##     write.csv, write.csv2
## The following objects are masked from 'package:base':
## 
##     is.factor, is.ordered
## Loading required package: minpack.lm
## Warning: package 'minpack.lm' was built under R version 4.1.2

Let generate a random vector of numerical values. Here, I will generate the vector from normal distribution

x=rnorm(10000,0,1)

Let check the histogram of x.

hist(x)

Let search an appropriate probability distribution on x using fitDistr command.

g=fitDistr(x)
## 1 of 32: Fitting Normal distribution...
## .........
## 2 of 32: Fitting Skewed-normal distribution...
## .........10.........20.......
## 3 of 32: Fitting Generalized normal distribution...
## .........10.........20.......
## 4 of 32: Fitting Log-normal distribution...
## .........
## 5 of 32: Fitting Scaled/shifted t- distribution...
## .........10.........20.......
## 6 of 32: Fitting Logistic distribution...
## .........
## 7 of 32: Fitting Uniform distribution...
## .........
## 8 of 32: Fitting Triangular distribution...
## .........10.........20.......
## 9 of 32: Fitting Trapezoidal distribution...
## .........10.........20.........30.........40.........50
## .........60.........70.........80.
## 10 of 32: Fitting Curvilinear Trapezoidal distribution...
## .........10.........20.......
## 11 of 32: Fitting Gamma distribution...
## .........
## 12 of 32: Fitting Inverse Gamma distribution...
## .........
## 13 of 32: Fitting Cauchy distribution...
## .........
## 14 of 32: Fitting Laplace distribution...
## .........
## 15 of 32: Fitting Gumbel distribution...
## .........
## 16 of 32: Fitting Johnson SU distribution...
## .........10.........20.........30.........40.........50
## .........60.........70.........80.
## 17 of 32: Fitting Johnson SB distribution...
## .........10.........20.........30.........40.........50
## .........60.........70.........80.
## 18 of 32: Fitting 3P Weibull distribution...
## .........10.........20.......
## 19 of 32: Fitting 2P Beta distribution...
## .........
## 20 of 32: Fitting 4P Beta distribution...
## .........10.........20.........30.........40.........50
## .........60.........70.........80.
## 21 of 32: Fitting Arcsine distribution...
## .........
## 22 of 32: Fitting von Mises distribution...
## .........
## 23 of 32: Fitting Inverse Gaussian distribution...
## .........
## 24 of 32: Fitting Generalized Extreme Value distribution...
## .........10.........20.......
## 25 of 32: Fitting Rayleigh distribution...
## .........
## 26 of 32: Fitting Chi-Square distribution...
## ...
## 27 of 32: Fitting Exponential distribution...
## ...
## 28 of 32: Fitting F- distribution...
## .........
## 29 of 32: Fitting Burr distribution...
## ...
## 30 of 32: Fitting Chi distribution...
## ...
## 31 of 32: Fitting Inverse Chi-Square distribution...
## ...
## 32 of 32: Fitting Cosine distribution...
## .........

You can can see that the selected probability distribution is normal having minim value of BIC. Toc check the BIC of other probability function, we will use the following command.

##BIC values
fitDistr(x,plot="qq")$stat
## 1 of 32: Fitting Normal distribution...
## .........
## 2 of 32: Fitting Skewed-normal distribution...
## .........10.........20.......
## 3 of 32: Fitting Generalized normal distribution...
## .........10.........20.......
## 4 of 32: Fitting Log-normal distribution...
## .........
## 5 of 32: Fitting Scaled/shifted t- distribution...
## .........10.........20.......
## 6 of 32: Fitting Logistic distribution...
## .........
## 7 of 32: Fitting Uniform distribution...
## .........
## 8 of 32: Fitting Triangular distribution...
## .........10.........20.......
## 9 of 32: Fitting Trapezoidal distribution...
## .........10.........20.........30.........40.........50
## .........60.........70.........80.
## 10 of 32: Fitting Curvilinear Trapezoidal distribution...
## .........10.........20.......
## 11 of 32: Fitting Gamma distribution...
## .........
## 12 of 32: Fitting Inverse Gamma distribution...
## .........
## 13 of 32: Fitting Cauchy distribution...
## .........
## 14 of 32: Fitting Laplace distribution...
## .........
## 15 of 32: Fitting Gumbel distribution...
## .........
## 16 of 32: Fitting Johnson SU distribution...
## .........10.........20.........30.........40.........50
## .........60.........70.........80.
## 17 of 32: Fitting Johnson SB distribution...
## .........10.........20.........30.........40.........50
## .........60.........70.........80.
## 18 of 32: Fitting 3P Weibull distribution...
## .........10.........20.......
## 19 of 32: Fitting 2P Beta distribution...
## .........
## 20 of 32: Fitting 4P Beta distribution...
## .........10.........20.........30.........40.........50
## .........60.........70.........80.
## 21 of 32: Fitting Arcsine distribution...
## .........
## 22 of 32: Fitting von Mises distribution...
## .........
## 23 of 32: Fitting Inverse Gaussian distribution...
## .........
## 24 of 32: Fitting Generalized Extreme Value distribution...
## .........10.........20.......
## 25 of 32: Fitting Rayleigh distribution...
## .........
## 26 of 32: Fitting Chi-Square distribution...
## ...
## 27 of 32: Fitting Exponential distribution...
## ...
## 28 of 32: Fitting F- distribution...
## .........
## 29 of 32: Fitting Burr distribution...
## ...
## 30 of 32: Fitting Chi distribution...
## ...
## 31 of 32: Fitting Inverse Chi-Square distribution...
## ...
## 32 of 32: Fitting Cosine distribution...
## .........

##                 Distribution        BIC          RSS          MSE
## 1                     Normal -527.39993 3.489986e-07 0.0001343555
## 5          Scaled/shifted t- -526.39900 1.551563e-08 0.0001291922
## 2              Skewed-normal -522.97523 2.900305e-07 0.0001342590
## 3         Generalized normal -522.92366 3.296006e-07 0.0001343368
## 16                Johnson SU -522.00875 2.602955e-08 0.0001290495
## 17                Johnson SB -518.43249 3.305157e-07 0.0001343407
## 20                   4P Beta -517.51207 4.271193e-07 0.0001357372
## 6                   Logistic -507.15975 7.900709e-06 0.0001686637
## 18                3P Weibull -506.06375 1.000000e-06 0.0001623554
## 24 Generalized Extreme Value -502.93800 8.421501e-07 0.0001681587
## 22                 von Mises -473.14195 1.000000e-06 0.0002471831
## 8                 Triangular -472.04167 1.000000e-06 0.0002379494
## 9                Trapezoidal -467.65166 1.000000e-06 0.0002376859
## 15                    Gumbel -369.73936 1.000000e-06 0.0007899394
## 14                   Laplace -358.91588 1.180912e-04 0.0008920912
## 29                      Burr -329.89035 9.035166e-05 0.0013000163
## 13                    Cauchy -308.77174 2.431570e-04 0.0015671057
## 10   Curvilinear Trapezoidal -262.01018 1.000000e-06 0.0025198695
## 32                    Cosine -259.55360 1.152761e-04 0.0027243867
## 25                  Rayleigh -201.86862 2.661948e-02 0.0052090065
## 21                   Arcsine -106.25709 1.348364e-02 0.0152514713
## 28                        F-  -98.01376 1.000000e-06 0.0167315760
## 4                 Log-normal  -95.91402 1.000000e-06 0.0171310102
## 12             Inverse Gamma  -94.23611 1.000000e-06 0.0174570432
## 31        Inverse Chi-Square  -90.27215 1.000000e-06 0.0191962743
## 11                     Gamma  -88.08844 1.000000e-06 0.0187055086
## 27               Exponential  -86.42001 1.000000e-06 0.0200453791
## 26                Chi-Square  -85.88550 1.000000e-06 0.0201661278
## 7                    Uniform  -78.75708 1.000000e-06 0.0207732245
## 19                   2P Beta  -72.90624 1.000000e-06 0.0221847380
## 23          Inverse Gaussian  -53.68045 1.000000e-06 0.0275340854
## 30                       Chi  -49.93540 1.000000e-06 0.0302029032

Note: This work is in progress.