Question: Bayesian Statistics Please use R to answer this question and include the code you used with your answers. This question is about the 'log-uniform' prior

Bayesian Statistics

Bayesian Statistics Please use R to answer this question and include the

Please use R to answer this question and include the code you used with your answers. This question is about the 'log-uniform' prior distribution which we'll use at times during the course. A quantity S is known to be positive and somewhere between 3 and 55 (inclusive). (a) In R. make a vector called beta that contains the set of possible values. Go from 3 to 55 in steps of 1. [1 mark] (b) Create an R vector to represent a discrete uniform prior distribution. Le.. assigning equal prior probabilities to each possibility. [1 mark] (c) Find the expected value and variance for 3. [2 marks] (d) According to the uniform prior distribution, calculate P(5 5 8 5 10.5)? Hint: In R, the element-wise logical and operation for vectors is &. [2 mark] (e). Create an R vector to represent a log-uniform prior distribution. where the probabilities are proportional to 1/3. Hint: Construct a vector of un-normalised probabilities first. then normalise it the same way as you would normalise a posterior. (1 mark] (f) According to the log-uniform prior distribution. what are the values of the same probability as in part (d)? [1 mark] g) Find the expected value and variance for 3 where the probabilities are proportional to 1/3. [1 mark]

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!