Publications by Habib Khan
Data 605 - Assignment 6
Problem 1 A box contains 54 red marbles, 9 white marbles, and 75 blue marbles. If a marble is randomly selected from the box, what is the probability that it is red or blue? Express your answer as a fraction or a decimal number rounded to four decimal places. prob1 <- 129/138 * 100 prob1 ## [1] 93.47826 Problem 2 You are going to play mini golf...
3767 sym R (1346 sym/29 pcs) 1 img
Indian Politicians and criminal cases
Introduction The dataset was taken from Kaggle’s dataset library. Purpose was to check out how Indian politics looks like overall. This analysis is only for learning purpose and nothing else. ## # A tibble: 129 x 4 ## # Groups: STATE, WINNER [36] ## STATE WINNER `Criminal Cases` Total ## <chr> ...
357 sym R (842 sym/1 pcs) 1 img 1 tbl
Data 605 - Assignment 8
Problem 11 from Page 303 The expected lifetime time is 1000 hours so lambda would be 1/1000. As per the situation, if 100 lightbulbs are bought then 100 x lambda would be 1/10. Expected minimum lifetime is 1/1/10 which is 10 hours. Problem 14 from Page 303 Problem 1 from Page 320 (a) # (a) mu <- 10 sigma_square <- 100/3 sigma_square/2^2 #...
326 sym R (263 sym/8 pcs) 4 img
Data 608 - Project Proposal on COVID-19
Introduction In this project, I am intending to create a dashboard where we can see the number of coronavirus spreading throughout the world. Although at this point I am not sure what visuals I would put in but number of people affected Vs people died, etc. I woulde like to use shiny Apps in R but originally my plan was to create an effective das...
1437 sym R (728 sym/2 pcs) 1 img 1 tbl
Data 605 - Assignment 10
Problem 1 (a) prob_win <- 0.4 minn <- 1 maxx <- 8 prob_loss <- 1 - prob_win timid <- (1 - ((prob_loss/prob_win)^minn)) / (1- ((prob_loss/prob_win)^maxx)) print(paste0("The probability for winning 8 dollars before he losing all his money if he bets 1 dollar each time is ", timid)) ## [1] "The probability for winning 8 dollars before he losi...
231 sym R (828 sym/4 pcs) 1 img
Data 605 - Assignment 11
Question 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. # loading libraries library(tidyr) library(knitr) library(kableExtra) # Creating a copy of cars dataset cars_ds <...
949 sym R (1318 sym/8 pcs) 2 img 1 tbl
Data 605 - Week 14 Discussion
Problem 8.8.3 library(pracma) equation <- function(x){exp(x)} c=0 n=8 taylor(equation, c, n) ## [1] 2.505533e-05 1.961045e-04 1.386346e-03 8.334245e-03 4.166657e-02 ## [6] 1.666667e-01 5.000000e-01 1.000000e+00 1.000000e+00 ...
21 sym R (219 sym/2 pcs)
Data 608 - Final Project
Introduction Pandemics are not new phenomena but it has kept coming in different time period since the beginning of civilization. Who had thought that we had to face a big pandemic after Spanish Flu in 1918. Although there were some epidemics such as Ebola but it was not as contagious as COVID-19 that appeared first in Wuhan, China in December 20...
4965 sym R (14899 sym/34 pcs) 11 img 4 tbl
Data 612 - Project 2
Introduction Start with an existing dataset of user-item ratings, such as our toy books dataset, MovieLens, Jester or another dataset of your choosing. Implement at least two two of these recommendation algorithms: 1- Content-Based Filtering 1.1 User-User Collaborative Filtering 1.2 Item-Item Collaborative Filtering # Loading libraries library...
2892 sym R (2994 sym/17 pcs) 6 img 3 tbl
Do Americans support President Trump's Impeachment?
Introduction In this project, we are going to see if Americans support President Trump’s impeachment inquiry or not. For that purpose, we have taken the data from three different sources i.e. Washington post was scraped to see the road to impeachment, getting data from five thirty eight.com and then tweets were taken from twitter. Reason behin...
5696 sym R (20452 sym/71 pcs) 12 img 3 tbl