SlideShare a Scribd company logo
1 of 22
Simulations How to design and run a simulation
First Step Read your task carefully.  What problem exactly are you designing a simulation of? What is it that you need to calculate at the end?
Taking a TTRC approach Tool – what tool we’re going to use Trial – how to define a trial, and how 		        many we’ll carry out Results – a table showing our results Calculation – how to use our results to 			     make a calculation which  			     completes the task
Tool Remember, your simulation must be based on some probability reasoning.  So the Tool the you choose, and how you use it, will have to be based on a probability. E.g.  If there’s an even chance of an event happening you could simulate it by tossing a coin, or generating the number 1 or 2 randomly on your calculator.
Tool Not quite even chances… If the probability of an event happening is 110 then you’ll probably have to generate a random number from 1 to 10. You could let one number represent the event happening, and all the others represent it not happening.   If I generate a random number from 1-10,  I could define 1 to mean it happens, and 2-10 mean it doesn’t!
How would you simulate… A jogger estimates the probability he’ll finish his run without taking a break is 0.75 What numbers would you generate to simulate whether he takes a break or not? Tool Hmmm.. ?x Ran# + 1
You could use… You could use: Random numbers from 1 – 4 where 	1,2,3 = no break 	4 = takes a break Or  Random numbers from 1 – 100 where 	1-75 – no break 	76-100 = take a break Tool
Sample answer: The tool I will use is the random number generator on my calculator. I will generate random numbers from 1 – 4 where: 	1, 2, 3 means no break is taken 4 means the jogger takes a break Tool
Tool There’s no one correct way to define the Tool. Just think carefully about what you’re doing. Remember to state:  ,[object Object]
What numbers you’re generating
What they mean,[object Object]
Suppose you have 5 joggers in the group, and the probability that each one might have to take a break is 0.75 				How will you simulate this? 			How many numbers need  			to be generated per trial? Trial
Obviously you need to generate a number for each jogger, so that’s 5 numbers per trial. You’ll need to record these results, and then repeat for 30 trials.	 					Easy! Trial
Trial Sample answer: One trial will consist of me generating 5 random numbers as described before, one for each jogger. I will record these numbers, and whether a break was taken or not in a table. I will carry out 30 trials.
Trial So when you’re designing a simulation you need to state: ,[object Object]
What you’re going to do with these numbers (duh…record them in a table of course)
How many times you’re going to repeat the process.,[object Object]
Results
Calculation There are two usual types of calculation made at the end of a simulation. For one of the type discussed here it is usually an estimate of the probability that something will happen.
Calculation Estimate the probability the jogging group will not have to take a break. 𝑃𝑛𝑜 𝑏𝑟𝑒𝑎𝑘=# 𝑡𝑟𝑖𝑎𝑙𝑠 𝑤h𝑒𝑟𝑒 𝑛𝑜 𝑏𝑟𝑒𝑎𝑘 𝑡𝑎𝑘𝑒𝑛# 𝑡𝑟𝑖𝑎𝑙𝑠 𝑐𝑎𝑟𝑟𝑖𝑒𝑑 𝑜𝑢𝑡 So the answer will depend on your simulation results.  
Calculation For a simulation with more open-ended trials the calculation might involve an estimate of average number of times something might happen (e.g. oil strike question practised in class).
Life after simulation… You will often be expected to compare your simulation probability to a theoretical one. E.g. Calculate the theoretical probability that the jogging group does not have to take a break, and compare it to your simulation results.

More Related Content

Viewers also liked

Algebra 2 review ppt
Algebra 2 review pptAlgebra 2 review ppt
Algebra 2 review ppt
niamhriordan
 
冥想靜坐入門
冥想靜坐入門冥想靜坐入門
冥想靜坐入門
beverlyhills
 

Viewers also liked (11)

Wonky tesselations
Wonky tesselationsWonky tesselations
Wonky tesselations
 
預見成功的奧秘
預見成功的奧秘預見成功的奧秘
預見成功的奧秘
 
