- Research
- Open access
- Published:

# Algorithm for generating neutrosophic data using accept-reject method

*Journal of Big Data*
**volume 10**, Article number: 175 (2023)

## Abstract

This paper introduces a novel and innovative approach to simulating random variates from two distinct probability distributions, namely the neutrosophic uniform distribution and the neutrosophic Weibull distribution. The primary objective of this research is to present a cutting-edge methodology for generating random variates by leveraging the accept-reject simulation method, particularly in the context of managing and addressing uncertainty. In addition to introducing the simulation methodology, this work will also provide comprehensive algorithms tailored to these proposed methods. These algorithms are essential for implementing the simulation techniques and will be instrumental in their practical applications. Furthermore, this study aims to explore the relationship between the level of indeterminacy and the resulting random variates. By investigating how varying degrees of indeterminacy impact random variates, we gain valuable insights into the dynamics of these distributions under different uncertainty conditions. Preliminary results suggest that random variates exhibit a trend of decreasing as indeterminacy levels increase, shedding light on the intriguing interplay between indeterminacy and random variate generation.

## Introduction

In recent years, due to the complexity of the systems, it may not be possible to evaluate the work of the real system. The complete study of the complex systems may increase the time and cost. When it is not possible to study the system directly, the decision-makers from various fields of science depend on simulation. According to Jdid et al. [12] “The simulation depends on the application of the study on systems similar to the real systems and then projecting these results if they are appropriate on the real system. The simulation is based on generating a series of random numbers that are subject to a uniform probability distribution”. Jdid et al. [11] suggested using probability distribution to generate random numbers for the required system. Random numbers are generated through a well-planned generator using the probability distribution. The random number generators are run using the algorithm designed keeping the mind the target to study the system. A physical or computer method that generates random numbers is called the random number generator. A random number generator generates random numbers using the statistical distribution and has no specific pattern. Due to high-speed computers, mathematical algorithms are designed and implemented to generate random numbers, see [24]. Accept-reject simulation method has been widely used to generate random numbers using a suitable underlying distribution. In this simulation method, two uniform numbers are generated and applied to calculate the probability using the underlying distribution. The ratio of probabilities obtained using the first uniform number and the mode are compared with the second uniform number in generating the random numbers. Devroye [9] suggested the approach for generating random numbers using log-concave probability densities. Hurtado and Barbat [10] used the Monte Carlo simulation to generate random numbers. Ridout [19] engaged in the development of a random number generation technique employing Laplace transformation. Martino and Miguez [16] introduced accept/reject sampling to generate random numbers. Stein and Keblis [23] introduced the method of simulation for triangular distribution. Wang et al. [25] introduced the accept-reject technique for generating random variates. Martino et al. [15] worked on accept-reject simulation and presented an algorithm to generate random numbers. Mohazzabi and Connolly [17] proposed the simulation criteria for normal distribution. Luengo et al. [14] demonstrated parameter estimation through the utilization of Monte Carlo simulation methods. Schinazi [20] proposed the method to generate discrete random numbers. Álvarez et al. [2] improved the statistical qualities of a random number generator.

Recently, neutrosophic statistics have gotten attention due to many applications for the data recorded from the complex process or when the data has neutrosophic numbers, [22]. Many studies including [3, 7, 8] discussed the efficiency of neutrosophic statistics over classical statistics. Alhabib et al. [1] introduced the fundamentals of neutrosophic methods for generating uniform random numbers. Aslam [4] introduced the Weibull distribution under indeterminacy as the generalization of classical Weibull distribution. Khan et al. [13] explored the gamma distribution within the framework of neutrosophic statistics and applied it to analyze complex data. Sherwani et al. [21] presented the concept of work distributions under neutrosophic statistics. By following Aslam [4] and Nayana et al. [18] proposed DUS-Weibull distribution under indeterminacy. Aslam [6] presented the truncated variable algorithm for generating random variates from the neutrosophic DUS-Weibull distribution. Second, [5] introduced novel approaches involving sine–cosine and convolution techniques to generate random numbers within the neutrosophic framework.

After a comprehensive review of the existing literature and to the best of our understanding, no prior research has been conducted on the utilization of the accept-reject simulation method within the framework of neutrosophic statistics. This paper aims to address this gap by introducing the accept-reject simulation technique tailored for neutrosophic uniform distribution (NUD) and neutrosophic Weibull distribution (NWD). The following sections will detail the algorithms employed for implementing the accept-reject simulation method and will provide comprehensive tables of random variates across a spectrum of uncertainty levels.

