Name:

Use this R-Markdown file to answer the following questions.

  1. Revenue and Cost functions for a firm are provided below. Profits are defined as revenues minus costs \(R(q) - C(q)\).
    \[\begin{align*} R(q) & = (100 - q)q \\ C(q) & = 25q \end{align*}\]

    1. Find the two points where profits are equal to 0.

    Q = 0 and Q = 75

    1. Graph the revenue and cost functions on the same plot.

    Below

    1. At what quantity are profits maximized and what are profits at that quantity?

    Profit Max where Q = 3705, Profit = 1406.25

\[ \pi = 75q -q^{2}\]

QUAD2 <- function(a,b,c) {
  pos_sol <- (-b+sqrt(b^2-4*a*c))/(2*a)
  neg_sol <- (-b-sqrt(b^2-4*a*c))/(2*a)
  vertex <- -b/(2*a)
  opt_val <- a*(vertex^2) + b*vertex + c
  print(pos_sol)
  print(neg_sol)
  print(vertex)
  print(opt_val)
}

QUAD2(-1,75,0)
## [1] 0
## [1] 75
## [1] 37.5
## [1] 1406.25
q <- sequence(101, from = 0, by = 1)

rev <- (100-q)*q
cost <- 25*q
profit <- 75*q - q^2

plot(rev~q,type = "l")
lines(cost~q,type = "l")

  1. The Investment Club on campus received a donation of $100,000 in 1995 under the condition that students manage the money as part of the college’s endowment. The current value of the portfolio is around $2 million. Assuming continuous compounding and that the club has invested for 30 full years, what is the annual return for the Investment Club over this time?
FV <- 2000000
PV <- 100000
t <- 30

r <- log(FV/PV)/t

r
## [1] 0.09985774

9.98%

  1. Using the rule of 70, approximately how long would it take for an investment to double with a

    1. 5% return? \(70/5 \approx 14\) years
    2. 8% return? \(72/8 \approx 9\) years
    3. 12% return \(72/12 \approx 6\) years
  2. You are able to secure $100,000 in retirement savings by your 30th Birthday. You would like that sum to double six times in the next 30 years. Use this information to answer the following questions.

    1. What is the value of your investment after 30 years if it doubles 6 times?
    2. What interest rate would be required for your investment to double 6 times over 30 years?
val <- 100000*(2^6)
r <- 6*log(2)/30

val
## [1] 6400000
r
## [1] 0.1386294

\(Value = 6,400,000\) \(Return = 13.85\%\)

  1. There is a link to the data set ”C02.txt” available on Moodle. Use this link to answer the following questions.

    1. Read the data into R and create a line plot of CO2 Level against year. Comment on the shape of the relationship.
    2. Create a new variable that is the log transformation of CO2. Plot the log transformed CO2 level against year.
    3. Assuming continuous compounding, what is the annual percentage change in carbon emissions?

    0.004571

    1. It was recommended to try and keep CO2 concentrations below 400 PPM. What year did CO2 concentrations climb above 400 for the first time?

    The end of 2014 or beginning of 2015

co2 <- read.table("https://raw.githubusercontent.com/tjdevine/EC255/refs/heads/main/co2.txt",header=TRUE)

plot(CO2 ~ year, data = co2,type = "l")

lnco2 <- log(co2$CO2)



trend <- lm(lnco2 ~ co2$year)
trend
## 
## Call:
## lm(formula = lnco2 ~ co2$year)
## 
## Coefficients:
## (Intercept)     co2$year  
##   -3.219904     0.004571
plot(lnco2 ~ co2$CO2, type = "l")
abline(trend, col = "red")