Algebra solving no animations
Algebra   solving no animationsAlgebra   solving no animations
Algebra solving no animations
 
Sabanci university startup company league sucool kuluçka & hızlandırıcı sunum...
Sabanci university startup company league sucool kuluçka & hızlandırıcı sunum...Sabanci university startup company league sucool kuluçka & hızlandırıcı sunum...
Sabanci university startup company league sucool kuluçka & hızlandırıcı sunum...
 
Algebra 2 review ppt
Algebra 2 review pptAlgebra 2 review ppt
Algebra 2 review ppt
 
目標設定
目標設定目標設定
目標設定
 
9/11 Lost Innocence
9/11 Lost Innocence 9/11 Lost Innocence
9/11 Lost Innocence
 
Healing Garden靈性花園
Healing Garden靈性花園Healing Garden靈性花園
Healing Garden靈性花園
 
色彩冥想Color of Light Meditation
色彩冥想Color of Light Meditation色彩冥想Color of Light Meditation
色彩冥想Color of Light Meditation
 
七輪淨化呼吸法 開啟身體能量中心
七輪淨化呼吸法 開啟身體能量中心七輪淨化呼吸法 開啟身體能量中心
七輪淨化呼吸法 開啟身體能量中心
 
冥想靜坐入門
冥想靜坐入門冥想靜坐入門
冥想靜坐入門
 

Similar to Simulations

How scienceworks -errors
How scienceworks -errorsHow scienceworks -errors
How scienceworks -errors
Hansa Lettl
 
How scienceworks -errors
How scienceworks -errorsHow scienceworks -errors
How scienceworks -errors
Hansa Lettl
 
Notes-Unit 6 Lesson 2
Notes-Unit 6 Lesson 2Notes-Unit 6 Lesson 2
Notes-Unit 6 Lesson 2
lterrell302
 

Similar to Simulations (20)

Applied 40S March 3, 2009
Applied 40S March 3, 2009Applied 40S March 3, 2009
Applied 40S March 3, 2009
 
Applied 40S March 1, 2009
Applied 40S March 1, 2009Applied 40S March 1, 2009
Applied 40S March 1, 2009
 
Casestudy 01 algorithms
Casestudy 01 algorithmsCasestudy 01 algorithms
Casestudy 01 algorithms
 
Course project solutions 2018
Course project solutions 2018Course project solutions 2018
Course project solutions 2018
 
How scienceworks -errors
How scienceworks -errorsHow scienceworks -errors
How scienceworks -errors
 
How scienceworks -errors
How scienceworks -errorsHow scienceworks -errors
How scienceworks -errors
 
2014 simulations
2014 simulations2014 simulations
2014 simulations
 
Statistical tests
Statistical testsStatistical tests
Statistical tests
 
Monte Carlo Simulation
Monte Carlo SimulationMonte Carlo Simulation
Monte Carlo Simulation
 
Ch. 11 Simulations Good
Ch. 11 Simulations GoodCh. 11 Simulations Good
Ch. 11 Simulations Good
 
Quality Assurance 2: Searching for Bugs
Quality Assurance 2: Searching for BugsQuality Assurance 2: Searching for Bugs
Quality Assurance 2: Searching for Bugs
 
44 randomized-algorithms
44 randomized-algorithms44 randomized-algorithms
44 randomized-algorithms
 
Python Math Concepts Book
Python Math Concepts BookPython Math Concepts Book
Python Math Concepts Book
 
Ensemble Learning and Random Forests
Ensemble Learning and Random ForestsEnsemble Learning and Random Forests
Ensemble Learning and Random Forests
 
DA lecture 3.pptx
DA lecture 3.pptxDA lecture 3.pptx
DA lecture 3.pptx
 
Software fundamentals
Software fundamentalsSoftware fundamentals
Software fundamentals
 
Algorithms and how to write an algorithms
Algorithms and how to write an algorithmsAlgorithms and how to write an algorithms
Algorithms and how to write an algorithms
 
Week08.pdf
Week08.pdfWeek08.pdf
Week08.pdf
 
