Publications by Kossi Akplaka

Homework 7

10.03.2024

Exercise 1 Let X1, X2, . . . , Xn 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 Xi’s. Find the distribution of Y Answer: \[ \begin{align*} P(Y \leq y) & = 1 - P(Y > y) \\ & = 1 - P(\min\{X_1, X_2, \ldots, X_n\} > y) \\ &...

3607 sym

Story 3 Data 608

04.03.2024

In this story, I’ll use CDC API to retrieve firearm mortality data for each state per 100,000 persons. Then, after categorizing gun control laws per states, we’ll create a 5-point Likert scale categorizing gun control laws from most lax to strictest. The goal of the story is to answer if stricter firearm control laws help reduce firearm mor...

13192 sym 2 img 1 tbl

Week 6 Data 605

03.03.2024

library(tidyverse) ## Warning: package 'ggplot2' was built under R version 4.3.2 library(openintro) Question 1 A bag contains 5 green and 7 red jellybeans. How many ways can 5 jellybeans be withdrawn from the bag so that the number of green ones withdrawn will be less than 2? # Calculate combinations when 0 or 1 green jellybeans are chosen gree...

4933 sym Python (2673 sym/27 pcs)

Week 5 Data 605

25.02.2024

Question 1: # Prevalence Rate Rate <- 0.001 # Sensitivity P_Pos_Dis <- 0.96 # Specificity P_Neg_notDis <- 0.98 P_Pos_notDis <- 1 - P_Neg_notDis # Probability of testing positive P_Pos <- P_Pos_Dis * Rate + P_Pos_notDis * (1 - Rate) # Probability of having the disease given a positive test P_D_Pos <- P_Pos_Dis * Rate / P_Pos # Median c...

5382 sym

Assignment4

19.02.2024

Load libraries library(tidyverse) library(jpeg) # For reading JPEG files library(reshape2) # For data manipulation library(pracma) # For eigenvector calculation library(OpenImageR) Read the data file_paths <- list.files( path = "C:/Users/akpla/Documents/data605/Assignment_4/jpg", pattern = "*.jpg", full.names = TRUE) images <- lappl...

1923 sym

Story 2

19.02.2024

library(tidyverse) library(fredr) library(ggplot2) library(plotly) Data using API In this story, I’ll use FRED API Key to get and load the data fredr_set_key("f7e805d1fb29e39764c10eb3feccac31") # Get data for the last 25 years end_date <- Sys.Date() start_date <- end_date - 25 * 365 # Retrieve data from FRED API cpi <- fredr(series_i...

10967 sym Python (2987 sym/8 pcs) 4 img

Story 1

04.02.2024

Introduction The purpose of this data visualization analysis is to examine the allocation of funds across States and Territories in the United States. We will assess whether the allocation is equitable based on population and explore any potential biases favoring the political interests of the Biden administration. Data Analysis Import Librari...

12529 sym 3 img 3 tbl

Document

30.11.2023

Abstract In this project, I conducted a thorough analysis of reported crimes from the New York Police Department dataset (2006-2022), focusing on offenses related to dangerous drugs and weapons. After filtering the data to include incidents reported between January 1, 2021, and December 31, 2022, and refining it to only include “DANGEROUS DRU...

30393 sym 4 img

Project4

26.11.2023

Load libraries library(tm) library(caret) library(tidyverse) library(e1071) Introduction The goal of the project is to classify new documents using already classified “training” documents. First, the full ham/span dataset was downloaded from this website https://spamassassin.apache.org/old/publiccorpus/ From the many datasets on the websi...

2803 sym R (3640 sym/19 pcs) 2 img

Assignment10

12.11.2023

Load the libraries library("tibble") library("tidyverse") library("tidytext") library("textdata") library("slam") library('tm') library("lexicon") #"SentiWordNet" Getting the primary example code from chapter 2 of the textbook Sentiment analysis is a very exited topic and can allow us to understand text better. The second chapter of the b...

12849 sym 3 img