Publications by Glen Dale Davis
Data 605 - Homework 11
Load Packages: Below, we load the packages required for data analysis and visualization. library(tidyverse) 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)....
2154 sym R (2232 sym/11 pcs) 4 img
Data 606 - Final Project - Proposal
Load the Required Packages: library(plyr) library(tidyverse) library(knitr) library(cowplot) library(RColorBrewer) Data Preparation: NYC OpenData provides a massive dataset of 311 service requests from 2010 to present. After separating their huge .csv file into more manageable chunks using Free Huge CSV Splitter, we load the data into R. As...
6997 sym R (15021 sym/19 pcs) 4 img 4 tbl
Data 607 - purrr Vignette
Load the Required Packages: Below we load the tidyverse library, which includes our library of interest: purrr. We also load the knitr library for displaying simple tables with kable, as well as the cowplot library for creating one grid of many plots with plot_grid. library(knitr) library(tidyverse) library(cowplot) Load the Disney Movies Da...
5840 sym R (5001 sym/19 pcs) 1 img 2 tbl
Data 607 - Week 9
Load the Required Packages: Below, we load the packages required for collecting, cleaning up, and displaying the data. library(tidyverse) library(httr) library(jsonlite) library(DT) Research Question: Looking at the list of National Book Award winners for both Fiction and Nonfiction from 1984 to present, how many of these books were reviewed...
1878 sym R (3999 sym/10 pcs)
Data 605 - Homework 9
Question 1: Pg. 363, Exercise 11: The price of one share of stock in the Pilsdorff Beer Company (see Exercise 8.2.12) is given by \(Y_n\) on the nth 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 = ...
3096 sym
Data 607 - Project 3
Load the Required Packages: Below, the packages required for data analysis and visualization are loaded. library(tidyverse) library(magrittr) library(DBI) library(dbplyr) library(RMariaDB) library(data.table) library(stopwords) library(tidytext) library(RColorBrewer) library(DT) library(MCDA) library(ggwordcloud) library(hrbrthemes) l...
8443 sym R (35683 sym/38 pcs) 6 img
Data 605 - Homework 8
Pg. 303, Ex. 11: A company buys 100 lightbulbs, each of which has an exponential lifetime of 1000 hours. What is the expected time for the first of these bulbs to burn out? (See Ex. 10.) lambda <- 0.001 mu <- 1 / lambda k = 100 expected <- mu / k Expected First Failure: \(10\) hours. Pg. 303, Ex. 14: Assume that \(X_1\) and \(X_2\) are inde...
1835 sym
Data 605 - Homework 7
Question 1: Let \(X_1, X_2, . . . , X_n\) 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 \(X_i\)’s. Find the distribution of \(Y\). \(F(X_i; Y, k) = \frac{X_i - Y + 1}{k - Y + 1}\) Question 2: Your organization owns a copier (futu...
1568 sym
Data 607 - Week 7
Load the Packages: Below, the packages required for data collection and display are loaded. library(tidyverse) library(DT) Load the Data from HTML: Below, we load the data from an HTML source. We isolate the table container and convert it to a dataframe. my_url1 <- "https://raw.githubusercontent.com/geedoubledee/data607_week7/main/data607_week7...
1212 sym R (1558 sym/10 pcs)
Data 605 - Homework 6
format_csn <- function(x){ x <- format(round(as.numeric(x), 0), nsmall=0, scientific=FALSE, big.mark=",") x <- as.character(x) } calc_permutations <- function(n, r){ perm <- factorial(n) / factorial(n - r) perm } calc_permutations_with_repitition <- function(n, r){ perm <- n^r perm } calc_co...
3678 sym