## Description

## Assignment A1.1 (2.2 in Textbook):

Expectations and variances: Let Y1 and Y2 be two independent random variables, such that

E[Yi

] = µi and Var [Yi

] = σ

2

i

. Using the definition of expectation and variance, compute the

following quantities, where a1 and a2 are given constants:

• E [a1Y1 + a2Y2] , Var [a1Y1 + a2Y2];

• E [a1Y1 − a2Y2] , Var [a1Y1 − a2Y2].

## Assignment A1.2 (2.5 in Textbook):

Urns: Suppose urn H is filled with 40% green balls and 60% red balls, and urn T is filled with

60% green balls and 40% red balls. Someone will flip a coin and then select a ball from urn H or

urn T depending on whether the coin lands heads or tails, respectively. Let X be 1 or 0 if the

coin lands heads or tails, and let Y be 1 or 0 if the ball is green or red.

• Write out the joint distribution of X and Y in a table.

• Find E[Y ]. What is the probability that the ball is green?

• Find Var[Y | X = 0], Var[Y | X = 1] and Var[Y ]. Thinking of variance as measuring

uncertainty, explain intuitively why one of these variances is larger than the others.

• Suppose you see that the ball is green. What is the probability that the coin turned up

tails?

## Assignment A1.3 (2.7 in Textbook):

Coherence of bets: de Finetti thought of subjective probability as follows: Your probability p(E)

for event E is the amount you would be willing to pay or charge in exchange for a dollar on the

occurrence of E. In other words, you must be willing to – give p(E) to someone, provided they

give you $1 if E occurs; – take p(E) from someone, and give them $1 if E occurs. Your probability

for the event Ec = “not E ” is defined similarly.

• Show that it is a good idea to have p(E) ≤ 1.

• Show that it is a good idea to have p(E) + p (Ec

) = 1.

Page 1 of 3

## Assignment A1.4 (3.1 in Textbook):

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.

• 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 | θ).

• For the moment, suppose you believed that θ ∈ {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 θ.

• 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 θ.

• 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 θ.

• 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.

## Assignment A1.5 (3.2 in Textbook):

Sensitivity analysis: It is sometimes useful to express the parameters a and b in a beta distribution

in terms of θ0 = a/(a + b) and n0 = a + b, so that a = θ0n0 and b = (1 − θ0) n0. Reconsidering

the sample survey data in Exercise 3.1, for each combination of θ0 ∈ {0.1, 0.2, . . . , 0.9} and

n0 ∈ {1, 2, 8, 16, 32} find the corresponding a, b values and compute Pr(θ > 0.5 |

P Yi = 57) using

a beta (a, b) prior distribution for θ. Display the results with a contour plot, and discuss how the

plot could be used to explain to someone whether or not they should believe that θ > 0.5, based

on the data that P100

i=1 Yi = 57.

## Assignment A1.6 (3.7 in Textbook):

Posterior prediction: Consider a pilot study in which n1 = 15 children enrolled in special education

classes were randomly selected and tested for a certain type of learning disability. In the pilot

study, y1 = 2 children tested positive for the disability.

• Using a uniform prior distribution, find the posterior distribution of θ, the fraction of

students in special education classes who have the disability.

Find the posterior mean, mode

and standard deviation of θ, and plot the posterior density. Researchers would like to recruit

students with the disability to participate in a long-term study, but first they need to make

sure they can recruit enough students. Let n2 = 278 be the number of children in special

education classes in this particular school district, and let Y2 be the number of students

with the disability.

• Find Pr (Y2 = y2 | Y1 = 2), the posterior predictive distribution of Y2, as follows:

i. Discuss what assumptions are needed about the joint distribution of (Y1, Y2) such that

Page 2 of 3

the following is true:

Pr (Y2 = y2 | Y1 = 2) = Z 1

0

Pr (Y2 = y2 | θ) p (θ | Y1 = 2) dθ.

ii. Now plug in the forms for Pr (Y2 = y2 | θ) and p (θ | Y1 = 2) in the above integral.

iii. Figure out what the above integral must be by using the calculus result discussed in

Section 3.1.

• Plot the function Pr (Y2 = y2 | Y1 = 2) as a function of y2. Obtain the mean and standard

deviation of Y2, given Y1 = 2.

• The posterior mode and the MLE (maximum likelihood estimate; see Exercise 3.14)

of θ, based on data from the pilot study, are both ˆθ = 2/15. Plot the distribution

Pr

Y2 = y2 | θ = ˆθ

, and find the mean and standard deviation of Y2 given θ = ˆθ. Compare these results to the plots and calculations in c) and discuss any differences. Which

distribution for Y2 would you use to make predictions, and why?

Sheet 1 is due on Oct. 7th. Submit your solutions before Oct. 7th, 5:00 pm.

Page 3 of 3