1
April 5, 2017 - Statistics Lecture Notes
Copyright Miles Chen, PhD
Please do not post or distribute without permission
2
April 5, 2017 - Statistics Lecture Notes
Copyright Miles Chen, PhD
Please do
STATS 102C HW2 due next Tuesday in class
Problem 1: Polar method. Let (X, Y ) N(0, 1) independently. Let X = R cos and Y = R sin .
(1) Find the joint distribution of R and .
(2) Based on (1), write R
STATS 102C HW1 due next Thursday in class
Notes: (1) Please turn in the printed code and outputs. (2) Please write your own code. Do not
copy from others. (3) For this homework, please do not call any
STATS 102C HW3 due Thursday in class
R
Problem 1: Let X f (x). Let I = h(x)f (x)dx = Ef [h(X)]. Suppose we draw iid copies X1 ,
., Xn from g(x), which is different from f (x). Define W (x) = f (x)/g(x
Solutions 2
Levon Demirdjian
Tuesday, April 26, 2016
Problem 1:
1) This is a different approach to the problem than the one in your class notes. The polar method generates
iid
two copies of independen
STATS 102C HW5 due Thursday in class
Problem 1: Consider a joint distribution p(x, y), where both x and y take values in a finite set,
P
so P (X = x, Y = y) = p(x, y). Let pX (x) = P (X = x) = y p(x,
Solutions 1
Levon Demirdjian
Friday, April 15, 2016
Problem 1
a <- 7^5
b <- 0
m <- 2^31-1
# Linear congruential method
my_uniform <- function(size, seed)cfw_
x <- rep(0, size)
x[1] <- seed
for(i in 1:
HW3
Zahra Razaee
Sunday, May 15, 2016
Problem 1
(1)
Z
Eg [h(X)W (X)] =
h(x)w(x)g(x)dx
Z
h(x)
=
f (x)
g(x)dx
g(x)
Z
h(x)f (x)dx = Ef [h(X)]
=
(2)
Z
Eg [W (X)] =
Z
w(x)g(x)dx =
f (x)
g(x)dx =
g(x)
Z
f (
STATS102C Lecture Notes
Ying Nian Wu
April 20, 2016
Contents
1
Introduction
Monte Carlo: European Las Vegas
S. Ulam: complained about his uncle going to Monte Carlo
N. Metropolis (colleague): named sa
STATS 102C HW4 due Thursday in class
Problem 1: For a Markov chain on a finite state space, let K(x, y) = P (Xt+1 = y|Xt = x) be
the transition probability, and let p(t) (x) = P (Xt = x) be the margin
arXiv:1001.2906v1 [stat.ME] 17 Jan 2010
Christian Robert
Universit Paris-Dauphine
e
and
George Casella
University of Florida
Introducing Monte Carlo Methods with R
Solutions to Odd-Numbered Exercises
1
April 4, 2017 - Statistics Lecture Notes
Copyright Miles Chen, PhD
Please do not post or distribute without permission
2
April 4, 2017 - Statistics Lecture Notes
Copyright Miles Chen, PhD
Please do
Stat 102C HW3: Answer Key
Muzhou Liang, Jonathan Arfa
May 21, 2014
Problem 1
> SAW = function(n = 5)cfw_
+
#create a map, every cell is FALSE because it's unexplored
+
map = matrix(FALSE, nrow = 2*n+1
Statistics 102C
Homework 3 Solutions
Ryan Rosario
1. Recognize the distributions of the following unnormalized densities and find their normalizing
constants.
There are two ways we can find the normal
Statistics 102C
Homework 5 Solutions
Ryan Rosario
1. For each of the following joint densities, recognize the conditional distribution Xi |X[i] for
all i.
(a) (x1 , x2 ) xx2 1 +1 e(+1)x2 /x1 !, for x1
Statistics 102C
Homework 1 Solutions
Ryan Rosario
R1
1. Generate 100 i.i.d. random varaibles from Unif(0, 1) to estimate the integral I = 0 x2 dx.
Calculate the absolute difference between your estima
Statistics 102C
Homework 2 Solutions
Ryan Rosario
1. Let f (x) and g(x) be the target and trial distriobutions, respectively in the rejection sampling.
Find the optimal constant M that maximizes the a
Statistics 102C
Homework 4 Solutions
Ryan Rosario
1. Two urns A and B contain a total of N balls. Assume that at time t there were exactly k
balls in A. At time t + 1 an urn is selected at random in p
STATS 102C: Monte Carlo Methods
TR 2pm-3:15pm, MS 5200
Instructor: Ying Nian Wu ([email protected])
Office: 8971 Math Sciences Bldg, office hours: TR 3:30-4:30pm
Topics
Random number generation
Monte
102c Hw 1
Kimberly Alcorn
April 13, 2015
1. Exercises in the book: 2.2, 2.3, 2.5, 2.16, 3.1, 3.3
Exercise 2.2: a) u = F (x)
N<-10000
inv_logis<-function(u,beta=1,mu=0)cfw_return(-beta*log(1/u)-1)+mu)
Stat 102C - Practice Final Solutions
Levon Demirdjian
May 28, 2016
Problem 1
1) FX (t) =
Rt
0
5x4 dx = t5 .
1
2) FX
(u) = u1/5 .
1/5
3) Set Xi = Ui
, i = 1, ., n. Then Xi will follow our desired distr