Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit


ECO 394D nal exam (take-home)

This is a solo eort only. You may not collaborate with other students on this take-home exam.

There is no explicit time limit to nish the questions. Just submit your answers by the deadline (8/15 @ 10 PM) via Canvas.

Unless the problem says otherwise, you must show your work to receive full credit.

Problem 1 (10 points)

Let A be the event rain tomorrow,” and let B be the information the weather app on your phone says it will rain tomorrow.” You know that only 15% of all days in Central Texas are rainy. Moreover, you know the track record of your weather app: when it rains, your app gives the correct forecast (and correctly says it will say tomorrow) 90% of the time. When it doesn’t rain, your app raises a false alarm (and incorrectly says it will rain tomorrow) 5% of the time. Use this information to calculate the probability of rain tomorrow (A), given that your phone says it will rain tomorrow (B).

Problem 2 (10 points)

Suppose that X is a normally distributed random variable with mean µ = 3 and variance σ 2  = 42 . Using facts you know about the normal distribution, prove that

P (X > 1) = 1 - Φ l   ,

where Φ is the CDF of a standard normal random variable with mean 0 and variance 1.

Problem 3 (10 points)

Suppose that X has a continuous uniform distribution, X ~ Unif(0, 1). Let a and b be xed numbers where 0 < a < b < 1. Define Y and Z as follows:

Y = h(0)

Z =

Are Y and Z independent? Show why or why not by appealing to the formal denition of independence.

Problem 4 (20 points)

Please label the following four statements as either true or false.  You do not need to show any work or explain your answer.

A)  A discrete random variable X can be described in terms of a probability density function (PDF) if and only if X has a nite expected value and nite variance.

B) If X and Y are two random variables, then E (X + Y) = E (X ) + E (Y) if and only if X and Y are independent.

C) If X and Y are two random variables, then var(X - Y) = var(X) - var(Y) if and only if X and Y are independent.

D)  In the Fisherian approach to hypothesis testing, the p-value represents the probability of observing a test statistic in your pre-specified rejection region (i.e. the probability of a Type-1 error under the null hypothesis).

Problem 5 (25 points)

Let X1 , . . . , Xn  be independent and identically distributed (IID) samples from some distribution whose CDF

n

=

A)  For any xed x, the empirical CDF n (x) is a random variable. What are its mean and variance?  (5 points)

B)  Recall that a sequence of random variables Y1 , Y2 , . . . converges in probability to some other random

variable Y if for every ∈ > 0, P (oYn  - Y o > ∈) -_ 0 as n -_ o. Use your result in Part A, together

C)  Go to the stocks_bonds .csv data available on Canvas, which gives annual returns on the S&P 500 going back to 1928.  Let X be the return on the S&P 500 in a single year (column SP500), and let F (x) be the unknown CDF describing the probability distribution of X . Use this data, together with your derivations above, to construct a 95% large-sample confidence interval for F (-0.1): that is, the probability that the S&P 500 will lose 10% or more in a given year. For this purpose, you can assume that the samples in this data set are IID draws from the unknown distribution whose CDF is F (x).  (10 points)

Problem 6 (25 points)

Suppose that X1 , . . . , XN  are independent samples from a Poisson distribution with rate parameter λ, which

has PMF

P (X = x) = f (x; λ) = eλ

Please answer the following questions.

Part A. Show that the sample mean N  is the maximum-likelihood estimate (MLE) for the rate parameter

of the Poisson distribution.  (10 points)

Part B. Two basic facts about the Poisson are that E (Xi ) = λ and var(Xi ) = λ . You don’t need to show these.  Rather, use these facts to derive a formula for a large-sample 95% confidence interval for the true rate parameter, based on the sample X1 , . . . , XN . Your upper and lower bounds of the interval should not

include any unknown parameters (i.e. if you get a formula that does include unknown parameters, make sure to explain what plug-in estimate you’d use).  (5 points)

Part C. You may have seen the Popular Times” feature on Google Maps, which gives you an estimate of how busy a restaurant is over the course of the day.  For example, heres the Google Maps entry for Odd Duck, a restaurant in Austin. If you scroll down on the panel having information about the restaurant, you’ll see a bar chart showing when it’s typically busy. This is estimated from the locations of people using Google services on their smartphones.

Suppose that youre working behind the scenes at Google and trying to build the algorithm that displays an

estimate of how busy a restaurant is. A raw observation for a particular restaurant is of the form Xd,h,i : the number of unique people (X) using Google services on day d at hour h, observed repeatedly over multiple weeks i = 1, . . . , N .  A reasonable assumption might be that Xd,h,i  ~ Poisson(λd,h ).  In other words, each day/hour combination has its own average rate, and each week’s observation Xd,h,i  for that time slot is an independent sample from a Poisson with rate λd,h .

Under a model like this, Google would have to estimate 7 x 24 rate parameters for every hour of every day. But for now, let’s take a particular time period: say, d=Friday, and h = from 5 PM to 6 PM. Suppose you observed 30 different counts Xd,h,i  over 30 weeks for this time period. These counts were as follows:

12  18  15    8  17  13  22  13  13  13  12  11  15  15  12

8  20  12  14  11    9  15  16  20    9  15  13  19  18  14

Use the result of Part B to quote a 95% asymptotically normal confidence interval for λd,h . If you want to create a data frame in R that creates this data directly, you can copy/paste the following code block:

visit_data  =  tibble(counts  =  c(12,  18,  15,  8,  17,  13,  22,  13,

13,  13,  12,  11,  15,  15,  12,8,  20,  12,  14,

11,  9,  15,  16,  20,  9,  15,  13,  19,  18,  14))

(5 points)

Part  D.  Compare your interval from Part C to the 95% confidence interval for  λ that you get from bootstrapping the data.  (5 points)

Note: this is a pretty simple model for demand at a business, since it ignores all sorts of stuff like seasonal variation, whether the Formula 1 race is happening that weekend, etc. But it’s a decent starting point.