Creating a hyperbolic curve with a mean

522 Views Asked by At

I'd like to create a hyperbolic curve, ala: y = 1/(1-x) such that taking a random sampling between x of 0 and 1, would give a mean of exactly 1.

Example illustration

How would I come up with such a curve, and tune the factors that preserves the "mean" property I'd like to keep

1

There are 1 best solutions below

0
On

What you're looking for is a probability density function. The way to turn a regular function $f(x)$ from $a$ to $b$ into a probability density function is to divide it by $$\int_a^b f(x)\ dx$$ thus making its integral from $a$ to $b$ $1$.

Here we have

$$\int_0^1 \frac{1}{1-x}\ dx$$

$$\frac{1}{(1-x)^2}\bigg|_0^1$$

However, this diverges to $\infty$ at $x=1$ and is $1$ at $x=0$, so the integral itself diverges. Technically speaking, the only way to make a probability density function out of a function that doesn't have a well-defined integral over the region is to make it a shift of the Dirac Delta function. Thus, the probability density function desired is

$$\delta(1-x)$$