Lecture 12 binary classifier confusion matrix
Lecture 12 binary classifier confusion matrixLecture 12 binary classifier confusion matrix
Lecture 12 binary classifier confusion matrix
 
Notes-Unit 6 Lesson 2
Notes-Unit 6 Lesson 2Notes-Unit 6 Lesson 2
Notes-Unit 6 Lesson 2
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 

Simulations

  • 1. Simulations How to design and run a simulation
  • 2. First Step Read your task carefully. What problem exactly are you designing a simulation of? What is it that you need to calculate at the end?
  • 3. Taking a TTRC approach Tool – what tool we’re going to use Trial – how to define a trial, and how many we’ll carry out Results – a table showing our results Calculation – how to use our results to make a calculation which completes the task
  • 4. Tool Remember, your simulation must be based on some probability reasoning. So the Tool the you choose, and how you use it, will have to be based on a probability. E.g. If there’s an even chance of an event happening you could simulate it by tossing a coin, or generating the number 1 or 2 randomly on your calculator.
  • 5. Tool Not quite even chances… If the probability of an event happening is 110 then you’ll probably have to generate a random number from 1 to 10. You could let one number represent the event happening, and all the others represent it not happening.   If I generate a random number from 1-10, I could define 1 to mean it happens, and 2-10 mean it doesn’t!
  • 6. How would you simulate… A jogger estimates the probability he’ll finish his run without taking a break is 0.75 What numbers would you generate to simulate whether he takes a break or not? Tool Hmmm.. ?x Ran# + 1
  • 7. You could use… You could use: Random numbers from 1 – 4 where 1,2,3 = no break 4 = takes a break Or Random numbers from 1 – 100 where 1-75 – no break 76-100 = take a break Tool
  • 8. Sample answer: The tool I will use is the random number generator on my calculator. I will generate random numbers from 1 – 4 where: 1, 2, 3 means no break is taken 4 means the jogger takes a break Tool
  • 9.
  • 11.
  • 12. Suppose you have 5 joggers in the group, and the probability that each one might have to take a break is 0.75 How will you simulate this? How many numbers need to be generated per trial? Trial
  • 13. Obviously you need to generate a number for each jogger, so that’s 5 numbers per trial. You’ll need to record these results, and then repeat for 30 trials. Easy! Trial
  • 14. Trial Sample answer: One trial will consist of me generating 5 random numbers as described before, one for each jogger. I will record these numbers, and whether a break was taken or not in a table. I will carry out 30 trials.
  • 15.
  • 16. What you’re going to do with these numbers (duh…record them in a table of course)
  • 17.
  • 19. Calculation There are two usual types of calculation made at the end of a simulation. For one of the type discussed here it is usually an estimate of the probability that something will happen.
  • 20. Calculation Estimate the probability the jogging group will not have to take a break. 𝑃𝑛𝑜 𝑏𝑟𝑒𝑎𝑘=# 𝑡𝑟𝑖𝑎𝑙𝑠 𝑤h𝑒𝑟𝑒 𝑛𝑜 𝑏𝑟𝑒𝑎𝑘 𝑡𝑎𝑘𝑒𝑛# 𝑡𝑟𝑖𝑎𝑙𝑠 𝑐𝑎𝑟𝑟𝑖𝑒𝑑 𝑜𝑢𝑡 So the answer will depend on your simulation results.  
  • 21. Calculation For a simulation with more open-ended trials the calculation might involve an estimate of average number of times something might happen (e.g. oil strike question practised in class).
  • 22. Life after simulation… You will often be expected to compare your simulation probability to a theoretical one. E.g. Calculate the theoretical probability that the jogging group does not have to take a break, and compare it to your simulation results.
  • 23. The probability that the group doesn’t take a break is really asking for the probability that the first jogger doesn’t need a break and the second doesn’t and the third doesn’t and the fourth doesn’t and the fifth doesn’t. In other words it’s just 0.75 x 0.75 x 0.75 x 0.75 x 0.75