Publications by sufian
DAT 605 - ASSIGNMENT 3
library(matlib) library(MASS) library(pracma) Prob 1 What is rank of matrix A, using rref R’s built-in function https://www.rdocumentation.org/packages/pracma/versions/1.9.9/topics/rref A1 = matrix(c(1,2,3,4,-1,0,1,3,0,1,-2,1,5,4,-2,-3), nrow = 4, ncol = 4, byrow=T) A1 ## [,1] [,2] [,3] [,4] ## [1,] 1 2 3 4 ## [2,] -...
868 sym R (690 sym/9 pcs) 2 img
DAT 605 - Discussion 5
CHAPTER 1. DISCRETE PROBABILITY DISTRIBUTIONS Page 12 First let fix the convention: 0 = Tails and 1 = Heads library(matlib) library(MASS) library(dplyr) library(ggplot2) # Function to Randomly perform coin toss CoinToss <- function(n=10){ e <- sample(0:1,n,rep=T) e0 <- sum(e==0) print("The no. of Tails :") print(e0) print(...
318 sym R (1690 sym/10 pcs) 4 img
DAT 605 - Discussion 7
Intro to Probability CHAPTER 6. EXPECTED VALUE AND VARIANCE Page 247 Exercise 1 A card is drawn at random from a deck consisting of cards numbered 2 through 10. A player wins 1 dollar if the number on the card is odd and loses 1 dollar if the number if even. What is the expected value of his winnings? |S| = \(\binom{9}{1}\), All possible combo ...
491 sym R (383 sym/6 pcs)
DAT 605 - Discussion 5 - Reply to James M.
CHAPTER 1. DISCRETE PROBABILITY DISTRIBUTIONS Page 12 First let fix the convention: 0 = Tails and 1 = Heads library(matlib) library(MASS) library(dplyr) library(ggplot2) library(patchwork) Response to James Mundy Observations: The first plot checks out in that as n increase, the proportion of heads minus 1/2 approaches zero Similar to Ja...
485 sym R (542 sym/2 pcs) 1 img
DAT 605 - Discussion 7, Response to C Rosemond
Chap 5 Distributions and Densities Pg 222 Same probs performed by C Rosemond but in R prob 25a library(plogr) # Define the Mean and Stdev mean=70 sd=10 x <- seq(-3.5,3.5,length=100)*sd + mean y <- dnorm(x,mean,sd) # Plot x vs. y as a line graph plot(x, y, type="l") polygon(c(x[x>=50], 50), c(y[x>=50], 0), col="red") p50 <- 1-pnorm(50,...
130 sym R (1208 sym/12 pcs) 4 img
DAT 605 - ASSIGNMENT 8
Prob 11 Page 303 from “Intro to Probability Book” Theorem tells us that If Xi ∼ exponential(λi), for i = 1, 2, . . . , n, and X1, X2, . . . , Xn are mutually independent random variables, then min{X1, X2, . . . , Xn} ∼ exponential (\(\sum_{x = 1}^{n} λi\)) E[Xi]=1/λi=1000, so λi=1/1000. Then minXi∼ Exp(λ), with λ=λ1+…+λ100=10...
699 sym 2 img
DAT 605 - Discussion 12
require(ggthemes) library(tidyverse) library(magrittr) library(tidyr) library(dplyr) library(lubridate) library(ggplot2) library(fpp2) library(forecast) library(ggpubr) library(boot) library(plotly) Loading Data Multi regression on video purchases based on sex and amount spent (historical) df <- read.csv(file="Videos.csv", sep=",...
184 sym R (4651 sym/17 pcs) 4 img
DAT 605 - ASSIGNMENT 12
require(ggthemes) library(tidyverse) library(magrittr) library(tidyr) library(dplyr) library(lubridate) library(ggplot2) library(fpp2) library(forecast) library(ggpubr) library(boot) library(plotly) Loading Database url <- "https://raw.githubusercontent.com/ssufian/DAT-605/master/who.csv" #Reading CSV file from Github df <- read....
2221 sym R (10757 sym/46 pcs) 8 img
DAT 605 - ASSIGNMENT 15
require(grDevices) library(Deriv) require(lpSolve) library(cubature) Prob1 # Create the predictor and response variable. x <- c(5.6,6.3,7,7.7,8.4) y <- c(8.8,12.4,14.8,18.2,22.8) relation <- lm(y~x) fit <- lm(y~x) summary(fit) ## ## Call: ## lm(formula = y ~ x) ## ## Residuals: ## 1 2 3 4 5 ## 0.16 0.38 -0...
1707 sym R (3065 sym/25 pcs) 3 img
DAT 612: Week 1 - Discussion 1
Survey Review of a Non-personalized recommender system: Metacritics This survey performs a short description of Metacritic’s history and techniques in its scoring methodology History Metacritic was launched in January 2001[1] by Marc Doyle, his sister Julie Doyle Roberts, and a classmate from the University of Southern California law school, ...
6888 sym 3 img