In this activity, I ran experiments to find the probability of each number (1 to 6) showing up when rolling a fair six-sided die. I focused on three cases : rolling the die 10, 50 and 100 times. For each case, I worked out the chance of each number appearing.
First, I used python to simulate rolling the die and recorded how often each number came up, I printed all the outcomes to get a clear picture of the results.
Then, I calculate the expected probabilities. For a fair die, the chance of rolling any number (1 to 6) is 1/6, or about 16.67%.
To confirm these results, I ran a Monte-Carlo simulation. This involved running 1000 experiments for each case and calculating how often each number appeared. I compared the simulated results with the expected probabilities to make sure they matched up.
In conclusion, this activity showed how we can use Monte-Carlo simulations to check if real-world results align with theoretical probabilities, all while using python.