Question
1. Import the homework_data excel file into R. 2. Calculate the frequency for the city and gender variables. Copy the table into your homework file
1. Import the homework_data excel file into R.
2. Calculate the frequency for the city and gender variables. Copy the table into your homework file and briefly interpret.
3. Calculate the mean for the bmi variable. Copy the table into your homework file and briefly interpret it.
4. Create a cross-tab showing the relationship between city and gender. Copy the table into your homework file. Briefly interpret. What city has the most females? What city has the least males?
5. Calculate mean bmi by city. Copy the table into your homework file. Which city has the highest BMI? Which city has the lowest BMI?
Include your R code in the bottom of the homework document.
id | bmi | city | gender |
1 | 34 | boston | m |
2 | 40 | boston | m |
3 | 31 | boston | f |
4 | 25 | boston | f |
5 | 32 | lynn | f |
6 | 37 | lowell | f |
7 | 37 | lowell | m |
8 | 28 | worcester | m |
9 | 28 | boston | m |
10 | 39 | lowell | m |
11 | 37 | worcester | m |
12 | 39 | boston | f |
13 | 23 | lowell | f |
14 | 26 | boston | f |
15 | 33 | boston | m |
16 | 28 | lynn | m |
17 | 28 | lowell | m |
18 | 27 | lowell | m |
19 | 33 | worcester | f |
20 | 22 | boston | m |
21 | 39 | lowell | f |
22 | 20 | worcester | m |
23 | 37 | boston | f |
24 | 33 | lowell | f |
25 | 27 | lowell | f |
26 | 29 | lowell | f |
27 | 24 | worcester | f |
28 | 21 | boston | f |
29 | 33 | lowell | m |
30 | 18 | worcester | m |
31 | 36 | boston | m |
32 | 32 | lowell | m |
33 | 26 | boston | m |
34 | 19 | boston | f |
35 | 28 | lynn | f |
36 | 23 | lowell | f |
37 | 22 | lowell | m |
38 | 28 | boston | m |
39 | 18 | lynn | m |
40 | 33 | lowell | m |
41 | 22 | lowell | f |
42 | 26 | worcester | m |
43 | 25 | boston | f |
44 | 28 | lowell | m |
45 | 20 | worcester | f |
46 | 35 | boston | m |
47 | 23 | lowell | f |
48 | 30 | boston | f |
49 | 24 | boston | f |
50 | 38 | lynn | m |
51 | 35 | lowell | m |
52 | 22 | lowell | m |
53 | 28 | worcester | m |
54 | 23 | boston | f |
55 | 22 | lowell | m |
56 | 39 | worcester | f |
57 | 37 | boston | m |
58 | 31 | lowell | f |
59 | 38 | lowell | f |
60 | 23 | lowell | f |
61 | 34 | worcester | f |
62 | 26 | boston | f |
63 | 30 | lowell | f |
64 | 21 | lowell | m |
65 | 33 | lowell | m |
66 | 37 | boston | m |
67 | 31 | boston | m |
68 | 34 | lynn | m |
69 | 38 | lowell | m |
70 | 24 | lowell | m |
71 | 20 | boston | m |
72 | 40 | lynn | f |
73 | 34 | lowell | f |
74 | 19 | lowell | f |
75 | 33 | worcester | m |
76 | 38 | boston | m |
77 | 19 | lowell | m |
78 | 36 | worcester | m |
79 | 21 | boston | f |
80 | 27 | lowell | m |
81 | 35 | lowell | f |
82 | 39 | worcester | m |
83 | 27 | boston | f |
84 | 34 | lowell | m |
85 | 32 | worcester | f |
86 | 35 | boston | f |
87 | 36 | lowell | f |
88 | 19 | lowell | m |
89 | 34 | lowell | m |
90 | 33 | worcester | f |
91 | 26 | boston | f |
92 | 18 | lowell | f |
93 | 23 | lowell | f |
94 | 23 | lowell | f |
95 | 28 | boston | m |
96 | 37 | boston | m |
97 | 35 | lynn | m |
98 | 24 | lowell | m |
99 | 26 | boston | m |
100 | 28 | lowell | m |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started