If I have a function f that generates a random number uniformly distributed between 1 and 5 then can I say that g=f*f generates a random number uniformly distributed between 1 and 25?
Asked
Active
Viewed 222 times
0
-
1Definitely not. g can only equal 1,2,3,4,5,6,8,9,10,12,15,16,20,25, and some of these values are more likely than others – Mike Earnest Jan 21 '18 at 17:00
-
I guess it's a random real number. – Kenny Lau Jan 21 '18 at 17:00
-
Depends if it the distribution is continuous or discrete – Dylan Zammit Jan 21 '18 at 17:02
-
Also in continuos case the product is not a uniform distribution – Blex Jan 21 '18 at 17:04
-
Why not? All values from 1 to 25 are equally probable in the continuous case – Dylan Zammit Jan 21 '18 at 17:06
-
Take randomly two sides of a rectangle from [1,5]. Is it equally probable having area A=1 or A=10? – Blex Jan 21 '18 at 17:09
-
@Blex got it, thanks – Dylan Zammit Jan 21 '18 at 17:13
-
1Just like to point out that "random"≠"uniformly distributed". – Michael McGovern Jan 21 '18 at 17:31
-
@MichaelMcGovern A good point. I have seen arguments in which it is assumed that any statement which might be true or false is 50/50 so if there are 20 statements then it is less than one in a million that they are all true. – badjohn Jan 21 '18 at 17:54
1 Answers
3
Discrete case
Fairly obvious not as there some numbers between $1$ and $25$ that you will never get: $7, 11, 13, 14, 17, 18, 19, 21, 22, 23, 24$.
The sum is a bit better behaved, all of $2$ to $10$ will be possible but still not uniform. Consider the similar problem of two dice: $7$ is much more likely than $2$ or $12$.
Continuous case
Also not uniform.
For the sum, the PDF will rise from $0$ at $0$ linearly to a maximum at the mid-point and then fall linearly back to $0$ at $10$.
For the product, also not uniform. I was calculating it but it seems redundant now.
badjohn
- 8,204