Publications by Shane Hylton

DATA 605 Assignment 7

13.03.2022

Question 1 Let X1, X2, . . . , Xn be n mutually independent random variables, each of which is uniformly distributed on the integers from 1 to k. Let Y denote the minimum of the Xi’s. Find the distribution of Y . In general, for \(X_i\) uniformly distributed over the integers from 1 to k, the probability for each segment between one integer to ...

4180 sym R (544 sym/18 pcs)

DATA 605 Assignment 6

07.03.2022

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? In this situation, we can have either 5 reds or 4 reda and one green. There are two different scenarios to look at. The number of choices in the scenario with one green an...

6827 sym

DATA 605 Homework 4--Eigenimagery

21.02.2022

Collaborated with a group of classmates on Slack. We helped one another with debugging and resources. A classmate provided a link to RPubs Loading the Images pic_list <- list.files("jpg", pattern = "\\.jpg")[1:17] Plotting all 17 Images plot_shoes <- function(path, add = FALSE){ pic <- readJPEG(path, native = T) dims <- dim(pic)[2:1] if (...

257 sym R (2501 sym/6 pcs) 2 img

DATA 605 Homework 3

12.02.2022

Problem Set 1 Question 1 \(A = \begin{bmatrix} 1 & 2 & 3 & 4 \\ -1 & 0 & 1 & 3 \\ 0 & 1 & -2 & 1 \\ 5 & 4 & -2 & -3 \end{bmatrix}\). To find the rank, I first need to find the Reduced Row Echelon Form of the matrix. \(\begin{bmatrix} 1 & 2 & 3 & 4 \\ -1 & 0 & 1 & 3 \\ 0 & 1 & -2 & 1 \\ 5 & 4 & -2 & -3 \end{bmatrix} \xrightarrow{5R_2 + R4} \begin...

7242 sym

DATA 605 Assignment 5

02.03.2022

Question 1: \(P(A_k|B) = \frac {P(B|A_k)*P(A_k)}{\sum_{i = 1}^{k}{P(B|A_i)*P(A_i)}}\) In this case, \(A_k\) will represent correct test results. \(P(B|A_{pos}) = 0.96\) \(P(A_{pos}) = 0.001\) \(P(B|A_{neg}) = 0.02\) \(P(A_{neg}) = 0.999\) prob <- ((.96)*(.001))/((.96)*(.001) + (.02)*(.999)) round(prob,3) ## [1] 0.046 Cost: cost <- 100000*(0.001*...

6381 sym R (1727 sym/40 pcs)

DATA 605 Assignment 9

29.03.2022

Question 1 Page 363 Grinstead Probability Question 11: A: \(P(Y_{365}) \geq 100\) This can be represented by a normal distribution. For probabilities less than or equal to a value, we should use pnorm() with lower.tail = FALSE. Note, the variable \(X_n = Y_{n+1} - Y_n\) is the normally distributed variable. This also qualifies for use with the ...

3190 sym R (563 sym/12 pcs)

DATA 605 Final Exam

23.05.2022

Question 1: PageRank PageRank Functionality Verification: Form the A Matrix, Decay, B Matrix As a first note, I do not see how \(r_f = A \times r_i\). The matrices \(A\) and \(r_i\) do not multiply to equal \(r_f\). For the PageRank Algorithm to work properly, the columns of the transition matrix should sum to 1, as is the case in Markov transi...

10169 sym R (40991 sym/177 pcs) 48 img

DATA 605 Assignment 15

16.05.2022

Question 1 Find the equation for the regression line for the points given in points. points <- 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)) reg <- lm(y ~ x, data = points) summary(reg) ## ## Call: ## lm(formula = y ~ x, data = points) ## ## Residuals: ## 1 2 3 4 5 ## -0.24 0.38 -0.20 0.22 -0.1...

3640 sym R (1306 sym/8 pcs) 1 img

DATA 605 Assignment 14

09.05.2022

Taylor Series Approximations \(f(x) = f(a) + \frac{f'(a)}{1!}(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \frac{f'''(a)}{3!}(x-a)^3 + ...\) Question 1 \(f(x) = \frac{1}{1-x}\) Evaluated at a = 0: \(f(x) = 1 + \frac{\frac{d}{dx}(\frac 1{1-x})(0)}{1!}x + \frac{\frac{d^2}{dx^2}(\frac 1{1-x})(0)}{2!}x^2 + \frac{\frac{d^3}{dx^3}(\frac 1{1-x})(0)}{3!}x^3 + \fra...

2685 sym

DATA 605 Assignment 13

02.05.2022

Question 1 \[ \int 4e^{-7x} \,dx \] Let \(u = -7x\). \(du = -7dx \longrightarrow dx = -\frac {du}7\) \[ \int 4e^{u} \,dx \] From the rules of integration with exponential functions, \[ \int -\frac 47 e^{u} \,du = -\frac 47 e^u + c\] Finally, we substitute u out of the equation. \[ \int 4e^{-7x} \,dx = -\frac 47 e^{-7x} + c\] Question 2 Pond Tre...

3759 sym