Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

ISYE-6501 Intro Analytics Modeling - Homework

Rating
-
Sold
-
Pages
14
Grade
A+
Uploaded on
07-03-2022
Written in
2022/2023

ISYE-6501 Intro Analytics Modeling - Homework

Institution
Course

Content preview

GATech OMS - Intro Analytics Modeling - ISYE-6501

Week3 - Homework 3

Carlos André da Costa Sol

September 10th, 2019

Question 5.1

Using crime data from the file uscrime.txt
(http://www.statsci.org/data/general/uscrime.txt, description at
http://www.statsci.org/data/general/uscrime.html), test to see whether there are any
outliers in the last column (number of crimes per 100,000 people). Use the
grubbs.test function in the outliers package in R.

Answer:

Firstly, I explore data using summary, p-value and box-plot graph.

The summary of this column (df$Crime) is:

summary(df$Crime)

Min. 1st Qu. Median Mean 3rd Qu. Max.

342.0 658.5 831.0 905.1 1057.5 1993.0

The p-value is: 0.07887486

The Box-plot graph shows some potential outliers:

, Then, using Grubbs test to realize about the outlier, it shows that the highest value
1993 is an outlier.
Grubbs test for one outlier

data: crimes
G = 2.81287, U = 0.82426, p-value = 0.07887
alternative hypothesis: highest value 1993 is an outlier


Ansd also, exploring the column data again, we see that 1993 is the clearest outlier,
with 1969 being a close second.

> df$Crime[0:10]

[1] 791 1635 578 1969 1234 682 963 1555 856 705




Code:

File HW3_V5.R question 5.1 has complete code to solve the case. And is copied
here.

find_outlier = function(data, col_x){

#test to see whether there are any outliers in the last column (number of crimes per
100,000 people)

crimes <- as.numeric (col_x)

crime_result <- grubbs.test(crimes)



return (crime_result)

}



df <- read.delim("~/Homework/L5-6/HW3/uscrime.txt", header=TRUE)

#find and see outlier

auxr <- find_outlier(df, df$Crime)

# Verify statiscts summary and visualize

summary(df$Crime)

plot(df$Crime)

Written for

Course

Document information

Uploaded on
March 7, 2022
Number of pages
14
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$10.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
DUKETEST Miami Dade College
Follow You need to be logged in order to follow users or courses
Sold
412
Member since
5 year
Number of followers
390
Documents
0
Last sold
1 year ago
PATOCUTIE ACADEMICS

Get everything you need,NO STRESS

4.5

153 reviews

5
124
4
6
3
11
2
4
1
8

Trending documents

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions