Successfully reported this slideshow.
Upcoming SlideShare
×

# Simulations

840 views

Published on

A TTRC approach to probability simulations

Published in: Education
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

### Simulations

1. 1. Simulations<br />How to design and run a simulation<br />
2. 2. First Step<br />Read your task carefully. <br />What problem exactly are you designing a simulation of?<br />What is it that you need to calculate at the end?<br />
3. 3. Taking a TTRC approach<br />Tool – what tool we’re going to use<br />Trial – how to define a trial, and how many we’ll carry out<br />Results – a table showing our results<br />Calculation – how to use our results to make a calculation which completes the task<br />
4. 4. Tool<br />Remember, your simulation must be based on some probability reasoning. <br />So the Tool the you choose, and how you use it, will have to be based on a probability.<br />E.g. <br />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.<br />
5. 5. Tool<br />Not quite even chances…<br />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.<br /> <br />If I generate a random number from 1-10, I could define 1 to mean it happens, and 2-10 mean it doesn’t!<br />
6. 6. How would you simulate…<br />A jogger estimates the probability he’ll finish his run without taking a break is 0.75<br />What numbers would you generate to simulate whether he takes a break or not?<br />Tool<br />Hmmm..<br />?x Ran# + 1<br />
7. 7. You could use…<br />You could use: Random numbers from 1 – 4 where<br /> 1,2,3 = no break<br /> 4 = takes a break<br />Or<br /> Random numbers from 1 – 100 where<br /> 1-75 – no break<br /> 76-100 = take a break<br />Tool<br />
8. 8. Sample answer:<br />The tool I will use is the random number generator on my calculator.<br />I will generate random numbers from 1 – 4 where:<br /> 1, 2, 3 means no break is taken<br />4 means the jogger takes a break<br />Tool<br />
9. 9. Tool<br />There’s no one correct way to define the Tool.<br />Just think carefully about what you’re doing.<br />Remember to state: <br /><ul><li>What you’re using (random number generator)
10. 10. What numbers you’re generating
11. 11. What they mean</li></li></ul><li>Trial<br />Usually the situation you are simulating will be more complicated than just one isolated event.<br />For example, you might be trying to simulate a group of joggers and whether they are likely to have to take a break for one of their members.<br />
12. 12. Suppose you have 5 joggers in the group, and the probability that each one might have to take a break is 0.75<br /> How will you simulate this?<br /> How many numbers need <br /> to be generated per trial?<br />Trial<br />
13. 13. Obviously you need to generate a number for each jogger, so that’s 5 numbers per trial.<br />You’ll need to record these results, and then repeat for 30 trials. <br /> Easy!<br />Trial<br />
14. 14. Trial<br />Sample answer:<br />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.<br />I will carry out 30 trials.<br />
15. 15. Trial<br />So when you’re designing a simulation you need to state:<br /><ul><li>What one trial will consist of (i.e. how many numbers you need to generate)
16. 16. What you’re going to do with these numbers (duh…record them in a table of course)
17. 17. How many times you’re going to repeat the process.</li></li></ul><li>Results<br />By now you’ve decided exactly how this simulation is going to run, so you should know what you want to record. <br />Just draw up a neat table with headings and start carrying out trials.<br />
18. 18. Results<br />
19. 19. Calculation<br />There are two usual types of calculation made at the end of a simulation.<br />For one of the type discussed here it is usually an estimate of the probability that something will happen.<br />
20. 20. Calculation<br />Estimate the probability the jogging group will not have to take a break.<br />𝑃𝑛𝑜 𝑏𝑟𝑒𝑎𝑘=# 𝑡𝑟𝑖𝑎𝑙𝑠 𝑤h𝑒𝑟𝑒 𝑛𝑜 𝑏𝑟𝑒𝑎𝑘 𝑡𝑎𝑘𝑒𝑛# 𝑡𝑟𝑖𝑎𝑙𝑠 𝑐𝑎𝑟𝑟𝑖𝑒𝑑 𝑜𝑢𝑡<br />So the answer will depend on your simulation results.<br /> <br />
21. 21. Calculation<br />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).<br />
22. 22. Life after simulation…<br />You will often be expected to compare your simulation probability to a theoretical one.<br />E.g.<br />Calculate the theoretical probability that the jogging group does not have to take a break, and compare it to your simulation results. <br />
23. 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.<br />In other words it’s just <br />0.75 x 0.75 x 0.75 x 0.75 x 0.75<br />