The position of a particle moving on the x-axis is given by \(x(t) = t^3 - 6t^2 + 5\) for time \(t \geq 0\). What is the velocity of the particle at time \(t = 4\)?
# install.packages("Deriv")
library(Deriv)
x <- function(t) {
t^3 - 6 * t^2 + 5
}
v <- Deriv(x)
answer <- v(t = 4)
cat("The velocity of the particle at time t = 4 is:",answer,"\n")
## The velocity of the particle at time t = 4 is: 0
A particle moves with \(r(t) = \langle t^2 - 1,3t \rangle\) for \(0 \leq t \leq 2\). What is its speed at \(t = 1\)?
# install.packages("Deriv")
library(Deriv)
r <- function(t) {
c(t^2 - 1,3 * t)
}
speed <- Deriv(r)
result <- r(t = 1)
cat("The speed of the particle at t = 1 is:",result,"\n")
## The speed of the particle at t = 1 is: 0 3
If you spin the spinner (listed below), on which color is it most likely to land?
spinner <- c("Green","Blue","Green","Orange","Red","Yellow")
simulation <- sample(x = spinner,size = 1e5,replace = T)
probabilities <- prop.table(table(simulation))
probabilities
## simulation
## Blue Green Orange Red Yellow
## 0.16635 0.32972 0.16811 0.17005 0.16577
The lengths of time (in hours) that nine similar candles burned were: \([9.8,9.7,9.1,9.2,9.9,9.1,9.7,10.2,8.8]\). The manufacturers claim that the average burn-time is 10 hours. Assuming that the burn-times are a random sample from a Normal distribution with population mean \(\mu\), carry out a one-tailed t-test at the 1% level using the following null and alternative hypotheses: \(H_0: \mu = 10\), \(H_1: \mu < 10\).
A. Use the rstatix package.
# install.packages("rstatix")
library(rstatix)
## Warning: package 'rstatix' was built under R version 4.5.3
##
## Attaching package: 'rstatix'
## The following object is masked from 'package:stats':
##
## filter
q4_data <- data.frame(Time = c(9.8,9.7,9.1,9.2,9.9,9.1,9.7,10.2,8.8))
q4_data %>%
t_test(Time ~ 1,
mu = 10,
alternative = "less",
conf.level = 0.99)
## # A tibble: 1 × 7
## .y. group1 group2 n statistic df p
## * <chr> <chr> <chr> <int> <dbl> <dbl> <dbl>
## 1 Time 1 null model 9 -3.23 8 0.00598
B. Use the t.test() function.
candles <- c(9.8,9.7,9.1,9.2,9.9,9.1,9.7,10.2,8.8)
t.test(x = candles,mu = 10,alternative = "less",conf.level = 0.99)
##
## One Sample t-test
##
## data: candles
## t = -3.235, df = 8, p-value = 0.005984
## alternative hypothesis: true mean is less than 10
## 99 percent confidence interval:
## -Inf 9.947678
## sample estimates:
## mean of x
## 9.5
What is \(\int \frac{1}{\cos^2(x)} \space dx\)?
# install.packages(c("ggformula","mosaicCalc"))
library(ggformula)
## Warning: package 'ggformula' was built under R version 4.5.2
## Loading required package: ggplot2
## Loading required package: scales
## Loading required package: ggiraph
## Warning: package 'ggiraph' was built under R version 4.5.2
## Loading required package: ggridges
## Warning: package 'ggridges' was built under R version 4.5.2
##
## New to ggformula? Try the tutorials:
## learnr::run_tutorial("introduction", package = "ggformula")
## learnr::run_tutorial("refining", package = "ggformula")
library(mosaicCalc)
## Warning: package 'mosaicCalc' was built under R version 4.5.2
## Registered S3 method overwritten by 'mosaic':
## method from
## fortify.SpatialPolygonsDataFrame ggplot2
##
## Attaching package: 'mosaicCalc'
## The following object is masked from 'package:stats':
##
## D
f <- makeFun(1 / (cos(x))^2 ~ x)
anti_f <- antiD(f(x) ~ x)
anti_f
## function (x, C = 0)
## tan(x) + C