1. Using only the runif function in R, generate 10,000 iid random variables from
  1. \(X \sim \text{Exponential}(5).\)
  2. \(Y \sim \text{Gamma}(3,1.5).\) Hint: Get in terms of exponential distribution.
  3. \(Z \sim \text{Chi Squared with 6 degrees of freedom}\) Hint: Get in terms of exponential distribution.
  1. Find is \(P(X>Y)?\)

  2. Generate 10,000 draws of \(X_{(k)}\) when \(X_i\) is iid and \(X_i \sim \text{Uniform}(0,1)\). Plot the empirical density for \(X_{(k)}\) (histogram) and show that it is \(\text{Beta}(k,n+1-k)\) when
  1. \(k = 1\) and \(n = 100\)
  2. \(k = 50\) and \(n = 100\)
  3. \(k = 100\) and \(n = 100\)