A simulation imitates a real situation Is supposed to give similar results And so acts as a...
-
Upload
margaretmargaret-ellis -
Category
Documents
-
view
215 -
download
2
Transcript of A simulation imitates a real situation Is supposed to give similar results And so acts as a...
![Page 1: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/1.jpg)
Experimental Probability and Simulation
![Page 2: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/2.jpg)
A simulation imitates a real situation Is supposed to give similar resultsAnd so acts as a predictor of what should
actually happen It is a model in which repeated
experiments are carried out for the purpose of estimating in real life
Simulation
![Page 3: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/3.jpg)
Used to solve problems using experiments when it is difficult to calculate theoretically
Often involves either the calculation of:◦ The long-run relative frequency of an event happening◦ The average number of ‘visits’ taken to a ‘full-set’
Often have to make assumptions about situations being simulated. E.g. there is an equal chance of producing a boy or a girl
![Page 4: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/4.jpg)
Maths online
Simulating tossing a fair coin
![Page 5: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/5.jpg)
AC/on RUN <Exe> OPTN F6 PROB Ran#
Random Numbers on Casio fx-9750G PLUS
![Page 6: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/6.jpg)
1. To Simulate tossing of a coin◦ Ran#
Heads: 0.000 000 -0.499 999 Tails: 0.500 000 – 0.999 999
2. To simulate LOTTO balls◦ 1+40Ran#, truncate the result to 0 d.p., or◦ 0.5+40Ran#, truncate the result to 0 d.p.
Random Numbers (some ideas)
![Page 7: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/7.jpg)
3. To simulate an event which has 14% chance of success
◦ 100Ran#, truncate the result to 0 d.p. 0 – 13 for success, 14-99 for failure, or
◦ 1+100Ran#, truncate the result to 0 d.p. 1-14 for success, 15-100 for failure
Random Numbers
![Page 8: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/8.jpg)
Assume each day has equal probability (1/7)
Use spreadsheet function RANDBETWEEN(1,7)
Generate 4 random numbers to simulate one family
Repeat large number of times
Eg: Simulate probability that 4 members of a family were each born on a different day
Day of the week
Random Number
Sunday 1
Monday 2
Tuesday 3
Wednesday
4
Thursday 5
Friday 6
Saturday 7
Microsoft Office Excel Chart
![Page 9: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/9.jpg)
The description of a simulation should contain at least the following four aspects:
Tools Definition of the probability tool, eg. Ran#, Coin, deck of
cards, spinner Statement of how the tool models the situation
Trials Definition of a trial Definition of a successful outcome of the trial
Results Statement of how the results will be tabulated giving an
example of a successful outcome and an unsuccessful outcome
Statements of how many trials should be carried out
TTRC
![Page 10: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/10.jpg)
TTRC continued
Calculations
Statement of how the calculation needed for the conclusion will be done
Long-run relative frequency =
Mean =
trialsofNumber
results ’successful‘ ofNumber
trialsofNumber
results ’successful‘ ofNumber
![Page 11: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/11.jpg)
Problem: What is the probability that a 4-child family will contain exactly 2 boys and 2 girls?
![Page 12: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/12.jpg)
Tool: First digit using calculator 1+10Ran#Odd Numbers stands for ‘Boy’ andEven Number stands for ‘Girl’
Trial: One trial will consist of generating 4 random numbers to
simulate one family.A Successful trial will have 2 odd and 2 even numbers.
Results:
Number of Trials needed: 30 would be sufficientCalculation:
Probability of 2 boys & 2 girls =
Trial Outcome of trial
Result of trial
1 2357 Unsuccessful
2 4635 Successful
trialsofNumber
results ’successful‘ ofNumber
![Page 13: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/13.jpg)
Problem: As a part of Christmas advertising a petrol station gives away one of 6 Lego toys to each customer who purchases $20 or more of fuel.
Calculate how many visits to the petrol station a customer would need to make on average to collect all 6 Lego toys.
Assumption: The likelihood of one Lego toy being handed out is independent of another.
![Page 14: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/14.jpg)
Tool: Generate random numbers between 1 & 6 (inclusive), each number stands for each toy.
Trial: One trial will consist of generating random numbers till all numbers from 1 to 6 have been generated.Count the number of random numbers need to get one full set
Results:
Number of Trials needed: 30 would be sufficient
Calculation:
Average number of visits = Total visitsNumber of trials
Solution (suggestion)
Trial Toy1
Toy2 Toy3 Toy4 Toy5 Toy6 Tally Total Visits
1 Y Y Y Y Y Y 10
2 Y Y Y Y Y Y 19
![Page 15: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/15.jpg)
Problem: Mary has not studied for her Biology test. She does not know any of the answers on a three-question true-false test, and she decides to guess on all three questions
Design a simulation to estimate the probability that Mary will ‘Pass’ the test. (i.e. guess correct answers to atleast 2 of the 3 questions)
Calculate the theoretical probability that Mary will pass the test.
![Page 16: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/16.jpg)
Tool: The probability that Mary guesses a question true is one half.First digit using calculator 1 + 10Ran#1to 5 stands for ‘correct answer’6 to 10 stands for ‘incorrect answer’
Trial: One trial will consist of generating 3 random numbers to simulate Mary answering one complete test.
A successful outcome will be getting atleast 2 of the 3 random numbers between 1 and 5.
Results:
Number of Trials needed: 30 would be sufficientCalculation: Estimate of probability of ‘passing’ the exam =
Solution (suggestion)
Trial Outcome of Trial Result of Trial
1 122 Successful trial
2 167 Unsuccessful trial
trialsofNumber
results ’successful‘ ofNumber
![Page 17: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/17.jpg)
Problem: Mary has not studied for her history test. She does not know any of the answers on an eight-question true-false test, and she decides to guess on all eight questions
Design a simulation to estimate the probability that Mary will ‘Pass’ the test. (i.e. guess correct answers to atleast 4 of the eight questions)
![Page 18: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/18.jpg)
Tool: The probability that Mary guesses a question true is one half.
First digit using calculator 1 + 10Ran#
1to 5 stands for ‘correct answer’
6 to 10 stands for ‘incorrect answer’
Trial: One trial will consist of generating 8 random numbers to simulate Mary answering one complete test.
A successful outcome will be getting atleast 4 of the 8 random numbers between 1 and 5.
Results:
Number of Trials needed: 30 would be sufficient
Calculation:
Estimate of probability of ‘passing’ the exam =
Solution (suggestion)
Trial Outcome of Trial Result of Trial
1 12236754 Successful trial
2 13672987 Unsuccessful trial
trialsofNumber
results ’successful‘ ofNumber
![Page 19: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/19.jpg)
Problem: Lotto 40 balls and to win you must select 6 in any order. In this mini Lotto, there are only 6 balls and you win when you select 2 numbers out of the 6.
Design and run your own simulation to estimate the probability of winning (i.e. selecting 2 numbers out of the 6)Calculate the theoretical probability of winning.
![Page 20: A simulation imitates a real situation Is supposed to give similar results And so acts as a predictor of what should actually happen It is a model.](https://reader036.fdocuments.us/reader036/viewer/2022082816/56649cdc5503460f949a7346/html5/thumbnails/20.jpg)
Tool: Two numbers (between 1 and 6) will need to be selected first (say 2 & 4)First digit using calculator 1 + 6Ran#, ignore the decimals.
Trial: One trial will consist of generating 2 random numbersDiscard any repeat numbersA successful outcome will be getting 2 of the 6 random numbers
generatedResults:
Number of Trials needed: 50 would be sufficientCalculation:
Estimate of probability of ‘winning’ = Number of ‘successful’ outcomeNumber of trials
Theoretical probability in this case is 1/15
Solution (suggestion)
Trial Outcome of Trial Result of Trial
1 2 4 Successful trial
2 13 Unsuccessful trial