Exponential function with weighted $X$ and value between $0$ and $1$

336 Views Asked by At

I'm looking for an exponential function which returns values in $[0,1]$ while $X$ can assume any positive integer value.

Specifically, in my case the $X$ represents the number of failed operations over to total number $Y$ of operation, with $X \leq Y$. Consequently, I would like to associate a weight to $X$ which defines the slope of the curve, so that the larger $X$ becomes, the faster the curve goes to $0$ (or $1$).

Is there any specific function that can meet my requirements?