## 3
83.2
82.9
95.0
57.3
33.4
28.8
37.0
37.3
21.9
16.9
28
## 4
77.8
78.8
94.0
53.0
31.0
26.2
37.0
34.8
23.0
16.6
23
## 5
80.0
82.5
98.5
55.4
32.0
28.4
37.7
38.6
24.4
18.0
22
## 6
82.5
80.1
95.3
57.5
33.0
28.0
36.6
36.1
23.5
16.9
21
##
wgt
hgt sex
## 1 65.6 174.0
1
## 2 71.8 175.3
1
## 3 80.7 193.5
1
## 4 72.6 186.5
1
## 5 78.8 187.2
1
## 6 74.8 181.5
1
# You'll see that for every observation we have 25 measurements,
many of which are either diameters or girths.
# A key to the variable names can be found at
http://www.openintro.org/stat/data/bdims.php, but we'll be
focusing on just
# three columns to get started: weight in kg ( wgt ), height in
cm ( hgt ), and
sex
( 1
indicates male,
0
indicates female).
#Since males and females tend to have different body dimensions,
it will be useful to create two additional data sets:
#one with only men and another with only women.``
mdims
<-
subset
(bdims, sex
==
1
)
fdims
<-
subset
(bdims, sex
==
0
)
# 1.Make a histogram of men's heights and a histogram of women's
heights.
# How would you compare the various aspects of the two
distributions?
hist
(mdims
$
hgt)