Sunday, November 27, 2016

probability - Pick the highest of two (or $n$) independent uniformly distributed random numbers - average value?



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.




$$p_1 = \frac{1}{n^2}$$



And I knew the sequence had to have a sum of 100 %. This made it possible to calculate the last, the $n$th, element:



$$p_n = \frac{2}{n} - p_1$$



Based on that it was easy to calculate the difference between elements and subsequently the formula for the sequence.



$$p_i = \frac{2in-2i-n+1}{n^3-n^2}$$




All I had to do now, was multiplying the probabilities with their respective values and sum this.



$$
\sum_{i=1}^{n} \frac{2in-2i-n+1}{n^3-n^2}(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(Y_{max}=y)=\left(\frac{\lfloor y\rfloor-a+1}{b-a+1}\right)^n-\left(\frac{\lfloor y\rfloor-a}{b-a+1}\right)^n$$




For $n$ iid continuous uniform random variables the PDF is



$$f_{Y_{max}}(y)=\begin{cases}n\left(\frac{1}{b-a}\right)^{n-1}\left(\frac{y-a}{b-a}\right)^{n} &,y\in[a,b]\\
0&,\text{otherwise}\\
\end{cases}$$


No comments:

Post a Comment

analysis - Injection, making bijection

I have injection $f \colon A \rightarrow B$ and I want to get bijection. Can I just resting codomain to $f(A)$? I know that every function i...