Timeline for Is there an easy algorithm for generating a random distribution within a range but skewed toward the ends?
Current License: CC BY-SA 3.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 1, 2017 at 20:19 | vote | accept | Jason S | ||
Apr 28, 2017 at 15:33 | comment | added | Jason S | yeah, but I can get symmetric behavior via the $|u|^p \operatorname{sgn} u$ behavior, so that the beta function just dictates what's in each half. | |
Apr 28, 2017 at 12:19 | comment | added | jjet | If the two parameters are the same, then the distribution will be symmetric. And as p->0, all of the weight will go to the end points. With $Beta(\frac 1 p, 1)$, you get a distribution that's negatively skewed. It'll have a mode at it's right endpoint and equal zero at it's left. Also the mean won't be zero after you do the $2z - 1$ transformation. | |
Apr 28, 2017 at 4:51 | comment | added | Jason S | how is $Beta(\frac{1}{p}, \frac{1}{p})$ more appropriate than $Beta(\frac{1}{p}, 1)$? just curious. | |
Apr 28, 2017 at 0:36 | comment | added | jjet | I think you got what I was suggesting but in case I wasn't totally clear, it's this: Let $Z$ come from a $Beta(\frac 1 p, \frac 1 p)$ distribution. Then, set $X = 2Z - 1$. $X$ will have a distribution with mean, $E(X)=E(2Z-1)=2E(Z)-1=2 (1/p)/(1/p + 1/p) - 1=0$ and variance, $Var(X)=Var(2Z-1)=2^2 Var(Z)=4 (1/p)^2/((4/p^2)(2/p+1))=\frac p {2+p}$ | |
Apr 27, 2017 at 23:21 | comment | added | Jason S | ok, looks like the $1/p$ is correct and $E(x^2) = \frac{1}{1+2p}$ for my function (analytically from information on variance and mean of $I_x(\frac{1}{p},1)$, matches sample mean and variance of empirically-generated samples) | |
Apr 27, 2017 at 23:12 | comment | added | Jason S | I'm looking at the wikipedia articles on beta distribution and the incomplete beta function and I'm confused about the $1/p$ bit; if I divide my function into positive and negative halves (flip a coin to determine which), then it looks more like Beta(p,1) in order to bias the distribution towards $x=1$. Did I miss something? Somehow I am confused about the independent and dependent axes of the graph.... | |
Apr 27, 2017 at 23:02 | comment | added | jjet | I guess you're referring to the tails of the distribution then. In that case, I think you had the right idea. A Beta(1/p,1/p) distribution moved to the interval [-1, 1] is probably your best bet. I believe your algorithm generates exactly that. | |
Apr 27, 2017 at 22:57 | history | edited | Jason S | CC BY-SA 3.0 |
added 136 characters in body
|
Apr 27, 2017 at 22:56 | comment | added | Jason S | sorry, I'm not sure what word I should use then, it has nothing to do with the third moment. | |
Apr 27, 2017 at 22:55 | comment | added | jjet | Btw, if $X=|U|^p sgn(U)$ then the distribution of $\frac 1 2 (X+1)$ is given by a Beta(1/p, 1). Thus, $X$ is just a shifted and scaled version of Beta. | |
Apr 27, 2017 at 22:51 | comment | added | jjet | If you generate a random variable that way, it'll have zero "skewness" if that's what you're interested in. Or were you referring to something else when you wrote "skewed toward the ends"? | |
Apr 27, 2017 at 22:44 | history | answered | Jason S | CC BY-SA 3.0 |