homework2_dataset
Year | Apples | Grapes | Oranges | GF | Bananas | ApPr | BaPr | GrPr | GfPr | OrPr | DisI | CPI | |||||||||||||||||||||||
1 | 19. | 6 | 7 | 8 | 1 | 2.4 | 4.4 | 24.4 | 0.72 | 0.46 | 1. | 26 | 0.6 | 0.5 | 17234 | 1 | 30.7 | ||||||||||||||||||
1991 | 18.1 | 7.3 | 8.4 | 5.9 | 25 | 0.8 | 0.48 | 1.4 | 0.62 | 0.78 | 17688 | 13 | 6.2 | ||||||||||||||||||||||
1992 | 1 | 9.1 | 7.1 | 1 | 2.8 | 27.1 | 1.29 | 0.61 | 18683 | 140.3 | |||||||||||||||||||||||||
1993 | 1 | 4.1 | 26.6 | 0.83 | 0.44 | 1.46 | 0.53 | 0.55 | 192 | 10 | 144.5 | ||||||||||||||||||||||||
1994 | 19.4 | 12.9 | 6.1 | 2 | 7.8 | 1.51 | 0.51 | 19905 | 14 | 8.2 | |||||||||||||||||||||||||
1995 | 18.7 | 7.5 | 11.8 | 0.49 | 1.55 | 20753 | 152.4 | ||||||||||||||||||||||||||||
1996 | 6.7 | 1 | 2.6 | 5.8 | 2 | 7.6 | 0.9 | 1.69 | 2 | 16 | 156.9 | ||||||||||||||||||||||||
1997 | 13.9 | 2 | 7.2 | 0.91 | 1.71 | 0.56 | 22 | 160.5 | |||||||||||||||||||||||||||
1998 | 1 | 4.6 | 28 | 0.94 | 1.59 | 23759 | 163 | ||||||||||||||||||||||||||||
1999 | 1 | 8.5 | 1.84 | 0.65 | 0.84 | 24616 | 166.6 | ||||||||||||||||||||||||||||
2000 | 17.5 | 7.4 | 11.7 | 5.1 | 28.4 | 0.92 | 1.75 | 0.63 | 26205 | 172.2 | |||||||||||||||||||||||||
2001 | 15.6 | 1 | 1.9 | 4.8 | 0.87 | 1.85 | 27179 | 177 | |||||||||||||||||||||||||||
2002 | 26.8 | 0.95 | 1.89 | 28126 | 17 | 9.9 | |||||||||||||||||||||||||||||
2003 | 16.9 | 7.7 | 26.2 | 0.98 | 29200 | 184 | |||||||||||||||||||||||||||||
2004 | 18.8 | 10.8 | 25.8 | 1.04 | 2.06 | 0.82 | 0.86 | 30699 | 188.9 | ||||||||||||||||||||||||||
2005 | 16.7 | 8.6 | 11.4 | 25.2 | 2.08 | 1.09 | 31762 | 195.3 | |||||||||||||||||||||||||||
2006 | 17.7 | 10.2 | 2.3 | 25.1 | 1.07 | 2.25 | 1.1 | 33591 | 201.6 | ||||||||||||||||||||||||||
2007 | 16.4 | 1.12 | 2.09 | 0.96 | 1.28 | 34828 | 207.3 | ||||||||||||||||||||||||||||
2008 | 15.9 | 3.2 | 1.32 | 2.21 | 0.97 | 36105 | 2 | 15.3 | |||||||||||||||||||||||||||
2009 | 16.3 | 7.9 | 1.18 | 2.11 | 1.05 | 35618 | 214.6 | ||||||||||||||||||||||||||||
2010 | 9.7 | 25.6 | 1.22 | 0.58 | 2.18 | 0.93 | 1.06 | 36273 | 218.1 | ||||||||||||||||||||||||||
2011 | 15.4 | 2.7 | 25.5 | 1.35 | 2.39 | 37803 | 224.9 | ||||||||||||||||||||||||||||
2012 | 25.4 | 1.38 | 2.49 | 1.08 | 39438 | 229.6 |
EC 469/569: Introduction to Econometrics
Problem Set
2
Due: Monday, February 5
Part I
Problem
1
1. You have been hired to analyze the grade point averages (GPAs) of students in Dr. Normal’s
introductory econometrics class. The following data lists the GPAs of the students in Dr. Normal’s
class (where GPA values have been rounded to the nearest whole number for simplicity): 4, 1, 3,
4, 1, 2, 4, 2, 1, 4, 3, 1, 4, 2. Sketch a graph of the (discrete) probability distribution that describes
this data. Be sure to clearly label the axes of your graph and show all appropriate numerical values.
2. Find E(X), Var(x) and E(x2) of the random variables below. Compute them using pdf where
possible, and then show that V ar(g(x)) = E(x2) − E2(x) holds. Show your work.
(a.) Discrete random variable X with f(X) = 1
n
, x = 1, 2, …, n, n > 0 an integer.
(b.) Continuous random variable X=2Y+1, where Y ∼ Uniform(0, 1) (f(y) = 1).
(c.) Continuous random variable X, with f(x) = 3
2
(x − 1)2, 0 < x < 2.
(d.) Continuous random variable X, with f(x) = axa−1, 0 < x < 1,a > 0.
3. A production plant produces tires. In a typical week, the number of tires produced is a normally
distributed random variable with an average production level of 174 tires (that is, a mean of 174
)
and a standard deviation of 9 tires.
(a.) What is the probability that (or, on how many occasions will) more than 190 tires will be
produced by this production plant in any given week?
(b.) What is the probability that the plant will produce between 160 and 180 tires in any given
week?
(c.) The manager of the tire plant wants to tell his customers with a 95% probability that produc-
tion levels will fall within some range, say from xlower to xupper. What should these values be?
4. Suppose you are investigating the properties of three random variables called ”A”, ”B”, and
”C”, and you discover the following information about them: A ∼ N(0, 1); B ∼ χ250(µb,σ
2
B);
C ∼ χ25(µC,σ
2
C ), where all observations on ”A” are independent, and, ”B” and ”C” are independent
of each other. Use this information to answer the following questions.
(a.) Suppose we create a new variable, ”D”, as:
D =
[
( C
5
)
( B
50
)
]
What type of distribution does ”D” have?
(b.) What are the degrees of freedom of ”D” in this example?
(c.) Suppose we create a new variable, ”E”, as:
E =
45∑
i=1
A2i
What type of distribution does ”E” have?
(d.) What are the degrees of freedom of ”E” in this example?
1
Part II
You are working for a major grocery chain such as Safeway as an economist and have been asked
to estimate the demand for fresh fruit so that the corporate office can determine their supply con-
tracts for the upcoming year. Your boss has no idea how to read output from statistical software
packages since she went to business school and didnt ever learn econometrics. Thus, she expects
you to conduct the analysis and put together a report for her that includes graphs, tables, etc. that
are readable and easily interpreted. It should represent some of your best work as you are due for
a promotion soon.
2.1. Find the data on D2L (homework3dataset.csv), which contains publicly available data for
fruit but which has been collated for you, but not organized in any way.
2.1.1. The data is annual prices and consumption of fresh fruits from 1990 to 2012.
a. Apples
b. Bananas
c. Grapes
d. Oranges
e. Grapefruit
The data on disposable income (DisI) and CPI are also provided.
(a.) Prepare your data: Download and organize the data in CSV format so that it is sorted
by year. Using the CPI values (with 1990 as the base year), generate real prices and real income
(e.g. gen realApPr = ApPr/CPI∗130.66). Create a trend variable that is equal to 1 in the year
of data 1990), Call this variable t.
Create a table of summary statistics including the Number of Observations, Mean, Standard De-
viation, Minimum, and Maximum for the all price, quantity and income variables. Discuss the
summary statistics.
(b.) Estimate a linear demand function for apples. That is, estimate:
QA = β0 + β1PA + β2PB + β4I + �
where QA is the quantity of fresh apples consumed in (#/capita). PA is the price of apples ($/lb)
in real terms. PB is the price of bananas in real terms ($/lb), and I is real per capita income ($),
and � is the regression error term.
(c.) Interpret β0, β1, and β2. Do the signs of β0, β1, and β2 match your expectation (based
on your knowledge of microeconomic theory)? Explain.
(d.) Now add the linear time trend t to the regression equation and run the model again. Create
a table of your output and display it in your write-up. Do any results change substantially? Why
might adding a time trend to a time-series regression like this be a good idea?
(e.) Can you think of another fruit price (available in the dataset) that can affect the demand
for apples? Reestimate your model in (d.) adding the new variable. Interpret your results.
(f.) Interpret the R2 for the model. Does a high R2 mean it is a good model? Explain.
2