Publications by Bryan Persaud

Data 605 HW 15

16.05.2020

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 ) Solution: dataframe1 <- data.frame(X = c(5.6, 6.3, 7, 7.7, 8.4), Y = c(8.8, 12.4, 14.8, 18.2, 20.8)) model1 <- lm(Y ~ X, data = dataframe1) summary...

7460 sym R (900 sym/4 pcs)

Data 605 HW 14

10.05.2020

This week, we’ll work out some Taylor Series expansions of popular functions. • f(x) = 1 / (1−x) • f(x) = e^x • f(x) = ln(1 + x) 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 a R-Markdown document. Solution: The Taylor Seri...

5314 sym

Data 605 Discussion 14

04.05.2020

Chapter 8 Section 8.8 Exercise 7 In Exercises 7 – 12, find a formula for the nth term of the Taylor series of f(x), centered at c, by finding the coefficients of the first few powers of x and looking for a paƩern. (The formulas for several of these are found in Key Idea 8.8.1; show work verifying these formula.) f(x) = cos x; c = π/2 Soluti...

3011 sym

Data 605 HW 13

03.05.2020

1 Use integration by substitution to solve the integral below. \(\int { 4{ e }^{ -7x }dx }\) Solution: Let u = -7x, then du = -7dx. In terms of dx, dx = \(-\frac { 1 }{ 7 } du\) Rewrite integral in terms of u. \(\int { 4{ e }^{ u }(-\frac { 1 }{ 7 }) du }\) Take out constants. \(-\frac { 4 }{ 7 }\int { { e }^{ u } du }\) Integrate. \(-\frac { 4 }...

4754 sym R (398 sym/6 pcs)

Data 605 Discussion 13

28.04.2020

Chapter 7 Section 7.1 Exercise 13 In Exercises 13 – 20, find the total area enclosed by the functions f and g. \(f(x) = 2x^2 + 5x − 3, g(x) = x^2 + 4x − 1\) Solution: Let’s use R to create two function, f(x) and g(x). function_f <- function(x) { 2 * (x ^ 2) + 5 * x - 3 } function_g <- function(x) { (x ^ 2) + 4 * x - 1 } We ne...

985 sym R (247 sym/3 pcs)

Data 605 HW 12

26.04.2020

who <- read.csv("https://raw.githubusercontent.com/bpersaud104/Data605/master/who.csv") head(who) ## Country LifeExp InfantSurvival Under5Survival TBFree PropMD ## 1 Afghanistan 42 0.835 0.743 0.99769 0.000228841 ## 2 Albania 71 0.985 0.983 0.99974 0.00114312...

2503 sym R (4054 sym/24 pcs) 8 img

Data 605 Discussion 12

22.04.2020

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? Why or why not? I chose to again use the candy dataset fro...

1127 sym R (2674 sym/6 pcs) 2 img

Data 605 HW 11

19.04.2020

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.) Solution: Linear Model linear_model <- lm(dist ~ speed, data = cars) linear_model ## ## Call: ## lm(formula = dist ...

1140 sym R (971 sym/7 pcs) 3 img

Data 605 Discussion 11

15.04.2020

Using R, build a regression model for data that interests you. Conduct residual analysis. Was the linear model appropriate? Why or why not? The data I chose to use is the candy dataset from fivethiryeight. https://github.com/fivethirtyeight/data/tree/master/candy-power-ranking candy <- read.csv("https://raw.githubusercontent.com/fivethirtyeight/d...

666 sym R (1936 sym/6 pcs) 2 img

Data 605 Discussion 10

01.04.2020

Chapter 12 Section 12.1 Exercise 13 Using Stirling’s Formula, prove that \((\frac { 2n }{ n } )\sim \frac { { 2 }^{ { 2 }^{ n } } }{ \sqrt { \pi n } }.\) Solution: Stirling’s Formula is \(n!\sim \sqrt { 2\pi n } { (\frac { n }{ e } ) }^{ n }\) Taking the fornula twice would give us \(n!n!\sim 2\pi n{ (\frac { n }{ e } ) }^{ 2n }\) We can also...

840 sym