Assignment work
Statistics for Data Science
Week 1
Assignment 1
Drills with R on importing and plotting data, and finding the distribution measures
Provide in the plain text R commands that finds/solves the following:
1. The student directory for a large university has 400 pages with 130 names per page, a total of 52,000 names. Using software, show how to select a simple random sample of 10 names.
2. From the Murder data file, use the variable murder, which is the murder rate (per 100,000 population) for each state in the U.S. in 2017 according to the FBI Uniform Crime Reports. At first, do not use the observation for D.C. (DC). Using software:
a. Find the mean and standard deviation and interpret their values.
b. Find the five-number summary, and construct the corresponding boxplot.
c. Now include the observation for D.C. What is affected more by this outlier: The mean or the median?
3. The Houses data file lists the selling price (thousands of dollars), size (square feet), tax bill (dollars), number of bathrooms, number of bedrooms, and whether the house is new (1 = yes,0 = no) for 100 home sales in Gainesville, Florida. Let’s analyze the selling prices.
a. Construct a frequency distribution and a histogram.
b. Find the percentage of observations that fall within one standard deviation of the mean.
c. Construct a boxplot.
Datasets needed are at Index of Data Sets
Useful functions in R to solve problems in this assignment: sample, read.table, mean, sd, summary, boxplot, hist, table, cbind, length, case, tapply
Project 1: Data quality issues
This project is mostly based on issues with data quality: see more carefully chapter 2 Data and Sampling Distributions from ‘Practical Statistics for Data Scientists’. Cover in the project the following:
1. Explain figures 2.5 and 2.6 on page 38.
2. Discuss the following:
a. How can you tell if the data is an outlier or if it is something important?
b. Which data is the noise and how is the noise different from outliers?
3. When there are missing values, explain the pros and cons of the following strategies:
a. Elimination of Data Objects
b. Estimation of Missing Values
4. What are the limitations of analyzing real data with missing values and why is it impossible to really know such data?