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