# Is pX(Y) a random variable or a number?

I reason that is a random variable because Y is a random variable, thus making Px acting randomly. Example Y sample space is a roll of a die (1,2,3,4,5,6). So any of those values could be inputed in pX, thus making it act as a random variable. pX(1), pX(2), etc. Is my reasoning correct?

• Maybe an example of what you mean: Consider an application in which the number of claims on a certain kind of policy made in a month is $N \sim \mathsf{Pois}(\lambda = 27)$ and then each claim results in a payout of $X_i \sim \mathsf{Exp}(\mathrm{rate} = 0.01)$ for a mean of $\mu = 100.$ What is the distribution of the total payout $T$ over a month? $E(T) = 2700,$ To find $Var(T)$ use a conditioning argument. Sometimes called 'random sum of random variables'. – BruceET May 31 at 2:12
• By simulation, $P(T > 3000) \approx 0.32.$ – BruceET May 31 at 2:23
• Thanks again, BruceET, you're awesome! – João Vitor Gomes May 31 at 14:16

You are correct. $$p_X(x)=f(x)$$ is just another function and $$p_X(Y)$$ acts like a transformation on the random variable $$Y$$, thus making it a random variable.