Question
Sample survey: Suppose we are going to sample 100 individuals from a county (of size much larger than 100) and ask each sampled person whether
Sample survey: Suppose we are going to sample 100 individuals from
a county (of size much larger than 100) and ask each sampled person
whether they support policy Z or not. Let Yi = 1 if person i in the sample
supports the policy, and Yi = 0 otherwise.
a) Assume Y1, . . . , Y100 are, conditional on , i.i.d. binary random variables
with expectation . Write down the joint distribution of Pr(Y1 =
y1, . . . , Y100 = y100| ) in a compact form. Also write down the form of
Pr(
P
Yi = y| ).
b) For the moment, suppose you believed that 2 { 0. 0, 0. 1, . . . , 0. 9, 1. 0} .
Given that the results of the survey were
P100
i=1 Yi = 57, compute
Pr(
P
Yi = 57| ) for each of these 11 values of and plot these probabilities
as a function of .
c) Now suppose you originally had no prior information to believe one of
these -values over another, and so Pr( = 0. 0) = Pr( = 0. 1) = =
Pr( = 0. 9) = Pr( = 1. 0). Use Bayes rule to compute p (|
Pn
i=1 Yi =
57) for each -value. Make a plot of this posterior distribution as a
function of .
d) Now suppose you allow to be any value in the interval [0, 1]. Using
the uniform prior density for , so that p ( ) = 1, plot the posterior
density p ( ) ~ Pr(
Pn
i=1 Yi = 57| ) as a function of .
e) As discussed in this chapter, the posterior distribution of is beta(1+
57, 1+100 57). Plot the posterior density as a function of . Discuss
the relationships among all of the plots you have made for this exercise.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started