Economics 520
Lecture Note 1: Elementary Probability Theory and Combinatorics (minor corrections 8/18/12)1
You should already be familiar with basic set-theoretic notation and operations, such as unions,
intersections, complements, empty set.
Denition 1 T
Economics 520: Introduction to R, Part 2
and HW3
Keisuke Hirano
1 Vectors
In R, a variable can hold a vector of values. An easy way to construct a vector is the c command,
which combines or concatenates numbers into a vector:
> x <- c(1,3,5,10)
This denes
Economics 520: Introduction to R, Part 1
and Problem Set 1
Keisuke Hirano
1 Installing R
The main web page for the R system is http:/www.r-project.org. From the main R page, you can
download a copy of R by clicking on CRAN (Comprehensive R Archive Network
Economics 520
Lecture Note 8: Multivariate Normal Distribution
Mean Vector and Variance Matrix Suppose we have a K -dimensional random vector
Y1
.
Y = . .
.
YK
We can dene its mean vector as
E [Y 1 ]
.
,
.
E [Y ] =
.
E [Y K ]
and we can dene its joint va
Economics 520
Lecture Note 7: Joint Distributions, Conditional Distributions, and Independence of Random
Variables (CB 4.1-4.2, 4.6)
Denition 1 A N dimensional random vector is a function from the sample space to RN .
Thus a random vector can be thought o
Economics 520
Lecture Note 6: Special Distributions continued (CB 3.3-3.4)
1. Gamma Distribution The Gamma distribution with parameters > 0 and > 0 is
x
x 1 e
f X (x ) =
,
()
for x > 0 and 0 elsewhere. Recall that the gamma function is dened as
() =
t 1
Economics 520
Lecture Note 5: Special Distributions (CB 3.1-3.3)
Let us look at a number of distributions that are of special importance. Often these are families or parametric
of distributions, where the PDF or PMF depends on a parameter or parameters th
Economics 520
Lecture Note 4: Expectations (CB 2.22.3)
The concept of expectation is central to probability theory and statistics. Intuitively, the expectation of a random variable is the long run average obtained by repeatedly and independently
performin
Economics 520
Lecture Note 3: Random Variables (CB 1.41.6, 2.1)
Often it is convenient to work with numbers rather than events. To do this we use random variables:
Denition 1 A random variable is a function from the sample space to the real numbers.
RV=ra
Economics 520
Lecture Note 2: Conditional Probability and Independence (CB 1.3)
A fundamental topic of probability theory is how to update or modify probabilities to reect the
arrival of new information. This plays a major role in certain parts of statist
Economics 520: Introduction to R, Part 3
Keisuke Hirano
1 Random sampling with R
R has extensive facilities for working with random numbers and probability distributions. The
sample command draws samples from a given vector of possible outcomes, with or w