Introduction to Statistics (MAT/SST 115.03 2008S)

R notes for Activity 19-6: Backpack Weights

You can read the data and preview basic information with

Backpack = read.csv("/home/rebelsky/Stats115/Data/Backpack.csv")

As you will find, there are 100 rows in the table, and three columns. The columns are labeled BackpackWeight, BodyWeight, and Sex.

19-6 b: A Ratio Vector

This question asks you to build a vector that represents the ratio of backpack weight to body weight. As you may recall, we can create that vector with

Ratio = Backpack$BackpackWeight/Backpack$BodyWeight

You should be able to figure out the appropriate ways to display these data. If you'd like to get a histogram close to the one in the sample answers, you can use

  breaks=seq(from=-0.008, to=0.20, by=0.015),
  xlab="Ratio of Backpack Weight to Body Weight"
axis(1, seq(from=0,to=0.2,by=0.02)) 
axis(2, seq(from=0,to=20,by=4))

19-6 c: Confidence Intervals

The authors recommend that you compute this confidence interval by hand. However, you may also use t.test.

Creative Commons License

Samuel A. Rebelsky,

Copyright (c) 2007-8 Samuel A. Rebelsky.

This work is licensed under a Creative Commons Attribution-NonCommercial 2.5 License. To view a copy of this license, visit or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.