If a random variable X has a beta distribution, its probability
density function is
fX (x) = 1 xα−1(1 − x)β−1 B(α,β)
for x between 0 and 1 inclusive. The pdf is zero outside of
[0,1]. The B() in the denominator is the beta function, given by
beta(a,b) in R.
Write your own version of dbeta() using the beta pdf formula
given above. Call your function mydbeta(). Your function can be
simpler than dbeta(): use only three arguments (x, shape1,...