AllBestEssays.com - All Best Essays, Term Papers and Book Report
Search

Week one Assignment Descriptive Statistics

Essay by   •  March 1, 2019  •  Essay  •  282 Words (2 Pages)  •  755 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:

#1

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

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

task_data

Sepal.Width <- task_data$Sepal.Width

mean(Sepal.Width)

median(Sepal.Width)

sd(Sepal.Width)

min(Sepal.Width)

max(Sepal.Width)

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

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

#2

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

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

head(height_weight)

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

head(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 AllBestEssays.com
Citation Generator

(2019, 03). Week one Assignment Descriptive Statistics. AllBestEssays.com. Retrieved 03, 2019, from https://www.allbestessays.com/essay/Week-one-Assignment-Descriptive-Statistics/71543.html

"Week one Assignment Descriptive Statistics" AllBestEssays.com. 03 2019. 2019. 03 2019 <https://www.allbestessays.com/essay/Week-one-Assignment-Descriptive-Statistics/71543.html>.

"Week one Assignment Descriptive Statistics." AllBestEssays.com. AllBestEssays.com, 03 2019. Web. 03 2019. <https://www.allbestessays.com/essay/Week-one-Assignment-Descriptive-Statistics/71543.html>.

"Week one Assignment Descriptive Statistics." AllBestEssays.com. 03, 2019. Accessed 03, 2019. https://www.allbestessays.com/essay/Week-one-Assignment-Descriptive-Statistics/71543.html.