## Preliminaries

In this section, we will introduce the neutrosophic uniform distribution and neutrosophic Weibull distribution briefly.

### Neutrosophic uniform distribution (NUD)

Consider the neutrosophic uniform random variable denoted as \({x}_{NU}\), which exhibits a degree of uncertainty \({I}_{{x}_{NU}}\) within the range \(\left[{I}_{{x}_{LU}},{I}_{{x}_{UU}}\right]\). This variable follows a probability distribution function (pdf) characterized by indeterminacy, with parameters \({a}_{N}\) and \({b}_{N}\) representing the uniform distribution, as detailed in the work of Aslam [4].

Note that the first part denotes the pdf of the uniform distribution under classical statistics and the second part denotes the indeterminate part. The corresponding cumulative distribution function (cdf), say \(F\left({x}_{NU}\right)\) under indeterminacy can be given as

The probability density function, denoted as \(f\left({x}_{N{S}_{U}}\right)\), for the case when \({a}_{L}={a}_{U}={a}_{NS}\) and \({b}_{L}={b}_{U}={b}_{NS}\), and with the degree of indeterminacy \({I}_{NS}\), can be expressed as follows:

The streamlined expression for the cumulative distribution function, denoted as \(F\left({x}_{N{S}_{U}}\right)\), when \({a}_{L}={a}_{U}={a}_{NS}\) and \({b}_{L}={b}_{U}={b}_{NS}\) under conditions of indeterminacy, can be presented as follows:

Note the pdf and cdf under indeterminacy reduces to pdf and cdf under classical statistics when no indeterminacy is found that is \({I}_{{x}_{NU}}={I}_{NS}=0\).

### Neutrosophic weibull distribution

Aslam [4] introduced the concept of the neutrosophic Weibull distribution (NWD) for the first time. Let \({x}_{LW}\) represent a neutrosophic random variable following the Weibull distribution under indeterminacy, characterized by the scale parameter \(\alpha\), shape parameter \(\beta\), and the measure of indeterminacy \({I}_{NW}\) within the range \(\left[{I}_{LW},{I}_{UW}\right]\). The probability density function (pdf) for this indeterminate Weibull distribution, as derived in [4], is expressed as follows:

The modified version of the probability density function, denoted as \(f\left({x}_{N{S}_{W}}\right)\), for the scenario where \({x}_{L}={x}_{U}={x}_{S}\) and the measure of indeterminacy is \({I}_{NS}\), can be formulated as follows:

The cdf corresponding to the Weibull distribution is represented as \(F\left({x}_{N{S}_{W}}\right)\), and it can be expressed as follows:

The mode of the Weibull distribution is represented as \(f\left({\widehat{x}}_{NW}\right)\) is given by

The NWD reduces to the Weibull distribution under classical statistics when \({I}_{NS}={I}_{NW}=0\).

## Neutrosophic accept-reject simulation method

We present the neutrosophic accept-reject simulation method in the section. In this section, we will present the routine to generate random variate from the NUD and NWD. Suppose that \({u}_{N1}\sim {U}_{N1}\left(\left[\mathrm{0,0}\right],\left[\mathrm{1,1}\right]\right)\) and \({u}_{N2}\sim {U}_{N2}\left(\left[\mathrm{0,0}\right],\left[\mathrm{1,1}\right]\right)\) be two random numbers follow the NUD. Suppose that \({x}_{N{S}_{U}}\) and \({x}_{N{S}_{W}}\) are neutrosophic random variables following the NWD and NUD, respectively. Let \({\widehat{x}}_{NW}\) and \({\widehat{x}}_{NU}\) be the mode of \({x}_{NW}\) and \({x}_{NU}\), respectively. The random variate \({x}_{NU}\) will be obtained from the following expression.

The random variate \({x}_{NW}\) will be obtained from the following expression.

Based on the above-mentioned information, the following accept-reject routine under indeterminacy will be implemented to generate \(n\) random variate \({x}_{N{S}_{U}}\) from NUD.

Step-1: pre-specified \({I}_{NS}\), \({a}_{NS}\) and \({b}_{NS}\).

