Publications by Dirk Hartog

Homework wk7

10.03.2024

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. If we consider that \(Y = y\) then the event that this occurs happens if all n random variables are \(\geq y\) and so the probability th...

3847 sym

Discussion board 7

06.03.2024

Question 14 page 199 On average, only 1/1000 has a particular rare blood type. Find the probability that, in a city of 10,000 people no one has this blood type We can use the Poisson distribution to calculate this probability using \[ p(X = k) \approx \frac {\lambda^{k}}{k!} \cdot e^{-\lambda} \] \[ p(X = 0) \approx \frac {\lambda^{k}}{k!} \cdot ...

1110 sym

Homework wk6

03.03.2024

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? \[ = \begin{pmatrix}5\\ 0\end{pmatrix} * \begin{pmatrix}7\\ 5\end{pmatrix} + \begin{pmatrix}5\\ 1\end{pmatrix} * \begin{pmatrix}7\\ 4\end{pmatrix}\] (choose(5,0) * choose...

4970 sym Python (2983 sym/34 pcs) 1 img

Discussion board 6

28.02.2024

Quesiton 9, pg. 89 Stirling’s approximation provides a powerful tool for approximating the factorial of large numbers with a high degree of accuracy. A more refined inequality for approximating \(n!\) is given by \[ \sqrt{2\pi n}\left(\dfrac{n}{e}\right)^n e^{1/(12n+1)} < n! < \sqrt{2\pi n}\left(\dfrac{n}{e}\right)^n e^{1/(12n)}\] Write a compute...

768 sym R (3203 sym/6 pcs)

Homework wk5

26.02.2024

library(stats) Question 1 (Bayesian). A new test for multinucleoside-resistant (MNR) human immunodeficiency virus type 1 (HIV-1) variants was recently developed. The test maintains 96% sensitivity, meaning that, for those with the disease, it will correctly report “positive” for 96% of them. The test is also 98% specific, meaning that, for tho...

7582 sym R (2041 sym/48 pcs)

Discussion board 5

21.02.2024

Exercise 11 page 36 What odds should a person give in favor of the following events? A card chosen at random from a 52 card deck is an ace Two Heads will turn up when a coin is tossed twice Boxcars (2 6’s) will turn up when two dice are rolled Since we can find the probability of each event \(p(E)\) when can use \(p/(1 -p)\) to find \(r/s\) or ...

765 sym

Homework wk4

19.02.2024

Set up library(doParallel) ## Loading required package: foreach ## Loading required package: iterators ## Loading required package: parallel library(foreach) library(jpeg) library(EBImage) # list.files looks at the folder given in path directory and creates a list of all file names. files=list.files(path='/Users/dirkhartog/Desktop/CUNY_MSDS/DATA_6...

345 sym R (4767 sym/25 pcs) 3 img

Homework wk3

13.02.2024

Problem set 1 1. What is the rank of matrix A? \(\begin{bmatrix} 1 & 2 & 3 & 4\\ -1 & 0 & 1 & 3\\ 0 & 1 & -2 & 1\\ 5 & 4 & -2 & -3 \end{bmatrix}\) First we want to put the matrix into its reduced row echelon form to see how many pivot columns or non - zero rows we have. Steps to get RREF Arref <- A Arref[2,] = Arref[2,] + Arref[1,] Arref[4,] = Ar...

4619 sym

Discussion board 4

12.02.2024

Exercise C16 Pg. 349 Find the Matrix representation of \(T : C^3 \rightarrow C^4 , T\) \[\begin{bmatrix} x\\ y\\ z \end{bmatrix}\] = \[\begin{bmatrix} 3x + 2y +z\\ x+y+z\\ x-3y\\ 2x+3y+z \end{bmatrix}\] ) Using Theorom MLTCV - Matrix Linear Transformation, Column Vectors we can find the matrix representation \(C_1 = T(e_1) =\) [ \[\begin{bmatrix} ...

1079 sym

Homework wk3

12.02.2024

Problem set 1 1. What is the rank of matrix A? \(\begin{bmatrix} 1 & 2 & 3 & 4\\ -1 & 0 & 1 & 3\\ 0 & 1 & -2 & 1\\ 5 & 4 & -2 & -3 \end{bmatrix}\) First we want to put the matrix into its reduced row echelon form to see how many pivot columns or non - zero rows we have. Steps to get RREF Arref <- A Arref[2,] = Arref[2,] + Arref[1,] Arref[4,] = Ar...

4615 sym