Question: 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

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 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, i.e., assigning equal prior probabilities to each possibility. [1 mark]

(c) Find the expected value and variance for . [2 marks]

(d) According to the uniform prior distribution, calculate P (5 10.5)?

Hint: In R, the element-wise logical and operation for vectors is &. [2 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!