Notes

Vocab Definition
Simulation A simpler abstraction that removes details that are unessesary or too complicated to simulate. Abstraction levels in a simulation varies depending on the situation. Simulations are a simple way to model complicated situations.
Why would you make a simulation? Simulations are needed for modeling complicated situations (such as population dynamics or flying a plane) in a much simpler way so that any user can still manage most aspects of the model without delving into complexities.
Why simulations over experiment? Simulations are safer, less expensive, repeatable, and can make predictions

Hacks

Question Answer
Name(First+Last) Ellie Pang
1 x
2 x
3 C- To make the simulation more accurate
4 C- Imperfections on aircraft
5 C Situation considered
6 A- simulation, because it's too dangerous to have this be an experiment
7 A- simulation, we don't want to experiment with this because it could cause great harm on the environment
8 x
9 B- experiment/calculation because there is no need to simulate anything, this will only be a simple calculation of the average

Extra Simulation

import random

rolls = 4 # manipulate how many rolls
total = 0

i = 0
while rolls != 0: # rolls dice for number of rolls
    diceroll = random.randint(1,6) # change the "6" to how many sides on the dice you want
    i = i + 1 
    print("Roll", i, "is a ", diceroll) 
    total = total + diceroll
    rolls = rolls - 1
    
print("Sum of dice rolls:", total)
Roll 1 is a  4
Roll 2 is a  3
Roll 3 is a  3
Roll 4 is a  4
Sum of dice rolls: 14

This simulation represents a six-sided dice roll. It calculates the sum of the rolls and also shows which random number was rolled for each turn. The number of sides can be changed by changing the 6 in random.randint (1,6) to any number. You can also change the number of rolls by manipulating rolls = 4.

Extra Simulation x2

import random

print("Coin flip simulation!")

e = 100 
h = 0 #heads
t = 0 #tails
 
for i in range(e):
    flip = random.randint(1,2) # random number between 1 and 2
    if flip == 1:
        h = h + 1 # calculates number of heads
    else:         
        t = t + 1 # calculates number of tails
 
print('Number of heads:', heads)
print('Number of tails:', tails)
Coin flip simulation!
Number of heads: 42
Number of tails: 58

This simulation represents a coin toss of 100 tosses. I set e equal to the sample size and h and t to 0 which is the default value. Then I used a for loop, with each flip, the procedure will either give heads or tails until the coin has been flipped 100 times. Using a simulation is much more efficient and better than actually running an experiment. Simulations save a lot of time and effort. It would take forever to flip a coin 100 times.