In the previous lecture we derived the marginal distribution of any \(j^{th}\) order statistic from a sample size \(n\) drawn i.i.d. from a population with pdf \(f_Y\) and CDF \(F_Y\).
We may often be interested in the joint distribution of two order statistics:
To answer questions about joint probabilities
To derive distribution of functions of two order statistics, e.g. \(R = Y_{(n)} - Y_{(1)}\)
Joint distribution of \(Y_{(i)}\), \(Y_{(j)}\)
For \(i<j\), we can heuristically derive \(f_{(i,j)}(x,w)\): “Probability of the \(i^{th}\) order statistic occurring at \(x\) and the \(j^{th}\) order statistic occurring at \(w\).”
This leaves us with the following multinomial “buckets”:
Thus the joint pdf of \((Y_{(i)},Y_{(j)})\) for \(i<j\) follows:
Application: find pdf of \(\small R = Y_{(n)} - Y_{(1)}\).
Have: \(f_{(1,n)}(x,w)\), joint pdf of \((Y_{(1)}, Y_{(n)})\)
Need: pdf of a transformation \(R = Y_{(n)} - Y_{(1)}\)
Approach: find joint pdf of \(2\rightarrow 2\) transformation \((Y_{(1)}, Y_{(n)}) \rightarrow (R,S)\) for some \(S\), integrate out \(S\) to find marginal of \(R\).
Required method: Jacobian method for \(2 \rightarrow 2\) transformations
Refresher: Jacobian method for \(2 \rightarrow 2\) transformations
Let \((X,Y)\) be jointly continuous with joint pdf \(f_{X,Y}(x,y)\)
As we do not have a grid to simulate over (\(n = 5\), and parent population remains \(UNIF(0,1)\) for each trial), we can simply use replicate() from the purrrfect package.
For general order statistics, we must use map() to create a list column of the sorted sample.
map_dbl(list_column, pluck(j)) and map_dbl(list_column, j) are identical, simply “plucking” the \(j^{th}\) element from each vector in the list.
(uniform_order_stats <-replicate(10000, runif(5, min =0, max =1),.as = y_sample )%>%mutate(y_sorted =map(y_sample, sort))%>%mutate(y2 =map_dbl(y_sorted, pluck(2)),y4 =map_dbl(y_sorted, 4) )) %>%head()