Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

R Tool: Beta Distribution - pdf & cdf

JoshKushner
12 - Quasar

Is there a beta distribution equation in the R tool? All my attempts give the error "Error: could not find function".

 

 

6 REPLIES 6
jdunkerley79
ACE Emeritus
ACE Emeritus

PDF function is dbeta and CDF is pbeta I believe:

 

x <- seq(0, 1, length = 21)
a <- dbeta(x, 0.5, 0.5)
b <- pbeta(x, 0.5, 0.5)
write.Alteryx(list(x = x, pdf = a, cdf = b),1)

worked on mine. Guess could be sensitive to R installation.

JoshKushner
12 - Quasar

Totally worked! Thanks @jdunkerley79!

JoshKushner
12 - Quasar

As a follow up, how do I bound the cdf function (In excel this is done with A = lower bound & B = upper bound)?

jdunkerley79
ACE Emeritus
ACE Emeritus

Assuming you mean the probability between A and B then cdf(B) - cdf(A)  will give you the value.

JoshKushner
12 - Quasar

I'm looking for a way to incorporate the lower and upper bounds of 'x' into the function.

Capture.PNG

jdunkerley79
ACE Emeritus
ACE Emeritus

ah sorry the second parameter is a and the third is b

 

https://stat.ethz.ch/R-manual/R-devel/library/stats/html/Beta.html

Labels