# Linearly Distributed Random Number

I went through several random no distributions like uniform distribution, Gaussian distribution etc but I was not able to find what I need.

The most common distribution function is uniform distribution where the probality of getting each number is equal. I need a distribution function which generates random no between say 1 and 100 such that, probability of getting 100 is 10 times the probability of getting 1 (probability linearly distributed between 1 and 100)

Google did not show me any result for linearly distributed random no generator. There must be another name for it.

I just need the distribution name of this, if it already exists.

• – Travis Jan 10 '17 at 23:56
• this might also be relevant/helpful – Travis Jan 11 '17 at 0:08

## 1 Answer

You want $p_X(1) = a$ and $p_X(100) = 10a$. This implies that for $y \in \{1, \ldots, 100\}$ (assuming linearity) that $p_X(y) = \frac{a}{11}(y+10)$. Then solving for $a$ in the discrete case, we just need $$\sum_{y=1}^{100} (y+10) = \frac{11}{a} \Longrightarrow \frac{(100)(100+1)}{2} + 1000 = \frac{11}{a} \Longrightarrow a = \frac{11}{6050}$$ And solving for $a$ in the continuous case, $$\int_1^{100} (y+10) dy = \frac{11}{a} \Longrightarrow \frac{100^2-1}{2} + 990 = \frac{11}{a} \Longrightarrow a = \frac{22}{11979}$$ Not particularly clean, but this is the distribution you're talking about. I've never heard of a "cool" name for this distribution (i.e., named after a famous mathematician or something), but I'd describe it as a random variable with a linear probability distribution, of which the uniform distribution is a special case.