Reputation: 29094
I have a function like this:
f(X) = 1/b-a where a = 5% and b =15% and X = rate of return.
I would like to plot the probability density function of this.
What I have tried:
I know I need to use dname()
for density or probability function but I do not know the name to pass to this.
Upvotes: 0
Views: 1074
Reputation: 10203
As Roman suggests, how about the following:
curve(dunif(x, min = 5, max = 15),0,20,n=101,xlab='Expected Return',ylab='Density')
Upvotes: 4