It's my first post, so hopefully I don't muck it up.
I am trying to build a random number generator with a certain property that I'm having trouble implementing, describing, and searching for.
It is easiest for me to describe what I have, and then describe why it doesn't do what I would like. What I have, I believe, looks like this:
$f(c, m, M, w)= \begin{cases} \frac{M-c}{M-w}, & \text{for $w \le c \le M$}\\[2ex] \frac{c-m}{w-m}, & \text{for $m \le c \lt w$}\\ \end{cases}$
Where $c$ is some candidate value, $m$ and $M$ are the minimum and maximum values, $w$ is the weighted ("most likely") value, and the function returns the probability that the candidate is "accepted" as a weighted random number.
In case I totally messed up that attempt at a generic case, here's a specific case for a candidate number evaluator between 1 and 10, where 7 is the weighted value:
$f(c)= \begin{cases} \frac{10-c}{3}, & \text{for $7 \le c \le 10$}\\[2ex] \frac{c-1}{6}, & \text{for $1 \le c \lt 7$}\\ \end{cases}$
This solution is fine for a linear drop in probability, but what I'm trying for is a more curved (geometric?) drop in probability. Instead of drawing a line from 100% probability at the weight value down to 0% probability in each direction toward the max and min, I'd like it to be a curve, where the closer to the weight value the higher the resulting probability (higher than a linear distance).
Did I explain this at all clearly? Is there a function that I could use to describe the behavior I am looking for? Maybe a piecewise quadratic or something? Would someone be willing to help me find that function?
Thanks for any help!