- All Best Essays, Term Papers and Book Report

Week one Assignment Descriptive Statistics

Essay by   •  March 1, 2019  •  Essay  •  282 Words (2 Pages)  •  40 Views

Essay Preview: Week one Assignment Descriptive Statistics

Report this essay
Page 1 of 2

Week One Assignment

Descriptive Statistics

ALY 6015 21284 Intermediate Analytics

Date: 2019/01/13

Q1: Set the working directly to the location of the file, and import the dataset using R code. Using descriptive statistics, visualize this data numerically and graphically.

[pic 1]

  1. Summary statistics (mean, median, standard deviation, min, max, Q1, and Q3) for variable “Sepal.Width”

[pic 2]

  1. Create a histogram for “Sepal.Width”

[pic 3]

[pic 4]

Q2: Using height_weight_bygender.csv data file, plot a histogram of men’s and women’s height.

[pic 5]

  1. The histogram of men's height

[pic 6]

[pic 7]

  1. The histogram of women's height

[pic 8]

[pic 9]

Q3: Using the height_weight_byGender.csv file, plot a scatterplot of height by weight for either men or women using the plot function.

[pic 10]

  1. The scatterplot of height by weight for men

[pic 11]

  1. The scatterplot of height by weight for women

[pic 12]

Q4: What is an example of a statistical inference question we may ask next?

I want to ask what is the significant correlation between height and weight for either men or women, and can we describe them by R function?

[pic 13]

  1. R output

[pic 14]

From the results, we can see that there is indeed a correlation between height and weight and the correlation coefficient is higher for men than for women.

R Code:


setwd('/Users/jonas/Desktop/Informatics/Intermediate Analytics/Week 1')

task_data <- read.csv('assignment1.csv', header = TRUE)


Sepal.Width <- task_data$Sepal.Width






quantile(Sepal.Width, probs = c(0.25,0.75))

hist(Sepal.Width, main = "The Histogram of Sepal.Width")


setwd('/Users/jonas/Desktop/Informatics/Intermediate Analytics/Week 1')

height_weight <- read.csv('height_weight_by_gender.csv', header = TRUE)


male <- subset(height_weight, height_weight$X...Gender == "Male")


hist(male$Height..inches.,main = "The Histogram of Men's Height")



Download as:   txt (2.5 Kb)   pdf (708.1 Kb)   docx (744.8 Kb)  
Continue for 1 more page »
Only available on
Citation Generator

(2019, 03). Week one Assignment Descriptive Statistics. Retrieved 03, 2019, from

"Week one Assignment Descriptive Statistics" 03 2019. 2019. 03 2019 <>.

"Week one Assignment Descriptive Statistics.", 03 2019. Web. 03 2019. <>.

"Week one Assignment Descriptive Statistics." 03, 2019. Accessed 03, 2019.