1

Given any equation and range, for example,

$y = x^2 + x$ where $x$ is a value from $0$ to $1$ (inclusive)

Is it possible to determine the distribution of values outputted by this function between a give range of values?

I can create a program that tries many $x$ values and builds a discrete distribution of the equation's values which would tend towards the continuous distribution. But is there a mathematical way of doing this which instantly arrives at the continuous distribution?

  • "value from $0$ to $1$": does this mean that uniformly distributed over $[0,1]$? – zoli Jul 09 '15 at 23:45
  • $x$ can take any value from $0$ to $1$. I'm interested in knowing the proportion of the values outputted by this function between any $a$ and $b$. Plus I'd like to show the distribution of values outputted from this equation looks like, hopefully that's clear – user4752555 Jul 09 '15 at 23:55

1 Answers1

0

We assume the random variable $X$ is uniformly distributed in the interval $(0,1)$. More practically, we assume $X$ is obtained from the usual kind of (pseudo) random number generator.

Let $Y=X^2+X$. We want the distribution of $Y$. It is clear that $Y$ takes on values from $0$ to $2$. Let $0\lt y\lt 2$. We want to find the probability that $Y\le y$. We have $x^2+x\le y$ (where $x$ is between $0$ and $1$) if and only if $x\le \frac{-1+\sqrt{1+4y}}{2}$. (This comes from solving the quadratic $x^2+x-y=0$.) The probability that $X$ is $\le \frac{-1+\sqrt{1+4y}}{2}$ is $\frac{-1+\sqrt{1+4y}}{2}$

For the density function of $Y$, differentiate. We get density function $(1+4y)^{-1/2}$ in the interval $0\lt y\lt 2$.

André Nicolas
  • 507,029
  • Thanks for this! You've helped me understand statistics better :) – user4752555 Jul 10 '15 at 00:06
  • You are welcome. One can also get the density by the method of substitution, but I thought going through the cumulative distribution $F_Y(y)$, that is, $\Pr(Y\le y)$, might be conceptually clearer. – André Nicolas Jul 10 '15 at 00:09