Statistics 320
Assignment 1
Due: 2pm, March 26.
1 You are invited on TV to play the Monty Hall game! However, an
earthquake strikes immediately after you selected a door and before
the host had a chan
Statistics 320
Assignment 2
Due: 4pm, April 5, 2012
1 Consider the mixed congruential generator
xi+1 = 32xi + 2
mod 31
a What is the largest possible period this generator may have?
b Start with x0 =
Statistics 320
1
a
Assignment 3 Answers
Semester 1, 2012
i The following program was used for this simulation
# Question 1
#
# Part a i
#
# Simulation of the M/M/1 queue
#
# Set parameters for arrival
Statistics 320
1
Assignment 2 Answers
Semester 1, 2012
a 31.
b We have x0 = 16,
x1 = (32x0 +2) mod 31 = 514 mod 31 = (3116+18) mod 31 =
18
x2 = (32x1 +2) mod 31 = 578 mod 31 = (3118+20) mod 31 =
20
Th
Statistics 320
Assignment 4
Due: 4pm, May 31, 2012
Note: This is the compulsory computing
assignment
1 On Cecil under Programs you will nd programs for simulating an
M/M/1 queue and using batched mean
Statistics 320
Assignment 4 Answers
Semester 1, 2012
1 The program used for this question was
#
# Question 1
#
# Simulate an M/M/1 queue and use batched means to estimate
# mean queue length
#
# Arriv
STATS 320
Tutorial, Week 2
March 13, 2015
1 Let X and Y be discrete random variables taking values in cfw_1, 0, 1, 2
and cfw_2, 0, 2 respectively. Suppose that their joint probability function pXY (x,
STATS 320
Tutorial, Week 1
March 6, 2014
1 In an election, candidate A receives n votes while candidate B receives
just 1. What is the probability that A was always ahead in the vote
count assuming th
STATS 320
Tutorial, Week 4
March 27, 2014
1 Show that E(X Y |Y = k) = E(X|Y = k) k and Var(X Y |Y =
k) = Var(X|Y = k) (assuming X is a continuous random variable)
Using the denition of the expectation
STATS 320
Tutorial, Week 3
March 20, 2015
Consider a stochastic process cfw_Xt , t cfw_0, 1, 2, . . . with the one-step transition probabilities given below:
j = 0, i = 1
1
1
j = N, i = N 1
Pr(Xt+1 =
STATS 320
Tutorial, Week 3
March 20, 2015
Consider a stochastic process cfw_Xt , t cfw_0, 1, 2, . . . with the one-step transition probabilities given below:
j = 0, i = 1
1
1
j = N, i = N 1
Pr(Xt+1 =
STATS 320
Tutorial, Week 7
1 May 2015
1. Consider the following probabilities of being sunny, overcast and raining the next day given the weather of the present day:
Today
Sunny
Overcast
Raining
Sunny
STATS 320
Tutorial, Week 7
1 May 2015
1. Consider the following probabilities of being sunny, overcast and raining the next day given the weather of the present day:
Today
Sunny
Overcast
Raining
Sunny
Statistics 320
Assignment 2
Due: 2pm, 23 April 2015.
1 Show that
i = 2N
N
i
for all i in [0, N ], satises the equality = P, where P is the 1step transition probability matrix for the Erhenfest process
STATS 320
Assignment 3
Due: 2pm, Thu 7 May 2015
Question 1 in this assignment is about materials taught in the rst half of
the semester, and Questions 2 and 3 are about those taught in the second
half
Statistics 320
Assignment 1
Due: 2pm, March 28.
1. You are invited on TV to play the Monty Hall game! However, an
earthquake strikes immediately after you selected a door and before
the host had a cha
Statistics 320
Assignment 3
Due: 4pm, May 10, 2012
1 In this question you are required to simulate a single server queue.
There are basic programs to do this in both R and Matlab available
on Cecil un
Statistics 320
Assignment 1
Due: 4pm, March 22, 2012
1 Suppose X is a random variable with probability density function
f (x) =
c sin(x) for 0 < x < 1
0
otherwise
a Determine the value of c.
b Determi
STATS 320 Random Variables and Distributions
Department of Statistics
The University of Auckland
1
Outline
Random variables
A RV is a variable whose value is subject to variation due to
randomness.
A
STATS 320: Probabilities
Department of Statistics
The University of Auckland
1
Outline
1 Monty Hall problem
2 Set Theory
3 Probability
4 Conditional Probability, Independence & Bayes theorem
5 Exercis
STATS 320: Markov chains (introduction)
Department of Statistics
The University of Auckland
1
Outline
1 The Erhenfest model of diusion
Outline
1 The Erhenfest model of diusion
2 Markov chains
2
1 The
STATS 320 Markov chains (ctnd)
Department of Statistics
The University of Auckland
March 19, 2015
1
Stationary Markov chain
Denition
A (discrete-time) stochastic process cfw_Xt : t 0 is stationary if,
STATS 320 Random Variables and Distributions
Department of Statistics
The University of Auckland
1
Outline
1 Conditional expectation
2 More than one Random Variable: Joint Distributions
3 Dependence
4
STATS 320 More on stationarity
Department of Statistics
The University of Auckland
March 23, 2015
1
1 Return time to state i
2 The Erhenfest process
Stationary distribution so far
Assume a well-behave
STATS 320 Simulating Markov chains
Department of Statistics
The University of Auckland
March 25, 2015
1
Outline
1 Sampling from (.)
2 Simulating the Erhenfest process
2
Simulating a discrete-time Mark
STATS 320 Googles PageRank algorithm
Department of Statistics
The University of Auckland
April 20, 2015
1
Pre-history of internet search engines
Type in your query.
Search engine keeps an index of all
STATS 320 The Metropolis-Hastings algorithm
Department of Statistics
The University of Auckland
April 22, 2015
1
Introduction
Metropolis proposed a rst algorithm in 1953, generalized by
Hastings in 19
STATS 320 Population genetics
Department of Statistics
The University of Auckland
March 26, 2015
1
Denitions
The genome of an organism is its whole hereditary
information. It is encoded in the DNA.
A