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?