Question 1

Evaluate the following limit.

\[\lim_{x \to \infty} \frac{\ln(x)}{x}\]

# install.packages("Ryacas")
library(Ryacas)
## Warning: package 'Ryacas' was built under R version 4.5.2
## 
## Attaching package: 'Ryacas'
## The following object is masked from 'package:stats':
## 
##     integrate
## The following objects are masked from 'package:base':
## 
##     %*%, det, diag, diag<-, lower.tri, upper.tri
x <- ysym("x")
f <- log(x) / x
result <- lim(f,x,Inf)
result
## y: 0

Question 2

Graph the polygon with the following coordinates: \(A \space (-3,4)\), \(B \space (-1,8)\), and \(C \space (3,4)\).

# install.packages("tidyverse")
library(tidyverse)
## Warning: package 'lubridate' was built under R version 4.5.2
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.5
## ✔ forcats   1.0.1     ✔ stringr   1.5.2
## ✔ ggplot2   4.0.0     ✔ tibble    3.3.0
## ✔ lubridate 1.9.4     ✔ tidyr     1.3.1
## ✔ purrr     1.1.0     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter()   masks stats::filter()
## ✖ dplyr::lag()      masks stats::lag()
## ✖ purrr::simplify() masks Ryacas::simplify()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
q2_data <- data.frame(Label = LETTERS[1:3],
                      X = c(-3,-1,3),
                      Y = c(4,8,4))
ggplot(q2_data,aes(x = X,y = Y)) +
  geom_polygon(fill = "steelblue",alpha = 0.5,color = "black",lwd = 1.25) +
  geom_point(size = 3) +
  geom_text(aes(label = Label),nudge_y = 0.3,fontface = "bold") +
  coord_equal() +
  theme_gray(base_size = 14)

Question 3

A committee of three is chosen from five counselors - Peters, Quinn, Roberts, Singh, and Trevino.

A. What is the probability Quinn is on the committee?

# install.packages("tidyverse")
library(tidyverse)
counselors <- c("Peters","Quinn","Roberts","Singh","Trevino")
counter <- 0
N <- 1e5 # 100,000 trials
for (i in 1:N) {
  pick <- sample(counselors,size = 3,replace = F)
  if ("Quinn" %in% pick) {
    counter <- counter + 1
  }
}
probability1 <- counter / N
cat("The probability Quinn is on the committee is:",probability1,"\n")
## The probability Quinn is on the committee is: 0.59813

B. What is the probability Quinn is not on the committee?

# install.packages("tidyverse")
library(tidyverse)
counselors <- c("Peters","Quinn","Roberts","Singh","Trevino")
counter2 <- 0
N2 <- 1e5 # 100,000 trials
for (j in 1:N2) {
  pick2 <- sample(counselors,size = 3,replace = F)
  if (!("Quinn" %in% pick2)) {
    counter2 <- counter2 + 1
  }
}
probability2 <- counter2 / N2
cat("The probability Quinn is not on the committee is:",probability2,"\n")
## The probability Quinn is not on the committee is: 0.40227