Homework Database - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Homework Database

Description:

Use a beta distribution for this prior. A random sample of 1000 californians is taken, 65% support the death penalty. ... Hint: use the quantile() function) Problem 32 ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 20
Provided by: astorS
Category:

less

Transcript and Presenter's Notes

Title: Homework Database


1
Homework Database
  • Please show as many steps as possible so you can
    get partial points even if you dont get the
    final answer.

2
Homework 1
  • Suppose your prior distribution for the
    proportion of Californians who support the death
    penalty has mean 0.6 and standard deviation 0.3.
    Use a beta distribution for this prior. A random
    sample of 1000 californians is taken, 65 support
    the death penalty. Plot the prior and posterior
    on the same plot. (3pts) (Gelman book 2.9).

3
Homework 2
  • Gelman book Exercise 2.1. ? is the probability
    that a coin will yield a head. Suppose the
    prior distribution on ? is Beta(4,4). The coin is
    spun 10 times, heads appeared fewer than 3
    times. Calculate your exact posterior density.
    Using a graphic software, plot prior and
    posterior of ? on the same graph.(3pts)

4
Homework 3
  • Gelman book Exercise 2.2 (Predictive
    distributions) Two coins C1 and C2.
    Pr(headsC1)0.6, Pr(headsC2)0.4. Now choose
    one coin randomly and spin it repeatedly. The
    first two spins are tails, what is the
    expectation of the number of additional spins
    until a head shows up? (3pts)
  • If you knew which coin was chosen, the two spins
    are independent of each other. Show that not
    knowing which one, the two spins are not
    independent(1pt).

5
Homework 4
  • We observed y female births out of a total of n
    births. Prove that the posterior predictive
    probability of the next two births are not
    independent, i.e. the posterior predictive
    probability of the next two births are both
    female is not equal to the posterior predictive
    probability of the next birth being female
    -squared. (2pts)

6
Homework 5
  • Find the conjugate prior for Poisson
    distribution.(2pts)

7
Homework 6
  • Gelman book 2.10 a) 2pts

8
Homework 7-10
  • Gelman book 2.21 (a,b,c,d) 1pt each

9
Homework 11
  • A random sample of n students is drawn from a
    large population. Their average weight is 150
    pounds. Assume that the weight in the population
    are normally distributed with mean \theta and
    standard deviation 20. Suppose your prior for
    \theta is normal with mean 180 and standard
    deviation 40.
  • give your posterior distribution for \theta (as a
    function of n) --2pts
  • b) If n10, give 95 posterior interval for
    \theta.1pt
  • c) Using a graphic software, plot the prior, the
    likelihood (as a function of \theta) and
    posterior in the same plot1pt. Observe the
    relationship of the 3.
  • (Not required!) Re-Do b) c) with n100
  • (Gelman book 2nd Ed. Ex 2.8)

10
Homework 12
  • Assume a non-informative improper prior on the
    standard deviation s of a normal distribution is
  • Prove that the corresponding prior density for s2
    is
  • 2pts (Gelman 2.19a)

11
Homework 13
  • Pre-post debate polling. ABC news polled 639
    voters before the 1988 presidential debate and
    different 639 voters after. Let a1 be the
    proportion who favored Bush before the debate,
    and a2 after. Choose a noninformative prior. Plot
    a histogram of a2-a1. What is the posterior
    probability of a shift towards Bush (i.e.
    a2-a1gt0)?

12
Problem 21
  • The length of a light bulb has an exponential
    distribution with unknown rate ?.
  • Show that Gamma distribution is conjugate for ?
    given an independent and identically distributed
    sample of light bulb lifetimes.(2pts)
  • Suppose your prior for ? is a gamma distribution
    with coefficient of variation 0.5 (that is
    sd/mean0.5) A random sample of light bulbs is to
    be tested to measure their lifetime. If the
    coefficient of variation is to be reduced to 0.1,
    how many light bulbs should be tested? (2pts)
    Gelman book 2.21 a) c)

13
Problem 22
  • The football point spread problem, download the
    data from course homepage.
  • a)Using a noninformative prior on s2,determine
    the posterior distribution for s2 (2pts)
  • b)Suppose that we have prior belief we are 95
    sure that s falls between 3 and 20 points. Find
    an approximate conjugate prior that corresponds
    to this belief (can do this by trial and error on
    the computer) 2pts
  • Gelman 2.23.

14
Problem 23
  • Assume that the number of fatal accidents in each
    year are Poisson distributed with a constant
    unknown rate ? and an exposure proportional to
    the passenger miles flown that year(see table on
    next page). Set a prior distribution for ? and
    determine the posterior distribution based on the
    data. (4pts) Gelman 2.13. Table 2.2

15
(No Transcript)
16
Problem 31
  • Gelman 3.3 An experiment was performed on the
    effects of magnetic fields on the flow of calcium
    out of chicken brains. Measurements on an
    unexposed group of 32 chickens had a sample mean
    of 1.013 and sample standard deviation of 0.24.
    Measurements on exposed group of 36 chickens had
    sample mean of 1.173 and sample sd of 0.20.
  • A) assuming that the measurements in the control
    (unexposed) group were from a normal distribution
    with mean µC and standard deviation sC, what is
    the posterior distribution of µC? Similarly, what
    is the posterior distribution of the treatment
    group µt? Assume a uniform prior on
    (µc,µt,logsc,logst) (1 pt for writing down the
    joint prior for (µc,µt,sc2,st2), 2 pt for
    deriving the posterior of µc, 1 pt for µt)
  • Whats the posterior distribution of µt-µc? You
    can obtain independent posterior samples of µt
    and µc then plot the histogram of the difference.
    (2pts) Obtain an approximate 95 posterior
    interval for µt-µc (1pts. Hint use the
    quantile() function)

17
Problem 32
  • Knowing the posterior of s2 is IG((n-1)/2,
    (n-1)S2/2 ) S2(Sum of squares)/(n-1)
  • Show that (n-1) S2/ s2 is a chi-square with n-1
    degrees of freedom
  • (2pts. Hint InverseChisquare is a different
    parameter form of InverseGamma. The inverse of an
    inverseChi-square is a Chi-square)

18
Problem 41
  • Gelman book 2nd Ed. 5.9 a) 3pts. b) 1pt c) 1pt.
    Hint choice of noninformative priors are on
    pages 134 and 136.

19
Problem 42
  • 5.13. Formulate the full model, clarify what each
    parameter corresponds to (2pts)
  • a) 2pt
  • c) 2pts
  • Describe what each graph is and the corresponding
    algebra and code, if any.
Write a Comment
User Comments (0)
About PowerShow.com