Docsity

Worksheet 16 - Monte Carlo - Simulation | MATH 115A, Assignments of Mathematics

Toggle sidebar
bg1
WS 16 – Monte Carlo - Simuation Name:
#
1. Monte Carlo Exercise 5 slide 161 Modify Coding.xls (or create your own like we did in class 3/25)
(i) to estimate the probability that a random sample of 5 forms contains at least one error.
(ii) to estimate the probability that a random sample of 5 forms contains no more than two errors.
Read the text and follow example 1 in the text before attempting this exercise (the probabilities are
different than the one we did in class) but the set up is the same. If you change a cell(s) make sure you
include that in your answer
Solution:
2. Monte Carlo Exercise 6 slide 161 Modify Coding.xls (or modify your own file) to estimate the
probability that a random sample of 5 forms contains more than one coding error if they come from a
doctor’s office where
P(X=0)=0 . 94
,
P(X=1)=0 . 04
, and
P(X=2)=0 . 02
. Generate
4000 observations.
Don’t print all 4000 observations just indicate what is in each cell, Display 3 runs(lines), Total
number of runs that met the criterion (more than one coding error) and your probability. Make sure
you indicate which cell(s) you changed and what you changed in that cell
Solution:
3. Monte Carlo Modify Coding.xls (or modify your own file) to estimate the probability that a random
sample of 5 forms contains more than one coding error if they come from a doctor’s office where
P(X=0)=0 . 95
,
P(X=1)=0 . 04
, and
P(X=2)=0 . 01
. Generate 4000 observations.
Don’t print all 4000 observations just indicate what is in each cell, Display 3 runs(lines), Total
number of runs that met the criterion (more than one coding error) and your probability. Make sure
you indicate which cell(s) you changed and what you changed in that cell
Solution
4. Monte Carlo Exercise 12 Modify the Excel file Queuing Example 2. xlsx, so that it will create, and
correctly plot, random samples of size 500 for an exponential random variable, X, with
a) parameter a = 10.
b) parameter a = 2
c) parameter a = 0.5
d) What do you observe?
Solution: State what cell(s) you change and what you changed in each cell. Copy and paste special the
graph.
5. Monte Carlo Exercise 14 slide 169 Consider the graphics cards from Example 3.
(i) (Example 3) Let
S
5
be the lifetime, in years, of a sequence of 5 cards. Use 10,000 sets of card
samples to approximate
P(S
5
≥10)
record this simulation 5 times and average the 5
P(S
5
≥10)
This is already done just record the average
(ii) Let
S
4
be the lifetime, in years, of a sequence of 4 cards. Use 10,000 sets of card samples to
approximate
P(S
4
≥10 )
record this simulation 5 times and average these 5.
(iii) Redo Part (i), using
S
6
, the lifetime, in years, of a sequence of 6 cards. Record this
simulation 5 times and average these 5.
(iv) Explain the relationship between your answers to Parts (i), (ii) and (iii). – try to make a
prediction about 7 cards if you think you can.
For each simulation make sure you make a duplicate worksheet before you make changes.
pf3

Partial preview of the text

Download Worksheet 16 - Monte Carlo - Simulation | MATH 115A and more Assignments Mathematics in PDF only on Docsity!

WS 16 – Monte Carlo - Simuation Name:

1. Monte Carlo Exercise 5 slide 161 Modify Coding.xls ( or create your own like we did in class 3/25 )

(i) to estimate the probability that a random sample of 5 forms contains at least one error.

(ii) to estimate the probability that a random sample of 5 forms contains no more than two errors.

Read the text and follow example 1 in the text before attempting this exercise ( the probabilities are

different than the one we did in class ) but the set up is the same. If you change a cell(s) make sure you

include that in your answer

Solution:

2. Monte Carlo Exercise 6 slide 161 Modify Coding.xls ( or modify your own file ) to estimate the

probability that a random sample of 5 forms contains more than one coding error if they come from a

doctor’s office where

P ( X = 0 )= 0. 94

P ( X = 1 )= 0. 04

, and

P ( X = 2 )= 0. 02

. Generate

4000 observations.

Don’t print all 4000 observations just indicate what is in each cell, Display 3 runs(lines), Total

number of runs that met the criterion (more than one coding error) and your probability. Make sure

you indicate which cell(s) you changed and what you changed in that cell

Solution:

3. Monte Carlo Modify Coding.xls ( or modify your own file ) to estimate the probability that a random

sample of 5 forms contains more than one coding error if they come from a doctor’s office where

P ( X = 0 )= 0. 95

P ( X = 1 )= 0. 04

, and

P ( X = 2 )= 0. 01

. Generate 4000 observations.

Don’t print all 4000 observations just indicate what is in each cell, Display 3 runs(lines), Total

number of runs that met the criterion (more than one coding error) and your probability. Make sure

you indicate which cell(s) you changed and what you changed in that cell

Solution

  1. Monte Carlo Exercise 12 Modify the Excel file Queuing Example 2. xlsx , so that it will create, and

correctly plot, random samples of size 500 for an exponential random variable, X, with

a) parameter a = 10.

b) parameter a = 2

c) parameter a = 0.

d) What do you observe?

Solution : State what cell(s) you change and what you changed in each cell. Copy and paste special the

graph.

  1. Monte Carlo Exercise 14 slide 169 Consider the graphics cards from Example 3.

(i) (Example 3) Let

S

5

be the lifetime, in years, of a sequence of 5 cards. Use 10,000 sets of card

samples to approximate

P ( S

5

record this simulation 5 times and average the 5

P ( S

5

This is already done just record the average

(ii) Let

S

4

be the lifetime, in years, of a sequence of 4 cards. Use 10,000 sets of card samples to

approximate

P ( S

4

record this simulation 5 times and average these 5.

(iii) Redo Part ( i ), using

S

6

, the lifetime, in years, of a sequence of 6 cards. Record this

simulation 5 times and average these 5.

(iv) Explain the relationship between your answers to Parts ( i ), ( ii ) and ( iii ). – try to make a

prediction about 7 cards if you think you can.

For each simulation make sure you make a duplicate worksheet before you make changes.

Make sure you state what you changed and which cell the changes were made.