Vous êtes sur la page 1sur 3

Problem Set 10

36-217, S17

This homework is due Friday, April 28, at 11 AM. Failure to submit a correctly for-
matted assignment will result in partial credit for the assignment. For a full description of
submission requirements, as well as a discussion of what constitutes cheating, please see the
Syllabus on Blackboard.

Problem 1
Suppose that you are flipping a Mystery Coin! You flip the coin n times and it comes up
heads k times. Well let Q be the random variable that describes the probability that the
Mystery Coin! comes up heads on a single toss. Were going to apply Bayesian inference to
the PDF for q, the probability that the Mystery Coin! comes up heads.
a. Identify the likelihood pX|Q (k | Q = q), the probability of getting k heads in n flips,
assuming that Q takes the value q.
b. Assume a uniform prior on Q:

fQ (q) = 1, 0 q 1 .

Compute the evidence, pX (k). You may use the following result without proof:
Z 1
a!b!
xa (1 x)b dx =
0 (a + b + 1)!
Explain why the result you find makes sense, given the uniform prior.
c. Compute the posterior PDF for Q, fQ|X (q | k).
d. Compute the expected value for Q. How does it correspond to the more straightforward
estimate k/n? How has our prior affected the posterior? How does the impact of our
prior change as we increase n?

Problem 2
You are conducting an experiment to measure the ambient phlogiston density, . Your
experiment yields a new measurement, measured = 0.42. You believe that your measured
value is a combination of the true value of the ambient phlogiston density and noise,

measured = true +  ,

where  is a normally distributed random variable with E [] = 0 and var [] = 0.009.
Previous studies of the ambient phlogiston density suggest that true = 0.4, though there
is experimental uncertainty in that quantity. To reflect that uncertainty, many researchers
think of true as being normally distributed with mean 0.4 and variance 0.0016. You would
like to use Bayesian inference to update this distribution for true , based on your measured .

1
a. Use the information from previous studies to write down a prior distribution for true .
b. Write out the likelihood for your measurement, given a value of true .
c. Compute the posterior distribution for true . What is the variance of this distribution?
Is it greater than or less than the variance of the prior distribution? You can assume
that the evidence and the posterior are both normal distributions.

Problem 3
a. First, compute the moment generating function for a normal distribution with mean
and variance 2 . Show your work.
Hint: Complete the square!
b. Now, starting from the MGF, show that for a standard normal distribution ( = 0,
2 = 1) the skewness is 0 and the kurtosis is 3. Use the following definitions for
skewness and kurtosis:
" 3 #
X
Skewness [X] = E ,

" 4 #
X
Kurtosis [X] = E .

Problem 4
Recall that the Gamma PDF takes the following form:
1 x
fX (x) = x e ,x>0
()
with > 0, > 0, and Z
() = x1 ex dx .
0
a. Show that the MGF for the gamma distribution is:
 
t
MX (t) = 1 ,t < .

Be sure to derive the functional form and explain why the MGF is undefined for t .
b. Suppose that X follows a gamma distribution with parameters x and , that Y also
follows a gamma distribution with parameters y and , and that X is independent
of Y . Use your result from (a) to show that X + Y also follows a gamma distribution,
but with parameters x + y and .
c. Suppose that X1 , X2 , X3 , . . . , Xn are all exponential random variables with parameter ,
and that Xi is independent of Xj (i 6= j). Find the distribution for:
n
X
Z= Xi .
i=1

2
Problem 5
Suppose that X follows a normal distribution with parameters and 2 . Consider the new
random variable
(X )2
Y = .
2
a. Show that the CDF for Y is

Z + y
FY (y) =
fX (x) dx
y

b. Find the PDF for Y . This is a 2 -distribution with one degree of freedom. It is a special
case of another canonical distribution. Identify that distribution and specify which
parameter valuesyield the 2 -distribution with one degree of freedom.
Hint: (1/2) =

c. Now suppose that X1 , X2 , X3 , . . . , Xn all follow a normal distribution with parameters


and 2 , and that Xi is independent of Xj (i 6= j). Find the PDF for
n
X (Xi )2
Z= .
i=1
2

We say that Z follows a 2 -distribution with n degrees of freedom.