Step-2: Generate two NUD random numbers, say \({u}_{N1}\sim {U}_{N1}\left(\left[\mathrm{0,0}\right],\left[\mathrm{1,1}\right]\right)\) and \({u}_{N2}\sim {U}_{N2}\left(\left[\mathrm{0,0}\right],\left[\mathrm{1,1}\right]\right)\).

Step-3: Find \({x}_{N{S}_{U}}\) using \({x}_{N{S}_{U}}={a}_{NS}+\left(\frac{{u}_{N1}}{\left(1+{I}_{NS}\right)}\right)\left({b}_{NS}-{a}_{NS}\right)\)

Step-4: Compute \(f\left({x}_{N{S}_{U}}\right)\) using \(f\left({x}_{N{S}_{U}}\right)=\left(\frac{1}{\left({b}_{NS}-{a}_{NS}\right)}\right)\left(1+{I}_{NS}\right)\).

Step-5: Compute \(f\left({\widehat{x}}_{N{S}_{U}}\right)\) at any value between \({a}_{NS}\) and \({b}_{NS}\).

Step-6: If \({u}_{N2}<f\left({x}_{N{S}_{U}}\right)/f\left({\widehat{x}}_{N{S}_{U}}\right)\), then record \({x}_{NU}\) and go to step-7, otherwise, repeat the previous steps.

Step-7: Return \({x}_{N{S}_{U}}\) and repeat the process to generate \(n\) variate of \({x}_{N{S}_{U}}\).

The algorithm to generate random variate from the NUD is depicted in Fig. 1.

The following accept-reject routine will be implemented to generate \(n\) random variate \({x}_{N{S}_{W}}\) from NWD.

Step-1: pre-specified \({I}_{NS}\), \({a}_{NS}\) and \({b}_{NS}\).

Step-2: Generate two NUD random numbers, say \({u}_{N1}\sim {U}_{N1}\left(\left[\mathrm{0,0}\right],\left[\mathrm{1,1}\right]\right)\) and \({u}_{N2}\sim {U}_{N2}\left(\left[\mathrm{0,0}\right],\left[\mathrm{1,1}\right]\right)\).

Step-3: Find \({x}_{N{S}_{W}}\) using \({x}_{N{S}_{W}}=\alpha {\left[-\mathrm{ln}\left(\frac{1-\left({u}_{N1}-{I}_{NS}\right)}{1+{I}_{NS}}\right)\right]}^{\frac{1}{\beta }}\)

Step-4: Compute \(f\left({x}_{N{S}_{W}}\right)\) using \(f\left({x}_{N{S}_{W}}\right)=\left\{\left(\frac{\beta }{\alpha }\right){\left(\frac{{x}_{S}}{\alpha }\right)}^{\beta -1}{e}^{-{\left(\frac{{x}_{S}}{\alpha }\right)}^{\beta }}\right\}\left(1+{I}_{NS}\right)\).

Step-5: Compute mode \(f\left({\widehat{x}}_{N{S}_{W}}\right)\) and compute \(f\left({\widehat{x}}_{N{S}_{W}}\right)=\left\{\left(\frac{\beta }{\alpha }\right){\left(\frac{{\widehat{x}}_{S}}{\alpha }\right)}^{\beta -1}{e}^{-{\left(\frac{{\widehat{x}}_{S}}{\alpha }\right)}^{\beta }}\right\}\left(1+{I}_{NS}\right)\)

Step-6: If \({u}_{N2}<f\left({x}_{N{S}_{W}}\right)/f\left({\widehat{x}}_{N{S}_{W}}\right)\), then record \({x}_{NW}\) and go to step-7, otherwise, repeat the previous steps.

Step-7: Return \({x}_{N{S}_{W}}\) and repeat the process to generate \(n\) variate of \({x}_{N{S}_{W}}\).

The algorithm to generate random variate from the NWD is depicted in Fig. 2.

Note that the proposed neutrosophic accept-reject algorithms are an extension of accept-reject algorithms under classical statistics. The proposed simulation methods under neutrosophic statistics are reduced to the simulation methods under classical statistics when no indeterminacy is found in the data.

## Simulation studies

An extensive simulation study has been carried out to investigate the behavior of random variates generated by the developed algorithms across a range of parameters for NUD and NWD. In this section, we will present and analyze the simulation tables obtained through the accept-reject simulation method and the repetitive simulation method. A wide simulation study is conducted to see the behavior of random variate obtained from the developed algorithms at various values of parameters of NUD and NWD. In this section, the simulation tables obtained from the accept-reject simulation method and repetitive simulation method will be given and discussed.

