Notes

  • Can use a psuedo-random number generator to represent things like roling a dice
  • Experiments are usually much harder to do than simulations, but involve all real world variables
  • Important to use flowcharts to plan out simulations
  • Simulation: simpler abstraction of an very complicated natural phenomena
  • Simulations remove details that are unnecessary or are too difficult to simulate
  • Simulations are cheaper to do, safer, repeatable, and can be used to make predictions
  • Simulations can be used for complex scenarioes
  • Things like rolling a dice have many things affecting it
  • Will take a lot of conditionals, iteration

Hacks

Question Answer
Name(First+Last) Benjamin Lee
1 none
2 none
3 C
4 C
5 C
6 A
7 A
8 none
9 B

Explanations for Answers

3) Using a pseudo-random number generator in a simulation can make it less accurate, so it is better to avoid using one.

4) In a flight simulation, the least likely factor to be removed for the sake of functionality is imperfections on aircraft.

5) The main difference between an experiment and a simulation is the situation being considered.

6) A car company can use simulation to determine the safety of their new car in the event of a crash, as it would be too dangerous to conduct such an experiment on real vehicles.

7) An environmental group may use simulation to accurately predict the impact of the greenhouse effect on the environment, as it would be harmful to conduct an experiment on the actual environment.

9) A teacher can use an experiment to find the average score on a final exam, as this will simply involve calculating the average and does not require simulation.

Extra Credit

import random

tracker = {1:0, 2:0, 3:0, 4:0, 5:0, 6:0}
i = 0

def diceGame():
    dice_roll = random.randint(1, 6)
    return dice_roll

while i < 1000:
    score = diceGame()
    tracker[score] += 1
    i += 1

print("Here are the results of the dice rolling simulation.")
for j in range(1, 7):
    tracker[j] = ((tracker[j])/1000)*100
    print("Frequency of " + str(j) + ": " + str(tracker[j]) + "%")
Here are the results of the dice rolling simulation.
Frequency of 1: 15.1%
Frequency of 2: 17.2%
Frequency of 3: 14.7%
Frequency of 4: 15.5%
Frequency of 5: 18.099999999999998%
Frequency of 6: 19.400000000000002%

Reflection

These lessons were a little difficult at first, but with persistence, I was able to grasp the ideas, which enabled me to correctly respond to the questions. I took a lot away from the presentation because it was amazing.