Publications by Alec McCabe

Eigenshoes

21.02.2022

Eigenshoes Alec 2/20/2022 Import Libraries library(foreach) ## Warning: package 'foreach' was built under R version 4.1.2 library(jpeg) library(EBImage) ## Warning: package 'EBImage' was built under R version 4.1.1 library(OpenImageR) ## Warning: package 'OpenImageR' was built under R version 4.1.2 ## ## Attaching package: 'OpenImageR' ## The f...

505 sym R (8560 sym/34 pcs) 3 img

605 Homework 6

06.03.2022

library(stringr) Question 1 A bag contains 5 green and 7 red jellybeans. How many ways can 5 jellybeans be withdrawn from the bag so that the number of green ones withdrawn will be less than 2? green_1 <-choose(5,1) * choose(7,4) green_0<-choose(5,0) * choose(7,5) str_interp("There are ${green_0 + green_1} ways to select five jelly beans where ...

3134 sym R (2241 sym/31 pcs)

605 Homework 8

17.03.2022

Question 11 A company buys 100 lightbulbs, each of which has an exponential lifetime of 1000 hours. What is the expected time for the first of these bulbs to burn out? (See Exercise 10.) According to the properties of exponential distribution, if \(Xi∼ Exp(λi)\) then \(min(Xi)∼Exp(Σλi)\) as given: \(E[x]=1000\) We know that \(1/λ=E[x]\) T...

1451 sym R (172 sym/8 pcs)

Relationship between Poverty and Number of Covid Cases

07.04.2022

Basic Analysis into Covid And Poverty Alec 4/6/2022 Load Data data <- read_csv("covid_data_log_200922.csv") head(data) The data above was pulled from Kaggle, and represents various statistics around COVID in the USA. Each observation represents a particular county, and features include the total number of cases, total number of deaths, abnd oth...

2276 sym R (2913 sym/21 pcs) 2 img

Document

02.05.2022

Question 1 Use integration by substitution to solve the integral below. \[\int 4e^{-7x}~dx\] # substitution with u leads the following equation u = -7x du = -7dx dx=du/-7 \[\int 4e^{u}~\frac{du}{-7}\] \[\frac{-4}{7}\int e^{u}~du\] \[\frac{-4}{7}e^{u} + C\] \[\frac{-4}{7}e^{-7x} + C\] Question 2 Biologists are treating a pond contaminated with ...

2289 sym R (516 sym/10 pcs)

605_homework_14

08.05.2022

Taylor Series Expansions For each function, only consider its valid ranges as indicated in the notes when you are computing the Taylor Series expansion. Please submit your assignment as an R- Markdown document. Problem 1 \[f(x) = \frac{1}{1-x} == (1-x)^{-1}\] Solve for first, second, third derivative and evaluate at 0 \[f'(x) = -1*(1-x)^{-2}*-1 ...

1693 sym

605 Homework 15

15.05.2022

Question 1 Find the equation of the regression line for the given points. Round any final values to the nearest hundredth, if necessary. ( 5.6, 8.8 ), ( 6.3, 12.4 ), ( 7, 14.8 ), ( 7.7, 18.2 ), ( 8.4, 20.8 ) x <- c(5.6, 6.3, 7.0, 7.7, 8.4) y <- c(8.8, 12.4, 14.8, 18.2, 20.8) line <- lm(y~x) summary(line) ## ## Call: ## lm(formula = y ~ x) ## #...

2736 sym R (924 sym/8 pcs)

605 Final Exam Part 1

25.04.2022

final_exam Alec 4/12/2022 library(igraph) ## Warning: package 'igraph' was built under R version 4.1.2 library(tidyverse) ## Warning: package 'tidyr' was built under R version 4.1.2 ## Warning: package 'readr' was built under R version 4.1.2 ## Warning: package 'dplyr' was built under R version 4.1.2 library(stringr) Part 1 - Pagerank Step 1 F...

4721 sym R (6263 sym/53 pcs) 34 img

Basic Linear Regression with Cars Dataset

10.04.2022

Using the “cars” dataset in R, build a linear model for stopping distance as a function of speed and replicate the analysis of your textbook chapter 3 (visualization, quality evaluation of the model, and residual analysis.) Loading data data(cars) print(sum(is.na(cars$speed))) ## [1] 0 print(sum(is.na(cars$dist))) ## [1] 0 There are no missi...

1322 sym R (1696 sym/23 pcs) 4 img

Modeling Fitbit Sleep Score

13.04.2022

Question of the Week 12 Alec 4/13/2022 Assignment Overview Using R, build a multiple regression model for data that interests you. Include in this model at least one quadratic term, one dichotomous term, and one dichotomous vs. quantitative interaction term. Interpret all coefficients. Conduct residual analysis. Was the linear model appropriate...

3039 sym R (5310 sym/31 pcs) 6 img