



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
This is solved working for assignment 2 in stats 1000
Typology: Assignments
1 / 5
This page cannot be seen from the preview
Don't miss anything!
To complete this assignment, add code as needed into the R code chunks given below, and, where applicable, replace the “ Delete me ” and add in your own text response. Be sure when adding in text responses to never copy-paste symbols from outside of the document. Only use the symbols on your keyboard. Do not delete the question text, or modify any other part of the code except for the “author” in Line 3.
All calculation output must be visible in the final document, and all text responses should be in complete English sentences. When you are done You may speak to your class mates about ideas and what func- tions/optional arguments you may need to use but you may not directly show your code/output to your classmates. To be clear, you may talk as much as you like but you can not look directly at someone else’s completed work, and you cannot share your code with any of your classmates. If you have an issue that you can’t resolve without someone looking at your work (e.g. you get an error when knitting your document), please see the Help Centre in 311 Machray Hall. To compile this document as a PDF to submit or to view your intermediate work/output (I suggest you compile it after every question), click on the knit button above this window.
To properly see the questions, complete the setup and then 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. Also, upload your .Rmd file to Crowdmark where prompted. To see where your .Rmd file is saved, click File > Save As in the top-left of your screen. Make sure you set your Name and Student Number in the Author section of this document (Line 3). Do not alter the title or the date. Please note that if you do not submit a knit .PDF file, you will given a grade of zero.
After you knit your assignment to PDF, check your code chunks. If your code at any point runs off the page, find the nearest comma, click to the right of it, and press Enter (or Return if you are on a Mac). This will force a break in the code so that it goes onto the next line. All of your code must be readable in the final submission.
Your full submission is due by 11:59 p.m. on October 21st. Crowdmark may allow you to submit late, but you will be given an automatic grade of zero. Be sure to change the author of this file to your own name and student ID number. All numerical and graphical answers must be done using R, unless stated otherwise.
KungSan <- read.csv("C:/Users/USER/Downloads/KungSan.csv")
This dataset contains the ages (in years), heights (in centimeters), and weights (in kg) of a sample of children from the Kung San people, a people located in northern Namibia and southern Angola.
The line of code below will shuffle your data, and make the code unique to you. After importing the data, replace 1111111 with your seven-digit student id number in the set.seed function below, and click the green arrow at the top-right hand side of the code chunk. This part is not worth marks, but you will receive a 0 on your assignment if it is not completed correctly. The “echo = FALSE” argument has been added to prevent this code chunk from appearing in your final document.
Make sure you import your data and shuffle it before beginning the assignment questions.
plot(KungSan$Age,KungSan$height,xlab="Age",ylab="Heights",main="Kungsan Data")
Kungsan Data
lm(KungSan$height~KungSan$Age)
Every additional centimeter in one foots length with gain 3.589 in height.
As age increases,height also increases we have gotten a very strong correlation coefficient which means there is strong relationship between age and height and it is positive as age increases height also increases.
As the age increases the height also increases by 3.589 cm
y<- 81.377+3.589* y
y1<- 106 y1-y
y <- 81.377+3.589* y
Yes it is reliable.
The 40 years and a height of 160cm would be influential,because the maximum age we have seen in the table is 16 years old. 40 years would be influential.
cor(KungSan$height,KungSan$weight)
The correlation co-efficent would remain the same as correlation has no units.