R Markdown
- Use one of our optimization routines to find the solution for x and
y that maximizes the utility function subject to the budget
constraint.
\[ \begin{align*}
\text{Max }U(x,y) & = x^{\frac{1}{4}}y^{\frac{3}{4}}, \\
\text{ subject to } & P_{x}x+P_{y}y = I, \\
I & = 120 \\
P_{x} & = 8 \\
P_{y} & = 12
\end{align*}
\]
px <- 8
py <- 12
I <- 120
y <- function(x) {
I/py - (px/py)*x
}
u <- function(x) {
(x^0.25)*(I/py - (px/py)*x)^(0.75)
}
optimize(u,interval = c(0,12),maximum = TRUE)
## $maximum
## [1] 3.750017
##
## $objective
## [1] 6.306723
y(3.75)
## [1] 7.5
\[\begin{align*}
x & = 3.75 \\
y & = 7.5
\end{align*}\]
- A business needs to construct a fence around an 800 square foot
rectangular area. Three sides will be a wire fence and one side will be
stone. Wire fencing costs $8 a foot. Stone fencing costs $24 a foot.
What dimensions for the fence will minimize the cost?
Objective function:
\[\begin{align*}
f(x) & = \frac{12,800}{x} + 32x
\end{align*}\]
f <- function(x) {
12800/x + 32*x
}
optimize(f,interval = c(0,800),maximum = FALSE)
## $minimum
## [1] 20
##
## $objective
## [1] 1280
\[\begin{align*}
x & = 20 \\
y & = 40
\end{align*}\]
- A statistician wants to estimate the likelihood that someone is
unemployed. A sample of n = 100 people in the work force found that x =
eight were unemployed. Use the following function to maximize the
likelihood of the proportion estimate \(p\). \[\begin{align*}
L & = Ap^{8}(1-p)^{92}
\end{align*}\] \begin{enumerate}[a.]
- Take the natural log transformation of the objective function.
\[\begin{align*}
ln(L) & = ln(A) + 8ln(p) + 92ln(1-p)
\end{align*}\]
- Maximize the natural log transformed function from the previous step
by taking the first derivative, setting it equal to 0, and solving for
\(p\). It’s not necessary to take the
second derivative for this problem.
\[\begin{align*}
\frac{d ln(L)}{d p} & = \frac{8}{p} - \frac{92}{1-p} \\
0 & = \frac{8}{p} - \frac{92}{1-p} \\
\frac{8}{p} & = \frac{92}{1-p} \\
(1-p)8 & = 92p \\
8 - 8p & = 92p \\
8 & = 100p \\
p & = \frac{8}{100}
\end{align*}\]
- If you wanted to generalize a solution to find the proportion from a
sample of size n with a count of x, what expression could you use?
\[\begin{align*}
p & = \frac{x}{n}
\end{align*}\]
- For this linear demand function: \[\begin{align*}
Q_{d} & = 130 - 1.5P,
\end{align*}\]
answer the following questions.
- Find the expression for the elasticity of demand for this
function.
\[\begin{align*}
\epsilon & = -1.5\frac{P}{Q}
\end{align*}\]
- Calculate the elasticity of demand at a price of $50, $43.33, and
$25. Characterize the elasticity at each of these points.
|
Price
|
Quantity
|
Elasticity
|
Characterize
|
|
50
|
55
|
-1.364
|
Elastic
|
|
43.33
|
65.0
|
-1.000
|
Unit Elastic
|
|
25
|
92.5
|
-0.405
|
Inelastic
|