Question: Assume a generative model with Bernoulli data (X) and a uniform prior (): XBernoulli Uniform(0,1) Also, assume you observe data representing two successes and one

Assume a generative model with Bernoulli data (X) and a uniform prior ():

XBernoulli

Uniform(0,1)

Also, assume you observe data representing two successes and one failure.

Using greta or causact, update your prior forand generatea representative sample of 4,000 draws from the posterior distribution.

What is your updated probability thatis less than or equal to 50% (i.e.P(50%))?

Hint: This is not the quantile function as shown in the Bayesian Updating chapter. Instead, look at the representative sample of the posterior distribution and calculate the percentage of draws where theta is less than or equal to 50%. The following code could be used to do that:

drawsDF %>% mutate(under50 = ifelse(theta<0.50,1,0)) %>% summarize(avgUnder50 = mean(under50))

(Enter answer as a decimal - i.e. 12% would be entered as 0.12. Round to the nearest hundredths place)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!