Joint Density Functions

We can visualize part of the following joint density function using as a 3D surface.

\[ f(x, y) = 6e^{-2x- 3y} \quad \quad (x, y > 0) \]

f <- function(x, y) {
  6 * exp(-2 * x - 3 * y)
}

dx <- .1
dy <- .1
x <- seq(0, 3, by = dx)
y <- seq(0, 3, by = dy)
z <- outer(x, y, f)
persp(x, y, z, theta = 25, phi = 25)