\begin{Schunk}
\begin{Sinput}
 rate <- 2
 upper <- 10
 xvals <- seq(0, upper, by = 0.02)
 yvals1 <- dexp(xvals, rate = rate)
 plot(xvals, yvals1, type = "l", xlab = "x", ylab = "probability")
 rate <- 1
 upper <- 10
 xvals <- seq(0, upper, by = 0.02)
 yvals1 <- dexp(xvals, rate = rate)
 lines(xvals, yvals1, lty = 2)
 rate <- 0.2
 upper <- 10
 xvals <- seq(0, upper, by = 0.02)
 yvals1 <- dexp(xvals, rate = rate)
 lines(xvals, yvals1, lty = 3)
 legend("topright", legend = as.expression(c(bquote(lambda == 2), bquote(lambda == 
      1), bquote(lambda == 0.2))), lty = c(1, 2, 3))
\end{Sinput}
\end{Schunk}
