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

Wonky tesselations
Wonky tesselationsWonky tesselations
Wonky tesselationsniamhriordan
 
預見成功的奧秘
預見成功的奧秘預見成功的奧秘
預見成功的奧秘beverlyhills
 
Algebra solving no animations
Algebra   solving no animationsAlgebra   solving no animations
Algebra solving no animationsniamhriordan
 
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...Kutlu Kazanci
 
Algebra 2 review ppt
Algebra 2 review pptAlgebra 2 review ppt
Algebra 2 review pptniamhriordan
 
Healing Garden靈性花園
Healing Garden靈性花園Healing Garden靈性花園
Healing Garden靈性花園beverlyhills
 
色彩冥想Color of Light Meditation
色彩冥想Color of Light Meditation色彩冥想Color of Light Meditation
色彩冥想Color of Light Meditationbeverlyhills
 
七輪淨化呼吸法 開啟身體能量中心
七輪淨化呼吸法 開啟身體能量中心七輪淨化呼吸法 開啟身體能量中心
七輪淨化呼吸法 開啟身體能量中心beverlyhills
 
冥想靜坐入門
冥想靜坐入門冥想靜坐入門
冥想靜坐入門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

Casestudy 01 algorithms
Casestudy 01 algorithmsCasestudy 01 algorithms
Casestudy 01 algorithmsrawaha134
 
Course project solutions 2018
Course project solutions 2018Course project solutions 2018
Course project solutions 2018Robert Geofroy
 
How scienceworks -errors
How scienceworks -errorsHow scienceworks -errors
How scienceworks -errorsHansa Lettl
 
How scienceworks -errors
How scienceworks -errorsHow scienceworks -errors
How scienceworks -errorsHansa Lettl
 
2014 simulations
2014 simulations2014 simulations
2014 simulationsKate FLR
 
Statistical tests
Statistical testsStatistical tests
Statistical testsmartyynyyte
 
Monte Carlo Simulation
Monte Carlo SimulationMonte Carlo Simulation
Monte Carlo SimulationDeepti Singh
 
Ch. 11 Simulations Good
Ch. 11 Simulations GoodCh. 11 Simulations Good
Ch. 11 Simulations Goodchristjt
 
Quality Assurance 2: Searching for Bugs
Quality Assurance 2: Searching for BugsQuality Assurance 2: Searching for Bugs
Quality Assurance 2: Searching for BugsMarc Miquel
 
44 randomized-algorithms
44 randomized-algorithms44 randomized-algorithms
44 randomized-algorithmsAjitSaraf1
 
Ensemble Learning and Random Forests
Ensemble Learning and Random ForestsEnsemble Learning and Random Forests
Ensemble Learning and Random ForestsCloudxLab
 
DA lecture 3.pptx
DA lecture 3.pptxDA lecture 3.pptx
DA lecture 3.pptxSayanSen36
 
Software fundamentals
Software fundamentalsSoftware fundamentals
Software fundamentalsSusan Winters
 
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 algorithmsAhmed Nobi
 
Lecture 12 binary classifier confusion matrix
Lecture 12 binary classifier confusion matrixLecture 12 binary classifier confusion matrix
Lecture 12 binary classifier confusion matrixMostafa El-Hosseini
 
Notes-Unit 6 Lesson 2
Notes-Unit 6 Lesson 2Notes-Unit 6 Lesson 2
Notes-Unit 6 Lesson 2lterrell302
 

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

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 

Recently uploaded (20)

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 

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