I’m trying to assign values of
Beta(a,b) function in Distributions package to
x but the value is not printing in console.
x = Beta(1,2)
How can I assign the value to
x and print it on console?
When you call
Beta(1,2) you are creating a distribution with parameters alpha 1 and beta 2.
Do you want to randomly sample from that distribution instead?
x = rand(Beta(1,2),10)
If not, can you clarify what you expected this to be doing?
Thank you, I want to print the value of
Beta(1,2) value which is 0.5, as an example in
R the value of beta function is
Ah ok. You want the Beta function, not the Beta distribution.
x = beta(1,2)
thank you, I just found that as well.
A bit more about
Beta() the distribution and
beta() the special function is in Listing 3.24 pg. 111 in the Statistics with Julia Book Draft.