Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A simulation models random events by using random numbers to specify event outco

ID: 3307388 • Letter: A

Question

A simulation models random events by using random numbers to specify event outcomes with relative frequencies that correspond to the true real world relative frequencies to be modelled.

We’ve talked about some test statistics and introduced sampling distributions. We can use simulation to generate samples from/for statistical models.

For example: Say you want to model coin tosses and you are interested in relative frequency (or probability) of tossing 2 heads in a row in two flips of a coin. Let’s call the relative frequency of an event E: P(E) = # outcomes E / total # outcomes

(Here, E = {2 heads in a row}.

To be painfully succinct: simulation ’simulates’ samples from a population. For our coin experiment, we need to simulate tossing a coin, maybe a bunch of times, and count the number of times our simulation resulted in a ’heads’ and divide it by the total length of our simulation.

A simple, and common, way to do this is to generate a random number between 0 and 1 – if the number is less than .5, say, we call it heads. In R runif(10) 2 , for instance, will generate 10 random numbers between 0 and 1

For instance:

runif(10)

[1] 0.90979508 0.98049068 0.24779979 0.47962977 0.24321241 0.04104578

[7] 0.32143640 0.10534937 0.93015685 0.98447176

Here, ’coin flips’ three through eight are ’heads’. So we got 3 E events out of 5 total pairs of coin flips, or ’trials’, so our estimate is P(E) = 3 5 = .6.3 Of course we would feel much better about our estimate if we generated lots of coin flips and counted all the success and divided by all the pairs. I’ll tell you that in the long run we should see a relative frequency of 1/4 = .25

Devise and use simulations to answer these questions.

i The relative frequency that the sum of two rolled die equals 8

ii The 25th, 50th, 75th, 90th, and 95th ptile from the distribution of the sum of two rolled die.

iii The 25th, 50th, 75th, 90th, and 95th ptile from the distribution of the sum of two rolled, three-sided die.

iv The probability that the sum of two rolled die is less than 11.

Explanation / Answer

Solution:

We consider the standard 6-sided die, unless stated otherwise:

i) The relative frequency that the sum of two rolled die equals 8.

= 5/36

ii) The 25th, 50th, 75th, 90th, and 95th percentile from the distribution of the sum of two rolled die:

25th percentile : 5

50th percentile : 7

75th percentile : 9

90th percentile : 10

95th percentile : 11

iii) The 25th, 50th, 75th, 90th, and 95th percentile from the distribution of the sum of two rolled, three-sided die:

25th percentile : 3

50th percentile : 4

75th percentile : 5

90th percentile : 5

95th percentile : 6

(Assume : the three sides are numbered 1,2 and 3 respectively.)


iv) The probability that the sum of two rolled die is less than 11.

= 1 - [ P (X = 12) + P (X =11) ]

= 1 - 3/36 = 33/36
= 11/12

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote