Proceedings of the 2023 International Conference on Data Science, Advanced Algorithm and Intelligent Computing (DAI 2023)

Bernoulli Distribution Simulator and Random Function

Authors
Yuzhen Jiang1, *
1Beijing Guangqumen Middle School, Beijing, China
*Corresponding author.
Corresponding Author
Yuzhen Jiang
Available Online 14 February 2024.
DOI
10.2991/978-94-6463-370-2_59How to use a DOI?
Keywords
Bernoulli Distribution; Random Function; Random Number Generator
Abstract

This study explored the development and application of a random number generator following the Bernoulli distribution, emphasizing its significance in various fields such as simulation experiments, probability analysis, optimization algorithms, and machine learning. The generator’s versatility in generating random outcomes aligning with specific probability distributions makes it a valuable tool in computer programming. Through the simulation of 10,000 games, the study confirmed the generator’s accuracy in producing results consistent with the expected Bernoulli distribution parameter. The sample mean and sample variance closely matched theoretical expectations, highlighting the generator’s reliability. The results demonstrated that the generated random variable adhered to the Bernoulli distribution properties, with outcomes mainly concentrated around 0 and 1. This aligns with the two possible values and equal probabilities inherent to the Bernoulli distribution. Looking ahead, the study suggests potential enhancements for the generator, including parameter tuning for different distributions, encapsulation as a versatile function or class, performance optimization for large-scale simulations, and statistical analysis of generated data using libraries like NumPy and SciPy. In conclusion, this research underscores the foundational role of random number generators in computer programming and their adaptability to meet evolving needs and complex scenarios in random number generation and analysis.

Copyright
© 2024 The Author(s)
Open Access
Open Access This chapter is licensed under the terms of the Creative Commons Attribution-NonCommercial 4.0 International License (http://creativecommons.org/licenses/by-nc/4.0/), which permits any noncommercial 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 license and indicate if changes were made.

Download article (PDF)

Volume Title
Proceedings of the 2023 International Conference on Data Science, Advanced Algorithm and Intelligent Computing (DAI 2023)
Series
Advances in Intelligent Systems Research
Publication Date
14 February 2024
ISBN
10.2991/978-94-6463-370-2_59
ISSN
1951-6851
DOI
10.2991/978-94-6463-370-2_59How to use a DOI?
Copyright
© 2024 The Author(s)
Open Access
Open Access This chapter is licensed under the terms of the Creative Commons Attribution-NonCommercial 4.0 International License (http://creativecommons.org/licenses/by-nc/4.0/), which permits any noncommercial 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 license and indicate if changes were made.

Cite this article

TY  - CONF
AU  - Yuzhen Jiang
PY  - 2024
DA  - 2024/02/14
TI  - Bernoulli Distribution Simulator and Random Function
BT  - Proceedings of the 2023 International Conference on Data Science, Advanced Algorithm and Intelligent Computing (DAI 2023)
PB  - Atlantis Press
SP  - 583
EP  - 588
SN  - 1951-6851
UR  - https://doi.org/10.2991/978-94-6463-370-2_59
DO  - 10.2991/978-94-6463-370-2_59
ID  - Jiang2024
ER  -