Publications by Fares A
605_Real_Estate_CT
Q: Using R, build a regression model for data that interests you. Conduct residual analysis. Was the linear model appropriate? Why or why not? A: I chose the real estate sales data set from the State of CT that covers the years 2001-2021 and has 1.05 million real estate sale records. library(readr) library(lubridate) library(ggplot2) library...
4325 sym R (11491 sym/42 pcs) 12 img
605_week11_hm
Exploring the cars data set. data(cars) summary(cars) ## speed dist ## Min. : 4.0 Min. : 2.00 ## 1st Qu.:12.0 1st Qu.: 26.00 ## Median :15.0 Median : 36.00 ## Mean :15.4 Mean : 42.98 ## 3rd Qu.:19.0 3rd Qu.: 56.00 ## Max. :25.0 Max. :120.00 plot(cars$speed, cars$dist, main = "St...
1498 sym 4 img
Sentiment analysis - Depression vs No Depression
Starting with the base code in Chapter 2 of the book “Text Mining with R” by Silge and Robinson in their analysis on sentiment analysis (Silge & Robinson, n.d.): Silge, J., & Robinson, D. (n.d.). Sentiment analysis. In Text Mining with R: A Tidy Approach. Retrieved March 31, 2024, from https://www.tidytextmining.com/sentiment.html library(ti...
4279 sym R (21107 sym/73 pcs) 9 img
605_Ch11-Ex22
Taking on exercise 22 at the end of chapter 11 (page 469): Problem: Show that if \(P\) is the transition matrix of a regular Markov chain, and \(W\) is the matrix each of whose rows is the fixed probability vector corresponding to \(P\), then \(PW = W\), and \(W^k = W\) for all positive integers \(k\). Solution: First, to define the transitio...
731 sym
605_M10_HW
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 probability that he wins 8 dollars before losing all of his money if: (a) he bets 1 dollar each time (ti...
2893 sym
607_week9HW_APIs
library(httr) library(jsonlite) library(dplyr) library(tibble) From the NYT API page on Books and Book Reviews, it seems I can access the Best Seller List after specifying a genre: # creating my API request url url1 <- paste0("https://api.nytimes.com/svc/books/v3/lists/current/hardcover-fiction.json?api-key=", api_key) # making the API reque...
1094 sym R (6953 sym/16 pcs)
605_Week9_HW
Q: The price of one share of stock in the Pilsdorff Beer Company 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 having mean mu = 0 and variance sqrt(sigma) = 1=4. If Y1 = 100, estimate the probability that Y365 is (a) >= 100. (b...
2295 sym R (1571 sym/14 pcs)
607_Project3_Team4
Packages library(RMySQL) library(DBI) library(dplyr) library(tidyverse) library(ggplot2) Bringing the data from SQL to R Connection to the SQL Server Importing the DB # retrieving sql_query <- " SELECT jp.posting_id, jp.URL, jp.first_seen, jp.last_processed, jpswd.skills_id, jpswd.skills_desc, t.title_desc, ct.city_desc, cn.cou...
7861 sym R (13224 sym/41 pcs) 6 img
605_HW8
Exercise 11 on page 303 of the intro to probbability book. A company buys 100 light bulbs, each of which has an exponential lifetime of 1000 hours. What is the expected time for the rst of these bulbs to burn out? (See Exercise 10.) (exercise 10 was: Let X1, X2, . . . , Xn be n independent random variables each of which has an exponential densi...
6206 sym 2 img
607_Project 3 - Team 4
Packages library(RMySQL) library(DBI) library(dplyr) library(tidyverse) library(ggplot2) Connection to the SQL Server Importing the DB # retrieving sql_query <- " SELECT jp.posting_id, jp.URL, jp.first_seen, jp.last_processed, jpswd.skills_id, jpswd.skills_desc, t.title_desc, ct.city_desc, cn.country_desc, jl.j...
1663 sym R (10346 sym/31 pcs) 9 img