Conditional gamma distribution derivation [duplicate]

Suppose we specify the gamma pdf in the following format:

$$f(x) = \lambda e^{-\lambda x} \frac{(\lambda x)^{n - 1}}{(n - 1)!}$$

Further suppose we want the distribution of a $$\text{gamma}(\lambda = 1,n = 2)$$ random variable conditional on its value exceeding 5.

Now we can say that the pdf of this random variable is defined as:

$$f(x) = \frac{xe^{-x}}{\int_{5}^{\infty} x e^{-x}dx}$$

Why is the above-mentioned true?

I know that:

$$f_{X|Y} = \frac{f(x,y)}{f(y)}$$

But how would the above-mentioned equality be applied in my case? It is easy to see that the denominator in $$\frac{xe^{-x}}{\int_{0}^{\infty} x e^{-x}dx}$$ is defined as the probability that x is greater than 5. Which conforms to the usual definition of $$f_{X|Y}$$. How , if even, was the joint probability density function calculated in this case?

• You are using a joint density approach when $Y=\mathbb I_{X>5}$ does not have a density proper. Commented Nov 15, 2021 at 20:48
• Not sure what you mean by that. Commented Nov 15, 2021 at 20:51
• Why is $xe^{-x}$ in the numerator? Commented Nov 15, 2021 at 20:56
• This question is asked and generally answered at stats.stackexchange.com/questions/525894. The keyword to use in a search is "truncated distribution."
– whuber
Commented Nov 15, 2021 at 21:14
• BTW, neither expression you give for the two versions of $f$ is fully correct: the first needs to indicate $f$ is zero for $x\lt 0$ and the second needs to indicate that $f$ is zero whenever $x\lt 5.$ Perhaps this resolves some of your questions?
– whuber
Commented Nov 15, 2021 at 21:31

In the definition of the conditional density $$f_{X|Y}(x|y) = \dfrac{f_{X,Y}(x,y)}{f_Y(y)}$$ both $$f_{X,Y}(\cdot,\cdot)$$ and $$f_Y(\cdot)$$ are densities wrt some appropriate dominating measures. You need to find the proper dominating measure for $$(X,Y)$$ when $$Y=\mathbb I_{X>5}$$.
• Unsure what you mean by dominating measure. Why this would imply that the joint density is simply equal to the density $f(x)$? Commented Nov 15, 2021 at 21:08
• Because $Y$ conditional on $X$ is a Dirac mass. Commented Nov 15, 2021 at 21:25