Stochastic Processes Questions

1. An auto manufacturing company wanted to investigate how the price of one of its car models depreciate with age. The research department of the company took a sample of eight carsof this model and collected the following information on the ages (in years) and prices (in hundreds of dollars) of these cars.

Ages 8 3 6 9 2 5 6 2

Price 38 220 95 33 267 134 112 245

a) Construct a scatter diagram for these data. Does the scatter diagram exhibit a linear relationship between ages and prices of cars?

b) Find the regression line with price as the dependent variable and age as an independent variable.

c) Give a brief interpretation of the values of a and b as calculated in part (b)

d) Plot the regression line on the scatter diagram and show the errors by drawing vertical lines between the scatter points and the regression line.

e) Predict the price of a 7-year-old car of this model

f) Estimate the price of an 18-year-old car and comment on your findings.

A random process is defined by where g(t) is the rectangular pulse of Fig. P9.1, and T is a uniformly distributed random variable in the interval (0, 1).

(a) Find the pmf of Y(t).

(b) Find mY(t) and Cy (t1, t2)

Use Dynamic Programming to answer the following questions:
a. (2 pts.) What was the optimal solution to the current problem?
b. (9 pts.) From the original problem, what would be the optimal solution if you decide you want to carry at least 1 unit of item 3? - Write down
step by step (in mathematical form) how you arrived at the solution.
c. (9 pts.) From the original problem, what would be the optimal solution if the doctor says that you should not carry more than 8 pounds in the
sack? - Write down step by step (in mathematical form) how you arrived at the solution

Problem 2: Dynamic Programming 2 (20 pts.)
Recall the knapsack problem we did in class where a 10-lb knapsack is to be filled with the items listed in the table. Note that in this case we can
fill the sack with several units of the same item. Given the information below

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. 2. 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 function. (The specification comes from the third component.) 3. A mathematical model of the process, system, or problem whose behavior or solution is to be simulated. 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.

 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 4.1 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 𝐹𝐹 who’s 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 redials (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 process. 1.1 Define notation for all the elements of the model. 1.2 Write the expression for the cumulative distribution function of 𝑋𝑋, and derive the expression for its inverse. 1.3 Draw the tree diagram of the calling process. 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). 2. Collect data. Perform an ad-hoc experiment using your phone and playing the roles of a representative and of a customer. 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.] 3. 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.] 4. Simulate the calling process 𝑛𝑛 = 1000 times. 5. 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 π‘Šπ‘Š. 6. Analyze the results and draw conclusions. In particular: 6.1 Compare the mean with the median. What does this comparison suggest about the shape of the probability density function of π‘Šπ‘Š? 6.2 Determine the sample space of π‘Šπ‘Š. 6.3 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. 7. Comment on the approach. 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. 2. Explain your work, summarize the results, answer questions. 3. Do not submit computer code or raw data, but archive them. Format 4. Use standard letter-size, white paper; blank or lined. 5. Write legibly in longhand or type; write concisely. 6. Draw figures professionally: to scale, with labels on axes, and captions. 7. Paginate and staple. Help and Honor Pledge 8. 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 team