Publications by Jordan Glendrange

Data 605 Homework 10

01.11.2021

Problem 1 Smith is in jail and has 1 dollar; he can get out on bail if he has 8 dollars. A guard agrees to make a series of bets with him. If Smith bets A dollars, he wins A dollars with probability .4 and loses A dollars with probability .6. he bets 1 dollar each time (timid strategy). To solve this problem we need to understand the probabilit...

1280 sym R (101 sym/4 pcs)

Homework 6 Data 605

03.10.2021

Problem 1 There are 2 scenarios here. We pick 5 red jellybeans from 7 and 0 green from 5, and 4 red jellybeans from 7 and 1 green from 5. Adding the two up gives us 196 permutations. greenUnder2 <- choose(5,0)*choose(7,5) + choose(5,1)*choose(7,4) greenUnder2 ## [1] 196 The probability we choose 5 jelly beans with less than 2 green ones is around...

1132 sym R (1023 sym/28 pcs)

Homework 5 Data 605

27.09.2021

Problem 1 Bayes Theorem: \[ P(A|B) = \frac{P(B|A)P(A)}{P(B)}\] P_positive_hiv = 0.96 P_hiv = 0.001 P_positive_nonhiv = 1 - 0.98 P_nonhiv = 1 - P_hiv P = (P_positive_hiv * P_hiv) / ((P_positive_hiv * P_hiv) + (P_positive_nonhiv * P_nonhiv)) P ## [1] 0.04584527 According to the theorem the probility the person has HIV is 4%. Since we know the prev...

2570 sym R (1303 sym/40 pcs)

Data 605 Homework 3

13.09.2021

library(pracma) Problem 1.1 What is the rank of the matrix A? To answer this question I am going to convert A into it’s reduced row echelon form. I worked this out on paper, but instead of writing each step out here I will use the useful R funciton rref(). The number of pivot columns will inform us of the rank. A <- matrix(c(1,2,3,4,-1,0,1,3,0...

3286 sym R (1769 sym/23 pcs)

Homework 4

19.09.2021

Reading Files This code is dedicated to read in all of the JPEGs and getting them into a format where we can calculate the Eigen Values. files <- list.files(path="jpg/") height = 120 width = 250 par(mfrow=c(1,1)) newtemp=array(rep(0,length(files)*height*width*3), dim=c(length(files), height, width,3)) for (i in 1:length(files)) { path = past...

468 sym R (3035 sym/9 pcs) 2 img

Data 605 Homework 7

11.10.2021

Page 303 Problem 11 Problem 10 in the book tells us that the density for the minimum value has mean of mu/n. In this case is 1,000 hours and n is the number of light bulbs: 100. So the expected time for the first of these bulbs is 10 hours. mu <- 1000 n <- 100 mu/n ## [1] 10 Page 303 Problem 14 \[ f_{X_{1}}(x) = f_{X_{2}}(x) = \begin{cases} ...

1041 sym R (249 sym/10 pcs)

Homework 7 Data 605

17.10.2021

Problem 1 We can express the distribution of Y with 1 - the remainder of values in n \[P(x \leq Y) = 1 - P(x > Y)\] Now lets find the function to describe P(x > Y). \[P(x > Y) = (\frac{k-y}{k})^n\] This gives us \[P(x \leq Y) = 1 - (\frac{k-y}{k})^n\] Problem 2 Geometric Probability p_fail <- 1/10 p_nfail <- 1 - p_fail n <- 8 px = p_nfail^(n-...

575 sym R (613 sym/24 pcs)

Data 605 Homework 9

25.10.2021

Problem 1 Here we calculate how many games we would win by multiplying the total number of games by the probability to win. n <- 240 p <- 1/4 q <- 1-p stdev <- sqrt(n*p*q) win <- n*p lose <- n - win c(win, lose) ## [1] 60 180 Since we want to know how much money we would win or lose we take the total number of games won and multiply it by $2 ...

1693 sym R (240 sym/8 pcs)

Data 605 Homework 12

15.11.2021

library("tidyverse") ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ── ## ✓ ggplot2 3.3.5 ✓ purrr 0.3.4 ## ✓ tibble 3.1.4 ✓ dplyr 1.0.7 ## ✓ tidyr 1.1.3 ✓ stringr 1.4.0 ## ✓ readr 2.0.1 ✓...

1019 sym R (4729 sym/23 pcs) 2 img

Data 605 Homework 13

22.11.2021

Problem 1 \[ \int 4e^{-7x} \] \[ = -\frac{1}{7} * 4e^{-7x} \] \[ = -\frac{4}{7} * e^{-7x} \] Problem 2 First we solve for N(t). I re-write the function as: \[ \frac{dN}{dt} = 3,150 *t^{-4} - 220 \] \[ N(t) = -\frac{1}{5}* 3,150 *t^{-5} - 220t + C \] Now we need to solve for C \[ 6530 = -630 -220+C \] \[ C = 7,380 \] Now we plug in C \[ N(t) = -6...

1991 sym