Publications by Abdelmalek Hajjam
Discussion-2-605
Chap D, M10, p:271 Find a value of k so that the matrix \[ A= \left[ \begin{array}{cccc} 2 & 4 \\ 3 & k \\ \end{array} \right] \\ \] has det(A) = 0. Solution det(A) = (2)(k) - (4)(3) so det(A) = 0 implies 2k - 12 = 0 which mean 2k = 12 hence k=6. So the det(A) = 0 if and only if k=6 ...
309 sym
Data 605 - Assignment1
Problem Set 1: Please notice that I will not be using any external library to do linear algebra for me. Everything I will use is in R Base and it’s well documented in R documentation. Also notice that I show 2 diffeent ways to run an answer. I comment one and I use the other. But both of them will work. Example - dot product of u and v, accord...
971 sym R (1120 sym/13 pcs)
605-Discussion-3
C12 Page 298 Find the characteristic polynomial of the matrix: \(A = \left[ \begin{array}{cccc} 1 & 2 & 1 & 0 \\ 1 & 0 & 1 & 0 \\ 2 & 1 & 1 & 0 \\ 3 & 1 & 0 & 1 \\ \end{array} \right] \\ \) The characteristic polynomial of square matrix \(A\) is defined as \(f_A(\lambda)=det(A−\lambda I)\) \((A−\lambda I)\) = \(A = \left[ \begin{array...
1332 sym R (407 sym/4 pcs)
Data605 - Discussion 5
Exercise 1 page 22 a. Modify the program CoinTosses to toss a coin n times and print out after every 100 tosses the proportion of heads minus 1/2. Do these numbers appear to approach 0 as n increases? b. Modify the program again to print out, every 100 times, both of the following quantities: the proportion of heads minus 1/2, and the number of h...
457 sym R (19961 sym/4 pcs)
QWeek7
library(leaps) library(ISLR) regfit.full=regsubsets(Salary~.,data=Hitters) summary(regfit.full) ## Subset selection object ## Call: regsubsets.formula(Salary ~ ., data = Hitters) ## 19 Variables (and intercept) ## Forced in Forced out ## AtBat FALSE FALSE ## Hits FALSE FALSE ## HmRun FALS...
5 sym R (2385 sym/2 pcs)
Data605-Assignment9
Problem 1: Chapter 9.3 Exercise 11 The price of one share of stock in the Pilsdorff Beer Company is given by \(Y_n\) on the \(n\)th day of the year. Finn observes that the differences \(X_n = Y_{n+1} - Y_n\) appear to be independent random variables with a common distribution having mean \(\mu = 0\) and variance \(\sigma^2 = 1/4\). If \(Y_1 = 100...
2815 sym R (1477 sym/6 pcs)
Data605-Discussion10
Chapter 11 - Page 423, Exercise 8 In Example 11.13 (Drunkard’s Walk) of this section, assume that the probability of a step to the right is 2/3, and a step to the left is 1/3. Find N, Nc, and NR. Compare these with the results of Example 11.15. Looking for N: library(matlib) ## This version of Shiny is designed to work with 'htmlwidgets' >= 1....
303 sym R (1191 sym/16 pcs)
Data 605 - Discussion Week12
Data downloaded from the book site # Read the data from the csv file. processors <- read.csv("all-data.csv") ################################################################ # # This function returns the data from the desired column. # Example: clock<-get_column("Fp2000","Processor.Clock..MHz.") get_column <- function(x,y) { # x = stri...
1248 sym R (4202 sym/7 pcs) 2 img
Data605-Discussion13
I am using salary data that include observations on six variables for 52 tenure-track professors in a small college. Data is found in : https://data.princeton.edu/wws509/datasets/#salary Data description, vaiables and download are all in the above site. The variables are: sx: Sex, coded 1 for female and 0 for male rk: Rank, coded 1 for assistant...
2265 sym R (7085 sym/22 pcs) 2 img 1 tbl
Data605 - Assignment 12
Loading data library(ggplot2) library(tidyverse) library(kableExtra) who <- read.csv("who.csv", header = T) kable(head(who)) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = F) Country LifeExp InfantSurvival Under5Survival TBFree PropMD PropRN PersExp GovtExp TotExp Afghanistan ...
4163 sym R (4343 sym/22 pcs) 6 img 1 tbl