100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
ISYE-6501 Intro Analytics Modeling - Homework $10.49   Add to cart

Exam (elaborations)

ISYE-6501 Intro Analytics Modeling - Homework

 3 views  0 purchase
  • Course
  • Institution

ISYE-6501 Intro Analytics Modeling - Homework

Preview 2 out of 14  pages

  • March 7, 2022
  • 14
  • 2022/2023
  • Exam (elaborations)
  • Questions & answers
avatar-seller
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)

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller DUKETEST. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $10.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

82191 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$10.49
  • (0)
  Add to cart