### Accept-reject simulation method

The random variate from the accept-reject method for the NUD is obtained for various values of \({a}_{NS}\) and \({b}_{NS}\) is reported in Tables 1, 2. To see the effect of intermediacy on these random variate, various values of \({I}_{NS}\) are considered in the generation of random variates from NUD and NWD. The random variate obtained from NUD using the values of \({u}_{N1}\), \({u}_{N2}\), \({a}_{NS}\)=10 and \({b}_{NS}\)=20 are reported in Table 1. The random variate obtained from NUD using the values of \({u}_{N1}\), \({u}_{N2}\), \({a}_{NS}\)=15 and \({b}_{NS}\)=20 are reported in Table 2. From Tables 1, 2, it can be noted that for the fixed values of \({a}_{NS}\)=15, \({b}_{NS}\)=20 and \({I}_{NS}\), there is an increase in random variate. The random variate decreases as the values of \({I}_{NS}\) increases from 0 to 1. Note that the values of random variate \({I}_{NS}\)=0 presents the values of random variate for classical statistics. From Tables 1, 2, it can be noted that indeterminacy plays a significant role in decreasing the random variate. It's worth emphasizing that computer-based uniform random variate generation is commonly employed to simulate random numbers. However, this simulation approach often overlooks the influence of the measure of indeterminacy when generating random numbers in the computer. Our analysis underscores that, in the presence of uncertainty, the resulting random numbers differ from those generated in a deterministic setting. Therefore, when faced with uncertainty, depending on uniformly distributed random variables generated using traditional simulation methods could result in erroneous conclusions.

The random variate from NWD for various values of \({I}_{NS}\) and parameters are shown in Tables 3, 4, 5, 6. Table 3 is presented for \(\alpha =2\) and \(\beta =0.50\). The random variate for \(\alpha =2\) and \(\beta =1\) (exponential distribution) is shown in Table 4. The random variate for \(\alpha =2\) and \(\beta =1.5\) is shown in Table 5. The random variate for \(\alpha =2\) and \(\beta =1.5\) is shown in Table 5. The random variate for \(\alpha =2\) and \(\beta =2\) is shown in Table 5. From Tables 3, 4, 5, 6, there is a decreasing trend in random variate as the values of \({I}_{NS}\) increase. For example, for the exponential distribution, when \({u}_{N1}=0.6724\) and \({u}_{N2}=0.3931\), the value of random variate is 1.2212 when \({I}_{NS}\)=0 and the value of random variate is 2.000.

## Concluding remarks

This paper has introduced two simulation methods for generating random variates using NUD and NWD. The paper presented the essential computational procedures, simulation techniques, and algorithms necessary for these methods. Random variates derived from NUD and NWD were generated under various parameter settings and indeterminacy levels. The analysis reveals that the measure of indeterminacy significantly influences the random variates, with a decrease observed as the level of indeterminacy increases. It’s important to highlight that computer-based uniform random variate generation is a prevalent method for simulating random numbers. Nonetheless, this simulation approach frequently disregards the impact of the measure of indeterminacy when generating random numbers in the computer. Our analysis underscores that in the presence of uncertainty, the resulting random numbers deviate from those generated in a deterministic environment. Therefore, depending on uniform random variables generated through traditional simulation methods can potentially lead to erroneous decisions. These proposed simulation methods have versatile applications in fields such as education, medicine, computer science, and engineering. Furthermore, the potential for extending these methods to handle other distributions is a promising avenue for future research.

## Availability of data and materials

The data is given in the paper.

## References

Alhabib R, Ranna MM, Farah H, Salama A. Some neutrosophic probability distributions. Neutrosophic Sets Syst. 2018;22:30–8.

Álvarez R, Martínez F, Zamora A. Improving the statistical qualities of pseudo random number generators. Symmetry. 2022;14(2):269.

Aslam M. A new sampling plan using neutrosophic process loss consideration. Symmetry. 2018;10(5):132.

Aslam M. Testing average wind speed using sampling plan for Weibull distribution under indeterminacy. Sci Rep. 2021;11(1):1–9.

Aslam M. Simulating imprecise data: sine–cosine and convolution methods with neutrosophic normal distribution. J Big Data. 2023;10(1):1–13.

Aslam M. Truncated variable algorithm using DUS-neutrosophic Weibull distribution. Complex Intell Syst. 2023;9(3):3107–14.

