With "random number" I mean an independent uniformly distributed random number.
One
Picking one random number is easy: When I pick a random number from x to y, the average value is (x+y)/2.
Two
I'm no maths expert, nevertheless I was able to work out a solution for whole numbers: When I pick the highest of two random whole numbers from x to y ...
Let n be the count of possible results n=y−x+1.
I looked at the probability of every single possible outcome and noticed an arithmetic sequence. I knew the sequence had to start with the rarest possibility: Rolling two times in a row the lowest value.
p1=1n2
And I knew the sequence had to have a sum of 100 %. This made it possible to calculate the last, the nth, element:
pn=2n−p1
Based on that it was easy to calculate the difference between elements and subsequently the formula for the sequence.
pi=2in−2i−n+1n3−n2
All I had to do now, was multiplying the probabilities with their respective values and sum this.
n∑i=12in−2i−n+1n3−n2(x+i−1)
Questions
What sort of distribution is this, how is it called? I can't name it and I can hardly search for it.
What is the solution for picking the highest of two random real numbers from x to y? I feel a little bit lost, because my approach fails, because there are infinite real numbers.
What is the solution for picking the highest of c random real numbers from x to y?
Answer
Here is exactly what you are looking for for all types of random variables.
For n iid discrete uniform random variables the PDF is
P(Ymax=y)=(⌊y⌋−a+1b−a+1)n−(⌊y⌋−ab−a+1)n
For n iid continuous uniform random variables the PDF is
fYmax(y)={n(1b−a)n−1(y−ab−a)n,y∈[a,b]0,otherwise
No comments:
Post a Comment