Statistical Simulation
Designing a statistical model in python and simulating outcomes of an experiment.
Intro
Statistical Simulation is a way to model random events, such that simulated outcomes closely match real-world outcomes. With simulation, we can obtain the empirical probabilities of complex events, artificially generate data in order to test out a hypothesis. It can be very helpful to collect data for experiments which are too impractical(one of the reason can be because of time, resource constraint) to conduct. By simulation we can get the empirical results by saving a lot of time(much faster than traditional data collection), effort(need only computational power for complex tasks), money with less loss of accuracy.
Whenever a new statistical method is developed or used, there are assumptions that need to be tested and confirmed. Statisticians use simulated data to test them out. If the statistical model is pretty solid(well defined), then the results of simulation statistics can approximate real results. Simulation basically relies on random numbers to reflect the variation (aims to describe the variation in outcomes under conditions that are hypothesized) to model real-world outcomes.
Following are a few examples of simulating outcomes of experiments. In order to compare the results, I attached the real probabilities of occurring the event that we are interested in and also shared how we can generate outcomes of experiments using python.
1st experiment
Python code to simulate the problem and to generate the outcomes.
Note: If we don’t know about the sample space and their associated probabilities(together called probability distribution) we can’t model the experiment (simulate the outcomes)
2nd experiment
Solution using python code
3rd experiment
If we use statistical simulation, no formulas needed. Just we need to simulate the experiment and look for our event.
Solution in python
4th experiment (Huyghen’s Gambling problem)
Solution using statistical simulation
Note: The problems shown in this content are taken from the book “Fundamentals of Mathematical Statistics” by S.C. Gupta and V.K. Kapoor
Before you leave
Give your feedback & suggestions to make this content more better. Your inputs are valuable.
Check out my other posts here.
Want to know about me, see my LinkedIn profile.
To get access to the python code of the content consider this GitHub link.