Chen J, Ye J, Du S. Scale effect and anisotropy analyzed for neutrosophic numbers of rock joint roughness coefficient based on neutrosophic statistics. Symmetry. 2017;9(10):208.

Chen J, Ye J, Du S, Yong R. Expressions of rock joint roughness coefficient using neutrosophic interval statistical numbers. Symmetry. 2017;9(7):123.

Devroye L. A simple algorithm for generating random variates with a log-concave density. Computing. 1984;33(3):247–57.

Hurtado J, Barbat A. Monte Carlo techniques in computational stochastic mechanics. Arch Comput Methods Eng. 1998;5(1):3–29.

Jdid M, Alhabib R, Salama A. Fundamentals of neutrosophical simulation for generating random numbers associated with uniform probability distribution. Neutrosophic Sets Syst. 2022;49(1):6.

Jdid M, Alhabib R, Salama A. The static model of inventory management without a deficit with neutrosophic logic. Int J Neutrosophic Sci. 2021;16(1):42.

Khan Z, Al-Bossly A, Almazah M, Alduais FS. On statistical development of neutrosophic gamma distribution with applications to complex data analysis. Complexity. 2021. https://doi.org/10.1155/2021/3701236.

Luengo D, Martino L, Bugallo M, Elvira V, Särkkä S. A survey of Monte Carlo methods for parameter estimation. EURASIP J Adv Signal Process. 2020;2020(1):1–62.

Martino L, Luengo D, Míguez J. Accept–reject methods independent random sampling methods. Berlin: Springer; 2018. p. 65–113.

Martino L, Miguez J. An adaptive accept/reject sampling algorithm for posterior probability distributions. In: Paper presented at the 2009 IEEE/SP 15th Workshop on Statistical Signal Processing. 2009.

Mohazzabi P, Connolly MJ. An algorithm for generating random numbers with normal distribution. J Appl Math Phys. 2019;7(11):2712–22.

Nayana B, Anakha K, Chacko V, Aslam M, Albassam M. A new neutrosophic model using DUS-Weibull transformation with application. Complex Intell Syst. 2022. https://doi.org/10.1007/s40747-022-00698-6.

Ridout MS. Generating random numbers from a distribution specified by its Laplace transform. Stat Comput. 2009;19(4):439–50.

Schinazi RB. Simulations of discrete random variables probability with statistical applications. Berlin: Springer; 2022. p. 65–72.

Sherwani RAK, Aslam M, Raza MA, Farooq M, Abid M, Tahir M. Neutrosophic Normal probability distribution: a spine of parametric neutrosophic statistical tests—properties and applications neutrosophic operational research. Berlin: Springer; 2021. p. 153–69.

Smarandache F. Introduction to neutrosophic statistics sitech and education publisher, Craiova. Columbus: Romania-Educational Publisher; 2014. p. 123.

Stein WE, Keblis MF. A new method to simulate the triangular distribution. Math Comput Model. 2009;49(5–6):1143–7.

Thomopoulos NT. Essentials of Monte Carlo simulation: statistical methods for building simulation models. Berlin: Springer; 2014.

Wang B, Wei Y, Sun Y. Generate random number by using acceptance rejection method. J Chongqing Norm Univ. 2013;30(6):86–91.

## Acknowledgements

Thanks to the editor and reviewers for their valuable comments to improve the quality and presentation of the paper. This research was funded by Princess Nourah bint Abdulrahman University and Researchers Supporting Project number (PNURSP2023R346), Princess Nourah bint Abdulrahman University, Riyadh, Saudi Arabia.

## Funding

This research was funded by Princess Nourah bint Abdulrahman University and Researchers Supporting Project number (PNURSP2023R346), Princess Nourah bint Abdulrahman University, Riyadh, Saudi Arabia.

## Author information

### Authors and Affiliations

### Contributions

MA and FSA wrote the paper.

### Corresponding author

## Ethics declarations

### Ethics approval and consent to participate

Not applicable.

### Consent for publication

Not applicable.

### Competing interests

The authors declare no competing interests.

## Additional information

### Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Aslam, M., Alamri, F.S. Algorithm for generating neutrosophic data using accept-reject method.
*J Big Data* **10**, 175 (2023). https://doi.org/10.1186/s40537-023-00855-9

Received:

Accepted:

Published:

DOI: https://doi.org/10.1186/s40537-023-00855-9