Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

STAT1000 Worksheet5 lab, Assignments of Statistics

This is stat1000 worksheet done in labs

Typology: Assignments

2021/2022

Uploaded on 02/01/2023

AnamRizvi
AnamRizvi 🇨🇦

5 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
STAT 1000 - Worksheet 5
Anam Fatima
10-14-2022
Instructions
To complete this assignment, add code as needed into the R code chunks given below. Do not delete the
question text. This is a group worksheet, and you may form a group with your classmates of no more than
three (3) students. Be sure to change the author of this file to reflect the names and student numbers of
your group members.
To properly see the questions, knit this .Rmd file to .pdf and view the output. You will have a link in your
email that takes you to the Crowdmark submission page. Once you have completed the worksheet, knit it
to .pdf and upload your output to Crowdmark. Make sure you properly identify your groupmates through
Crowdmark (it will prompt you).
Questions
1. Import the FHA.csv dataset as a dataframe called FHA. Make sure you are handling the header
correctly. This dataset contains the Heights, Armlengths, and Footlengths of a sample of Grade 12
students across the United States. All measurements are done in centimeters.
FHA <- read.csv("C:/Users/USER/Downloads/FHA (1).csv")
2. Create a scatterplot comparing the students’ foot lengths (X) to their heights (Y). Give appropriate
labels for the x- and y-axes, and overlay the regression line.
plot(FHA$Footlength,FHA$Height,xlab= "FootLength",ylab="Height",main="FootLength VS Height")
1
pf2

Partial preview of the text

Download STAT1000 Worksheet5 lab and more Assignments Statistics in PDF only on Docsity!

STAT 1000 - Worksheet 5

Anam Fatima

Instructions

To complete this assignment, add code as needed into the R code chunks given below. Do not delete the question text. This is a group worksheet, and you may form a group with your classmates of no more than three (3) students. Be sure to change the author of this file to reflect the names and student numbers of your group members.

To properly see the questions, knit this .Rmd file to .pdf and view the output. You will have a link in your email that takes you to the Crowdmark submission page. Once you have completed the worksheet, knit it to .pdf and upload your output to Crowdmark. Make sure you properly identify your groupmates through Crowdmark (it will prompt you).

Questions

  1. Import the FHA.csv dataset as a dataframe called FHA. Make sure you are handling the header correctly. This dataset contains the Heights, Armlengths, and Footlengths of a sample of Grade 12 students across the United States. All measurements are done in centimeters.

FHA <- read.csv("C:/Users/USER/Downloads/FHA (1).csv")

  1. Create a scatterplot comparing the students’ foot lengths (X) to their heights (Y). Give appropriate labels for the x- and y-axes, and overlay the regression line.

plot(FHA$Footlength,FHA$Height,xlab= "FootLength",ylab="Height",main="FootLength VS Height")

FootLength VS Height

FootLength

Height

  1. Determine the coefficients of the least-squares regression equation comparing foot length (X) to height (Y).

lm(FHA$Height ~ FHA$Footlength)

Call:

lm(formula = FHA$Height ~ FHA$Footlength)

Coefficients:

(Intercept) FHA$Footlength

101.643 2.