Skip to main content
6 events
when toggle format what by license comment
Mar 14, 2013 at 4:04 comment added 7200rpm Thanks again! Super helpful, sometimes it can be difficult to find a function based only on vague sense of the kind of output you want.
Mar 14, 2013 at 3:41 comment added assumednormal If you have a function $f(x)$ such that $f(1),\ldots,f(5)$ are all finite, a few simple steps will turn this function into a probability distribution over the integers $1,\ldots,5$. (1) Define $g(x)=f(x)-\textrm{min}(f(1),\ldots,f(5))$. (2) Define $p(x)=g(x)/\sum_{i=1}^{5}g(i)$. Now $p(x)$ is a probability distribution over the integers $1,\ldots,5$ and it has a shape similar to the original function $f(x)$.
Mar 14, 2013 at 3:31 comment added assumednormal Try this: Let $$p_1(x)=\frac{(x-3)^3+8}{\sum_{j=1}^{5}\left((j-3)^3+8\right)}$$ and $$p_{-1}(x)=p_1(6-x)$$ and $$p_s(x)=s\times p_1(x)+(1-s)\times p_{-1}(x)$$ with $s\in[0,1]$. When $s=1/2$, $p_s$ is uniform over $1,\ldots,5$.
Mar 14, 2013 at 2:28 comment added 7200rpm Excellent! Thank you very much - just what I was looking for. I realize I was a bit vague in my description, but you nailed it. If you don't mind me picking your brain a bit, I rearranged the equation into p(x)=2/10+s(x-3)/10. If i were to want a more exponential change in distribution, how would I modify it? I tried (x-3)^3, but that throws off the summation to 1...
Mar 14, 2013 at 1:33 vote accept 7200rpm
Mar 13, 2013 at 3:23 history answered assumednormal CC BY-SA 3.0