Publications by Jimmy Ng
data 605: multiple linear regression
Code Show All Code Hide All Code data_605_hw12 data_605_hw12 Setup Q1 Q2 Q3 Q4 Q5 Jimmy Ng 11/10/2021 The attached who.csv dataset contains real-world data from 2008. The variables included follow. Country: name of the country LifeExp: average life expectancy for the country in years InfantSurvival: proportion of those surviving to one y...
3328 sym R (5362 sym/23 pcs) 6 img
data 605: discussion 11
R Markdown This is a random data set that I pull from Kaggle. It contained a list of the top trending videos on YouTube from the US in a random day back in 2017. I want to build a linear regression model to see if number of likes can be predicted by views. library(tidyverse) ## Warning: package 'tidyverse' was built under R version 3.6.3 ## -- At...
706 sym R (3419 sym/26 pcs) 2 img
data 605: linear regression
Code Show All Code Hide All Code data_605_hw11 data_605_hw11 Jimmy Ng 11/4/2021 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). First, let’s load the data and take ...
1224 sym R (2529 sym/15 pcs) 6 img
data 605: Markov Chain
Code Show All Code Hide All Code data_605_hw10 data_605_hw10 (a) (b) (c) Jimmy Ng 10/27/2021 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. Find the probab...
1053 sym R (1320 sym/6 pcs)
data 605: Moment Generating Function
Code Show All Code Hide All Code data_605_hw9 data_605_hw9 Q1 Q2 Q3 Jimmy Ng 10/21/2021 Q1 The price of one share of stock in the Pilsdorff Beer Company (see Exercise 8.2.12) is given by Yn on the nth day of the year. Finn observes that the differences Xn = Yn+1 − Yn appear to be independent random variables with a common distribution ...
2802 sym R (799 sym/6 pcs)
data 605: HW2 LU Decomposition JN
Code Show All Code Hide All Code data_605_hw2 data_605_hw2 HW2 (1) Problem Set 1.1 (2) Problem Set 1.2 (3) Problem Set 2: Matrix Factorization Jimmy Ng 9/3/2021 HW2 (1) Problem Set 1.1 step 1 Prove the following \[ { A }^{ T }A \neq A{ A }^{ T } \] Suppose we have matrix A and its transpose \[ A=\begin{bmatrix} a & b \\ c & d \end{b...
2474 sym R (2329 sym/2 pcs)
data 605: HW1 image processing JN
Code Show All Code Hide All Code data_605_hw1 data_605_hw1 HW1 (1) Matrix Multiplication (2) Animated output Jimmy Ng 8/26/2021 HW1 "One of the most useful applications for linear algebra in data science is image manipulation. We often need to compress, expand, warp, skew, etc. images. To do so, we left multiply a transformation matrix b...
1229 sym R (3236 sym/24 pcs) 8 img
data 605: HW3 Rank, Eigenvector, Eigenvalue
Code Show All Code Hide All Code data_605_hw3 data_605_hw3 HW3 (1) What is the rank of the matrix A? (2) Given an mxn matrix where m > n, what can be the maximum rank? The minimum rank, assuming that the matrix is non-zero? (3) What is the rank of the matrix B? (4) Compute the eigenvalues and eigenvectors of the matrix A. Jimmy Ng 9/8/202...
3762 sym R (1380 sym/18 pcs)
data 605: HW5 Probability
Code Show All Code Hide All Code data_605_hw5 data_605_hw5 Question 1 (Bayesian) Question 2 (Binomial) Question 3 (Poisson) Question 4 (Hypergeometric) Question 5 (Geometric) Question 6 Question 7 Question 8 Jimmy Ng 9/23/2021 Question 1 (Bayesian) A new test for multinucleoside-resistant (MNR) human immunodeficiency virus type 1 (HIV-1)...
4585 sym R (10177 sym/56 pcs) 2 img
data 605: HW6 Combination, Permutation
Code Show All Code Hide All Code data_605_hw6 data_605_hw6 Question 1 Question 2 Question 3 Question 4 Question 5 Question 6 Question 7 Question 8 Question 9 Jimmy Ng 9/27/2021 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 b...
4194 sym R (6280 sym/22 pcs)