Find the joint probability distributed function of random variables

Suppose there are n i.i.d exponential random variables,say $X_{i},i=1,2,\cdots ,n$ with probability density function $$f(x)=\left\{\begin{matrix} e^{-x} &x\geqslant 0 \\ 0& x<0 \end{matrix}\right.$$ Now let $S=\left \{ X_{i}|X_{i}<\tau ,i=1,2,\cdots ,n\right \}$ be a set of $X_{i}$s satisfying $X_{i}<\tau$.Thus,$|S|$ is a binomial random variable $|S|\sim B(n,1-e^{-\tau }).$

So what is the joint pdf of $|S|$ and all the $X_{j}\in S$,namely, the joint pdf of the size of $S$ and all the members in it?

-

Well, they're all independent, so it doesn't really matter how many there are. And what's more, knowing how many elements are in S doesn't actually provide you with any information about what IS in it; it's just all the random variables that were less than τ. So the number of elements in S, itself as a random variable, is independent with respect to the distribution on each element in S, which are also independent with respect to each other. Now it's kind of wonky to try to take the joint pdf of a discrete random variable and a set of continuous random variables, but really, because each and every one is independent to the others, it's sufficient to get the distribution of each of the elements and just understand that the joint distribution is just the product of it all.

Really, what this is kind of saying, is, you have n radioactive atoms, each having a halflife of ln(2) second (ok, I should say decay time constant instead of half-life because there's nothing special about the number 2 when dealing with e, but just to put it in common terminology and a comprehensible situation), and of those n, |S| of them decayed within the first τ seconds. Hopefully you see that knowing how many of the n radioactive atoms in the set decayed before τ seconds pass doesn't make a lick of difference for the probability density on when any one atom decayed within that τ second period of time. Nor do they have an effect on each other. They're all still independent. It would only be if you did something like, keep the m atoms that lasted the longest among the |S| that decayed before τ seconds passed, that they would be dependent. But no, you're keeping all the atoms that decay before τ seconds pass in your set. What is the distribution just on those |S| elements? Well, that's just a simple application of Bayes's theorem. The probability of it decaying within time τ seconds is 1-$e^{-τ}$. So distribution on the |S| elements is just the original distribution divided by that over the first τ seconds, and 0 thereafter:

$f(x)=\left\{\begin{matrix} 0& 0>x\\\frac{e^{-x}}{1-e^{-τ}} &τ>x\geqslant 0 \\ 0& x\geqslantτ \end{matrix}\right.$

and this is for each and every one of the |S| variables that make it before the threshold - the atoms that decay fast enough.

-