3.5 A discrete random variable \( X \) has probability mass function Use the inverse transform method to generate a random sample of size 1000 from the distribution of \( X \). Construct a relative frequency table and compare the empirieal with the theoretical probabilities. Repeat using the \( R \) sample function.