Economics 502- Fall 2018

Homework 3 Due Monday by 4 pm October 1st: Section M1- Prakrati mailbox; Section M2: Lucas mailbox.

The mailboxes are located in 205 DKH.

This homework has three parts I, II &III. The first part you have to use Excel. In the second part you have to solve some problems. In the third part you solve some problems assigned from the textbook. You are required to do parts I & II. Part III is optional. Part I. Use Excel for the following: You will turn in the print of your completed Excel worksheets. i) First sheet: Discrete probability distribution Enter your name in cell A1. Starting in row 10 make columns as follows: Column contents B Y (The numbers 1-9) C X(i) the values of your UIN (i.e. nine random numbers) D P(Y) = X(i)/Sum(X(1):X(9)) E cumulative Prob, F Y*P(Y), G Y^2 * P(Y), H Y-E(Y), I (Y-E(Y))* P(Y), J (Y-E(Y))^2 * P(Y), K (Y-E(Y))^3 * P(Y), Where the sum of any column has meaning, put it at the bottom of the column. E.g., for P it should equal 1, but nothing should be at the bottom of Y-E(Y). Also find the median and put it below E(Y). Is this an appropriate discrete probability distribution? State on the worksheet below the table how you know it is. Find the variance by using both methods discussed in class. ii) Second sheet: How to simulate Bernoulli experiments? First, we create 100 random numbers, π‘ˆπ‘– 𝑖 = 1, β‹― ,100 from uniform distribution between zero & one. Then, define any realization equal to or below 0 < p <1, as success and any realization greater than p as failure. Define the Bernoulli random variable𝑋𝑖, which takes value of 1, when the realization is a β€œsuccess” and zero, when the realization is β€œfailure”, i.e. 𝑋𝑖 = 1 𝑖𝑓 π‘ˆπ‘– ≀ 𝑝 and 𝑋𝑖 = 0 𝑖𝑓 π‘ˆπ‘– > 𝑝. It is obvious that the probability of success is p. Now, do the following in Excel: I) Create 100 random numbers from uniform distribution between zero & one in cells A1:A100. II) Create a random variable defined as follows: In cell B1 enter IF(A1< = 0.4, 1, 0). Copy and paste in the cells B2: B100. This assigns 1 if the outcome of uniform distribution is 0.4 or below and 0 if the outcome of uniform distribution is above 0.4. III) In cell C1, find the sum of success (=SUM(B1:B100)) and In cell C2, find the proportion of success. Is it equal to 0.4? IV) What happens if you create 1000 random numbers (Do this in cells D1:D1000 and find the sum and proportion of success in cells F1 and F2).

V) What happens if you create 10,000 random numbers (Do this in cells G1:G10000 and find the sum and proportion of success in cells I1 and I2). iii) Third sheet: Binomial distribution Enter your name in cell A1. Let p = X(9)*.05 + .25 where X(9) is the ninth digit of your university identity number. This is the p in the binomial formula. Now for a sample of size 10, n=10, we will calculate the probability of each event from Y=0 to 10 successes. Make columns as follows:

Y,𝐢𝑦 𝑛 = (

𝑛 𝑦), 𝑝

𝑦, (1 βˆ’ 𝑝)π‘›βˆ’π‘¦, 𝑃(π‘Œ = 𝑦)), Y*P, π‘Œ2 βˆ— 𝑝, (π‘Œ βˆ’ 𝐸(π‘Œ))2 βˆ— 𝑝

Where the sum of any column has meaning, put it at the bottom of the column. (Label the mean and variance.) Compute the mean and variance using the binomial formulas from class. iv) Fourth sheet: Poisson as an approximation of Binomial distribution Enter your name in cell A1. Find the probability values for two binomial distributions and contrast them with the Poisson approximation. You will find two binomial distributions and a Poisson. For the first binomial: set n = last three digits of your university identification number. If the value is less than 100, add 100. Then, set p = next preceding digit*.001, but if zero use the prior value. For the second binomial: let n be 10 times greater and p be 1/10 of the values of the first binomial. The purpose is to observe how closely the Poisson distribution is to the binomial. Make a table like the following but let Y range up to 20. Y Binomial Binomial Poisson (These columns look at the difference

between each Binomial column and the Poisson column.) n 339 3390

