STAT 319/739 Bayesian statistics
Homework 4
Solution
Saad Mneimneh
Computer Science
Hunter College of CUNY
Problem 0: Readings
Read note 6 on the course web page.
Problem 1: Normal obervations
Suppose that you are given 12 observations from a normal distr
STAT 319/739 Introduction to Bayesian statistics
Homework 2
Solution
Saad Mneimneh
Computer Science
Hunter College of CUNY
Problem 0: Readings
Read notes 2 and 3 from the course web site.
Problem 1: Plain old Monty Hall
(a) Make sure you understand why it
STAT 319/739 Bayesian statistics
Homework 5
Solution
Saad Mneimneh
Computer Science
Hunter College of CUNY
Problem 0: Readings
Read notes 6 and 9 on the course web page.
Problem 1: Dirac delta function
Let X be uniform in [0, 1] and Y = 2X . It is easy to
Bayes and conjugate forms
Saad Mneimneh
1
Conjugate forms
Recall that
f (y |x) =
f (x|y )f (y )
f (x)
and since f (x) is not a function of y , we can write:
f (y |x) f (x|y )f (y )
In expressing f (y |x) as above, we can ignore any multiplicative constant
STAT 319/739 Introduction to Bayesian statistics
Homework 1
Solution
Saad Mneimneh
Computer Science
Hunter College of CUNY
Problem 0: Readings
Read notes 1 and 2 from the course web site.
Problem 1: Independence can be tricky!
Consider ipping a fair coin
STAT 319/739 Introduction to Bayesian statistics
Homework 3
Solution
Saad Mneimneh
Computer Science
Hunter College of CUNY
Problem 0: Readings
Read notes 4 and 5 from the course web site.
Problem 1: Poisson approximation
Assume that the production of item
The beta density, Bayes, Laplace, and Plya
o
Saad Mneimneh
1
The beta density as a conjugate form
Suppose that k is a binomial random variable with index n and parameter p,
i.e.
P (k|p) =
n
k
pk (1 p)nk
Applying Bayess rule, we have:
f (p|k) pk (1 p)nk f
STAT 319/739 Bayesian statistics
Homework 6
Due 11/7/2013
Saad Mneimneh
Computer Science
Hunter College of CUNY
Problem 0: Readings
Read notes 7 and 8 on the course web page.
Problem 1: Chi-squared test
In this problem, assume a typical one-tailed P-value
Even more on Bayes and conjugate forms
Saad Mneimneh
1
A story about brewing
When we have no a priori knowledge of the variance 2 , we have seen that
s2 =
S
=
n1
n
i=1 (xi
x)2
n1
has an expected value equal to 2 . s2 , so calculated, is a perfectly good
More on Bayes and conjugate forms
Saad Mneimneh
1
A cool function, (x) (Gamma)
The Gamma function is dened as follows:
tx1 et dt
(x) =
0
For x > 1, if we integrate by parts ( udv = uv
v du), we have:
(x) = tx1 et |
0
(x 1)tx2 et dt
0
= 0 + (x 1)
tx2 et
Approximations and more PMFs and PDFs
Saad Mneimneh
1
Approximation of binomial with Poisson
Consider the binomial distribution
n
k
b(k, n, p) =
pk (1 p)nk ,
0kn
Assume that n is large, and p is small, but np at the limit. For a xed
:
b(0, n, p) =
n
0
p0
Random variables (continuous)
Saad Mneimneh
1
Dening probability density
A random variable X is a continuous random variable if its domain, i.e. the set
of values x that X can take, is continuous. In this case, and analogous to the
discrete case, we dene
Random variables (discrete)
Saad Mneimneh
1
Introducing random variables
A random variable is a mapping from the sample space to the real line. We
usually denote the random variable by X , and a value that it can take by x.
Example 1: Rolling a die
The sa
More on conditioning and Mr. Bayes
Saad Mneimneh
1
Multiplication rule for conditioning
We can generalize the formula P (A, B ) = P (A|B )P (B ) to more than two events.
For instance, P (A, B, C ) = P (A)P (B |A)P (C |A, B ). In general,
P (A1 , A2 , . .
Introduction to probability, probability axioms
Saad Mneimneh
1
Introduction and probability axioms
If we make an observation about the world, or carry out an experiment, the
outcome will always depend on chance to a varying degree. Think of the weather,
STAT 319/739 Bayesian statistics
Homework 7
Solution
Saad Mneimneh
Computer Science
Hunter College of CUNY
Problem 0: Readings
Read notes 10 and 11 on the course web page.
Problem 1: Balls and bins
We have three white balls and three black balls in two bi