ECON503
Fall 2016
Homework #2
Solutions
Topics covered
Probability theory:
Conditional probability and Bayes rule
Total probability theorem
PROBLEMS 1 AND 2 ARE OPTIONAL:
These are easy problems with a straightforward application of Bayes rule. You may
ECON 503
Lecture Notes 6
Neslihan Uler
1
Binomial Probability Distribution
Definition
A binomial experiment possesses the following properties:
1. The experiment consists of a fixed number, n, of identical trials
2. Each trial results in one of two outcom
ECON 503
Lecture Notes 4
Neslihan Uler
1
Counting
If a job consists of k separate tasks, the i th of which can be done in
ways, i=1, ,k, then the entire job can be done in n1 n2 nk
ways.
Theorem
Example
A balanced coin is tossed six times. What is the to
ECON 503
Lecture Notes 3
Neslihan Uler
1
Conditional probability
Definition
The conditional probability of an event A, given that an event B has
occurred is equal to P( A | B) = P( A B)
P( B)
Provided P( B) > 0
2
Conditional probability
Exercise
Suppose a
ECON 503
Lecture Notes 5
Neslihan Uler
1
Discrete Random Variables
Definition
Given a random experiment with an outcome space S, a function Y that
assigns one and only one real number Y(s) = y to each element s in S is
called a random variable.
Definition
ECON 503:
Probability and Mathematical
Statistics
Lecture Notes 1
Neslihan Uler
1
Lecture 1
Introduction
Statistics deals with the collection and analysis of data
Descriptive
statistics
Uses numerical or graphical
methods to summarize the data
set and pro
ECON 503
Lecture Notes 7
Neslihan Uler
1
Continuous Random variables
Definition
A random variable that can take on any value in an interval is called
continuous.
Continuous sample space:
Contains an uncountably infinite number of outcomes
It is not poss
ECON 503
Lecture Notes 10
Neslihan Uler
1
Independence
Definition
Two random variables X and Y are said to be independent if for every
interval A and every interval B,
P( X A, Y B) = P( X A) P(Y B)
2
Independence
Theorem
The random variables X and Y are i
ECON 503
Lecture Notes 11
Neslihan Uler
1
Mean and Variance for functions of random variables
Theorem
Suppose X and Y are discrete random variables, with joint pdf pX,Y(x,y)
and let g(X,Y) be a function of X and Y. Then, the expected value of
the random v
ECON 503
Lecture Notes 9
Neslihan Uler
1
Marginal pdfs for continuous random variables
Theorem
Suppose X and Y are jointly continuous with joint pdf f X ,Y ( x, y )
Then the marginal pdfs, f X (x) and fY ( y ) , are given by
f X ( x) =
f
X ,Y
( x, y )dy a
ECON 503
Lecture Notes 13
Neslihan Uler
1
Poisson Limit
= =
(1 ) , = 0,1,2, ,
Theorem: Suppose X is a binomial random variable, where
If and 0 in such a way that = remains constant, then
()
lim
( = ) =
,0,
!
Note: Even though this is an asymptotic r
ECON 503
Lecture Notes 18
Neslihan Uler
1
Properties of Estimators
Unbiasedness
Efficiency
Sufficiency (not included in the exam)
Consistency
2
Unbiasedness
Definition
Suppose that Y1, Y2, . , Yn is a random sample from continuous pdf
fY(y;), where is an
ECON 503
Lecture Notes 2
Neslihan Uler
1
Probability
Lecture 2
P(A) : Probability of event A
P : Probability function
Definition
Suppose S is a sample space associated with an experiment. To every
event A defined over S, we assign a number, P(A), called t
Homework 2
2.6.14
2.6.23
2.6.36
2.6.57
2.7.20
3.3.3
3.5.22
Let Y be a discrete random variable with mean and standard deviation . If a and b are constants,
prove that V(aY+b) = a2 2.
Bonus Question:
Use 503class.dta and Stata program to do the following e
ECON 503
Lecture Notes 8
Neslihan Uler
1
A Second Measure of Central Tendency
An alternative measure of central tendency is known as the median
which divides the pdf into two equal areas.
2
Definition
If Y is a discrete random variable, its median, m, is
ECON 503
Lecture Notes 12
Neslihan Uler
1
Conditional Densities: discrete case
Definition
Let X and Y be discrete random variables. The conditional
probability density function of Y given X (probability that Y takes on
the value y given X = x) is denoted
ECON 503
Lecture Notes 14
Neslihan Uler
1
Normal Distribution
Definition
A random variable X has a normal distribution if its pdf is defined by
f ( x) =
1
e
2
( x )2
2 2
< x <
NOTE:
- f(x)>0
( x )2
1
2
e 2 dx = 1
2 2 2
t
- M (t ) = e
- E(X)=
- V(X)=
ECON 503
Lecture Notes 15
Neslihan Uler
1
Sample Mean and Sample Variance
Definition
Let W1, W2, . , Wn be a sequence of independent random variables,
each with the same distribution (so they constitute a random sample).
The sample mean is given by
=1
ECON 503
Lecture Notes 16
Neslihan Uler
1
Estimation
We take a random sample of n observations and use those
measurements to estimate the unknown parameters, such as in
Poisson, p in Binomial, and in normal distribution
Definition
Any function of a random
ECON 503
Lecture Notes 20
Neslihan Uler
1
Type I and Type II errors
Type I error: Rejecting H0 when H0 is true
Type II error: Fail to reject H0 when H0 is false
Remember that the probability of committing a Type I error is referred to
as a tests level of
ECON 503
Lecture Notes 17
Neslihan Uler
1
Confidence Intervals for Proportions (The Binomial Parameter, p)
Let X be a binomial random variable defined on n independent trials
for which p=P(success).
X np
np (1 p )
X /n p
p (1 p )
n
~
N (0,1)
~
for large n
ECON 503
Lecture Notes 22
Neslihan Uler
1
Drawing Inferences about 2
S
1
(Yi Y ) 2 is an unbiased estimator for 2
n 1
2
Theorem
(n 1) S 2
=
2
1
2
(Yi Y ) 2 has a chi-square distribution with n-1
degrees of freedom.
2
Motivation
3
Theorem (a)
A 100(1-)% co
ECON 503
Lecture Notes 21
Neslihan Uler
1
Student t distribution
Suppose 1 , 2 , , is a random sample from a normal distribution with mean
and standard deviation .
If the true variance is known, then Z =
/
has a normal distribution.
We can use the unb
Econ 503
Homework 3
3.2.8
3.2.15
3.2.28
3.3.14
3.5.6
3.5.36
3.6.1 (solve this question by using the definition of variancedo not use the formula for this question.)
3.4.6
Bonus question: Use Stata to do the following problems. Submit a log-file with your
ECON 503
Lecture Notes 23
Neslihan Uler
1
Statistical Inference About Means with Two Populations
Suppose the data consist of two independent random samples:
X 1 , X 2 , , X n and Y1 , Y2 , , Ym . Two populations are normally distributed.
H0 : X = Y
2
2
Discussion, ECON 503
Gail Lucasan
October 30, 2015
Exponential distribution
We say that a random variable X has an exponential distribution if its p.d.f. is of the
form
f (x) = ex , x 0
where > 0 is constant. Exponential random variables have the property
Discussion Answers, ECON 503
Gail Lucasan
October 30, 2015
1. Note that X follows the standard form of an exponential random variable with = 7.
Hence E(X) = 1/7 and V (X) = 1/49.
2. We solve for the marginal p.d.f.s using the usual methods:
fX (x) =
2 e(x
*Stata code for Week 6
set obs 5000
gen x = rnormal(10.5,2)
gen z = (x-10.5)/2
hist x, normal name(histx)
hist z, normal name(histz)
graph combine histx histz
clear all
set obs 5000
foreach n of numlist 1 2 5 10 50 100 1000cfw_
gen x`n'= rbinomial(`n',0.1
Discussion, ECON 503
Gail Lucasan
November 6, 2015
Review of standard distributions
Distribution
X Binomial(n,p)
p (0, 1)
p.d.f.
p(x) = n px (1 p)1x , x cfw_0, 1, 2, .
x
E[X] = np, V (X) = np(1 p)
X Poisson()
p(x) =
>0
X Uniform(a,b)
a<b
X N (, 2 )
>0
X E
1
Midterm Exam
In order to get credit you should show all your work.Good luck!
1. (12 points) A test indicates the presence of a particular disease 90% of
the time when the disease is present and the presence of the disease 2%
of the time when the disease
1
Midterm Exam
In order to get credit you should show all your work.Good luck!
1. (15 points) Suppose that a randomly selected group of k people are brought
together. What is the probability that exactly one pair has the same
birthday?
2. (14 points) A gr