Monte-Carlo simulation SYSTEM

 

1.    OBJECTIVE

 

This project will introduce you to the fundamentals of Monte-Carlo simulation — a technique of artificially creating samples of random variables which can be large, and which can be used to simulate the behavior of random processes, as well as to solve problems intractable analytically (e.g., those involving multivariate integration or differential equation systems).

 

In a nutshell, it is a technique for numerical experimentation on a computer.  While many software packages offer various simulation programs, we shall not use them here.  For our objective is to train not as users, but as engineers — the designers and developers of new or specialized systems.  And to succeed in such creative tasks, we must understand the fundamentals of system simulation.

 

2.    SIMULATION SYSTEM

 

A Monte-Carlo simulation system has three main components (Yakowitz, 1977).

 

  1. A random number generator — a numerical algorithm which outputs a sequence of

real numbers from the interval (0, 1), termed pseudo-random numbers, which the observer unfamiliar with the algorithm, as well as the standard statistical tests, cannot distinguish from a

sample of independent realizations (observations) of a uniform random variable.

 

  1. A random variable generator — an algorithm that maps any realization of the uniform random variable into a realization of the random variable having a specified cumulative distribution (The specification comes from the third component.)

 

  1. A mathematical model of the process, system, or problem whose behavior or solution is to be

 

Sections 3 and 4 detail algorithms for the first two components; your task is to implement them on a computer, whichever way you choose.  Section 5 presents a problem; your task is to model it using constructs of probability theory, and then to solve it via Monte-Carlo simulation.

 

Reference

 

Yakowitz, S.J. (1977).  Computational Probability and Simulation, Addison-Wesley, Reading, Massachusetts.

 

 

3.    RANDOM NUMBER GENERATOR

 

A popular algorithm, known as the linear congruential random number generator, specifies the recursive rule:

        =    (    −1      +   )(    ),                                                    (1a)

        =                        /,                               (1b)

for = 1, 2, 3, … . The meaning of rule (1a) is: multiply −1 by and add ; then divide the result by , and set  to the remainder. Every term is an integer: and are positive; and

−1 are non-negative. Rule (1b) states that the ℎ random number is the quotient  / in the decimal representation, which is a real number between 0 and 1.

Every sequence of pseudo-random numbers eventually cycles. To achieve maximum cycle length, the parameters must satisfy certain proven rules.  For this project, we chose

starting value (seed)                0 = 1000,

multiplier                                   = 24 693,

increment                                   = 3517,

modulus                                    = 215.

They yield the cycle of length = 215. The first three random numbers are 0.6779, 0.1701, 0.5096. Show numbers 51, 52, 53 in your report.

4.    RANDOM VARIABLE GENERATOR

 

  • Discrete Random Variable

 

Let be a discrete random variable with the sample space { ∶ = 1, … , } and a probability mass function () = ( = ) for = 1, … , . The corresponding cumulative distribution function is specified by

() = ( ≤ ) = � (),               = 1, … , .                                   (2)

A given random number  generates realization  of the random variable via the rule:

 = min{ ∶ () ≥  }.                                                         (3)

The rule may be executed by searching sequentially over = 1, … , until () ≥  for the first

time.

 

4.2    Continuous Random Variable

 

Let be a continuous random variable having a continuous cumulative distribution function whose inverse −1 exists in a closed-form. That is, () = ( ≤ ), and =

−1() for any ∈ (0, 1).

A given random number  generates realization  of the random variable through

evaluation:

 

    = −1().                                                                (4)

5.    SIMULATION PROBLEM

 

A representative of a high-speed Internet provider calls customers to assess their satisfaction with the service.  It takes her 6 seconds to turn on a phone and dial a number; then 3 additional seconds to detect a busy signal, or 25 additional seconds to wait for 5 rings and conclude that no one will answer; and 1 second to end a call. After an unsuccessful call, she re- dials (in the course of several days) until the customer answers or she has dialed four times. The outcome of each dialing is determined in an identical way:  the customer being called is using the

line with probability 0. 2; or is unavailable to answer the call with probability 0.3; or is available and can answer the call within seconds, which is a continuous random variable with the mean of 12 seconds and the exponential distribution.  The calling process ends when the customer

answers the call, or when four unsuccessful calls have been completed.

 

Let denote the total time spent by the representative on calling one customer.  Your objective is to estimate several statistics of . Toward this end, perform the following.

  1. Formulate a model of the calling
    • Define notation for all the elements of the
    • Write the expression for the cumulative distribution function of , and derive the expression for its
    • Draw the tree diagram of the calling Hints:  Consider the calling process from two points of view: that of the representative and that of the customer.  The tree diagram may include “if” statements and loops (like a flowchart does).

 

  1. Collect data. Perform an ad-hoc experiment using your phone and playing the roles of a representative and of a  Measure the times needed to perform the various tasks; repeat the measurements several times; report your average values that would replace the

values of 6, 3, 25, 1, 12 seconds specified in the statement of the problem. [However, use the

specified values in the simulations.]

 

  1. Design a Monte-Carlo simulation algorithm. The algorithm should be

 

capable of generating independent realizations (each starting with a different random number) of the calling process and thereby outputting a sample of size of random variable . The way

 

of implementing the algorithm on a computer is up to you. [In the report, briefly describe the algorithm design, the computer code, and the computer language used.]

  1. Simulate the calling process = 1000
  2. Estimate from the generated sample of : (i) the mean; (ii) the first quartile,

the median, the third quartile; (iii) the probabilities of events

≤ 15, ≤ 20, ≤ 30, > 40, > 5, > 6,   > 7,

where 5, 6, 7 are the values you choose in order to depict well the right tail of the cumulative distribution function of .

  1. Analyze the results and draw In particular:
    • Compare the mean with the What does this comparison

suggest about the shape of the probability density function of ?

  • Determine the sample space of .
  • Graph the cumulative distribution function of using the

probabilities estimated in Step 5, and interpolating between them

whenever appropriate. Could be an exponential random variable?

Justify your answer.

 

  1. Comment on the In particular, answer these questions:

(i) Which of the steps was the most (the least) challenging?  (ii) Which of the steps was the most (the least) time consuming?  (iii) How certain are you that the results of the simulation you report are sans errors?  Answer by assessing subjectively the probability that reflects your judgment.

 

6.    REPORT

 

Contents          1.  Organize the report into 7 sections, parallel to the above steps.

  1. Explain your work, summarize the results, answer questions.
  2. Do not submit computer code or raw data, but archive them.

 

Format            4. Use standard letter-size, white paper; blank or lined.

  1. Write legibly in longhand or type; write
  2. Draw figures professionally: to scale, with labels on axes, and
  3. Paginate and

 

Help and Honor Pledge

 

  1. You may discuss the project with the instructors, teaching assistants, and classmates, but all work must be your own. The Honor Pledge must be signed by every member of the
find the cost of your paper

Critical analysis of Change4Life Campaign

Use Subheadings– but do not use more subheadings than listed below Introduction ● Signpost reader to the contents of your essay Campaign Overview ● Identify the campaign you are focusing….

position in the Apple Valley School district-describes the work of two learning theorists and how you might apply the work of each theorist to the position you are seekin

You are applying for a position in the Apple Valley School district and know that there are several other applicants vying for the position. The district prides itself on employing….

Novel CoronaVirus – COVID-19

-Who is more Susceptible to Corona virus focus on the elderly and how it affect the elderly. -Why the elderly are at the higher risk? – How and why it….