p 0.008 0.0008 Error of Poisson Percent Error lambda 2.712 339 3390 339 339 0 0.065684 0.066332 0.066404 0.000720 7.203E-05 1.10% 0.11% 1 0.17957 0.180036 0.180087 0.000517 5.133E-05 0.29% 0.03% 2 0.244737 0.244252 0.244198 -0.000539 -5.379E-05 -0.22% -0.02% 3 0.221711 0.22085 0.220755 -0.000955 -9.504E-05 -0.43% -0.04%

At the bottom of the table, type answers to the following: What happens to the percentage difference as Y increases? Does this difference matter? Why?

Part II. Solve the following questions: 1) Does the following represents a valid probability table? Find the expected value and the variance.

Outcomes 1 2 3 4 5

Probability 1/2 1/5 1/10 1/10 1/10

2) Suppose that a student takes a multiple choice test. The test has 10 questions, each of which has 4 possible answers (only one correct). If the student blindly guesses the answer to each question, do the questions form a sequence of Bernoulli trials? If so, identify the trial outcomes and the probability of guessing the correct answer p. 3) Candidate A is running for office in a certain district. Twenty persons are selected at random from the population of registered voters and asked if they prefer candidate A. Do the responses form a sequence of Bernoulli trials? If so identify the trial outcomes and the meaning of the parameter p. 4) Suppose that each person in a population, independently of all others, has a certain disease with probability p∈ (0,1). For a group of k persons, we will compare two strategies. The first is to test the k persons individually, so that of course, k tests are required. The second strategy is to pool the blood samples of the k persons and test the pooled sample first. We assume that the test is negative if and only if all k persons are free of the disease; in this case, just one test is required. On the other hand, the test is positive if and only if at least one person has the disease, in which case we then have to test the persons individually; in this case k+1 tests are required. Thus, let Y denote the number of tests required for the pooled strategy. a) What is P(Y=1)? What is P(Y = k+1) ? b) What is E(Y)? What is V(Y)? c) Show that in terms of expected value, the pooled strategy is better than the basic strategy if and only if p < pk where pk = 1- (1/k) ^(1/k). Note that pk οƒ  0 as k οƒ  infinity. What s the implication for the choice of strategy? 5) If 25 percent of the balls in a certain box are red, and if 15 balls are selected from the box at random, with replacement, what is the probability that more than four red balls will be obtained? 6) Suppose an economist is organizing a survey of American minimum wage workers, and is interested in understanding how many workers that earn the minimum wage are teenagers. Suppose further that one out of every four minimum wage workers is a teenager. If the economist finds 80 minimum wage workers for his survey, what’s the probability that he interviews exactly 14 teenagers? 35 teenagers? What’s the probability that he gets at least 5 teenagers in his survey? 7) The manager of an industrial plant is planning to buy a machine of either type A or type B. For each day’s operation the number of repairs X, that the machine A needs is a Poisson random variable with mean 0.96. The daily cost of operating A is CA = 160 + 40 βˆ— X2. For machine B, let Y be the random variable indicating the number of daily repairs, which has mean 1.12, and the daily cost of operating B is CB = 128 + 40 βˆ— Y2 . Assume that the repairs take negligible time and each night the machine are cleaned so that they operate like new machine at the start of each day. Which machine minimizes the expected daily cost?

8) The number of calls coming per minute into a hotels reservation center is Poisson random variable with mean 3. (a) Find the probability that no calls come in a given 1-minute period. (b) Assume that the number of calls arriving in two different minutes are independent. Find the probability that at least two calls will arrive in a given two-minute period. 9) Suppose you have a random variable X whose moments are given by E[Xn ] = n!. Find the moment generating function for X. Part III. (optional) In your book, do the following problems: Chapter 3: 7th edition: 11, 12, 23, 30, 37, 39, 58, 60, 64, 65, 70, 71, 82, 90, 96, 123, 127, 130, 132, 148, 153, 155, 161 6th edition: 9, 10, 17, ?? (30 in 7th edition), ?? (37 in 7th edition), 27, 42, 44, 48, 49, 54, 55, 64, 72, 78, ?? (123 in 7th edition), 101, 102, 104, 118, 121, 123, ??(161 in 7th edition),