Skip to content

Shaleengovil25/Random-Numbers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Random-Numbers

Program to depict the chances of possible outcome when the process is repeated large number of times. This is also known as "Law of Large Numbers".

Coin-toss simulation:

Consider tossing a coin for 10 times, you may get 6 head 4 tail or 7 head 3 tail or 10 heads(πŸ˜‚) but the chances of getting 5 heads 5 tails are maximum,
you can proove it easily by P&C (10C5, yes you got it.) for now let' see by by simulating/doing this process for 10k times:

image

When process is repeated 10,000 times, chances of occurring 5 heads or tails in 10 toss becomes maximum. πŸ™Œ
The process is helpful for the kind of problem discussed below.

Random-walk simulation:

Consider a intriguing Problem of Thowing Dice vs Taking steps against the following Rules: Capture2

The Problem may seem challenging at first but what if we can reach upon a conclusion by doing the process large number of times. πŸ‘¨β€πŸ’»

Capture1

Above graph shows distribution of number of steps reached when the process is simulated 500 times. Clearly, it gives an idea that reaching steps 60 to 80 has a fair chance occuring. For example:
step 60 has occured β‰ˆ 80 times in 500
step 70 has occured β‰ˆ 140 times in 500
step 80 has occured β‰ˆ 120 times in 500

This way we can reach upon a conclusion to bet and win!😎✌️

About

Programs to give insights on process simulation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages