5. Choose one discrete quantitative variable from the 'crime' data frame. (a) Then make a frequency table. (b) Then visualize into a bar graph.   Use Rstudio  you have to do the manual method

MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
icon
Related questions
Question

5. Choose one discrete quantitative variable from the 'crime' data frame.

(a) Then make a frequency table.
(b) Then visualize into a bar graph.

 

Use Rstudio

 you have to do the manual method

Campus_Crime
Number of Crimes Number of Police Total Enrollment
Private School
64
12
1,131
1
138
21
12,954
141
32
16,009
84
22
1,682
1
86
35
2,888
1
141
45
17,407
135
42
3,028
174
50
4,306
1
201
75
34,511
203
84
37,240
125
36
2,918
1
234
109
39,414
143
45
4,000
1
148
50
20,950
152
48
4,277
1
158
52
26,519
174
69
27,687
84
26
2,810
173
58
27,619
193
56
4,563
1
Transcribed Image Text:Campus_Crime Number of Crimes Number of Police Total Enrollment Private School 64 12 1,131 1 138 21 12,954 141 32 16,009 84 22 1,682 1 86 35 2,888 1 141 45 17,407 135 42 3,028 174 50 4,306 1 201 75 34,511 203 84 37,240 125 36 2,918 1 234 109 39,414 143 45 4,000 1 148 50 20,950 152 48 4,277 1 158 52 26,519 174 69 27,687 84 26 2,810 173 58 27,619 193 56 4,563 1
Variable Name
Description
Type (In Data File)
Measure (Actual)
Value labels
ids
ID number
Numeric
Nominal
bday
Date of birth (mm/dd/yyyy)
Date, mm/dd/yyyy
Scale
enrolldate
Date of college enrollment (mm/dd/yyyy)
String
Scale
expgradate
Expected date of college graduation (mm/dd/yyyy)
String
Scale
Rank
Class rank
Numeric
Ordinal
1=Freshman
2=Sophomore
3=Junior
4=Senior
Major
Major
String
Nominal
Gender
Gender
Numeric
Nominal
0=Male
1=Female
Is student an athlete?
0 = Non-athlete
1 = Athlete
Athlete
Numeric
Nominal
Height
Height (inches)
Numeric
Scale
Weight
Weight (pounds)
Numeric
Scale
0 = Nonsmoker
1 = Past smoker
2 = Current smoker
Smoking
Does student smoke?
Numeric
Nominal
Sprint
35-meter sprint time (seconds)
Numeric
Scale
MileMinDur
Mile run time (hh:mm:ss)
Datetime
Scale
English
Score on English placement test (out of 100 points)
Numeric
Scale
Reading
Score on Reading placement test (out of 100 points) Numeric
Scale
Math
Score on Math placement test (out of 100 points)
Numeric
Scale
Writing
Score on Writing placement test (out of 100 points)
Numeric
Scale
State
Is student in-state or out-of-state resident?
String
Nominal
Does student live on campus?
0 = Off-campus
1 = On-campus
LiveOnCampus
Numeric
Nominal
How does student commute to campus?
1 = Walk
2 = Bike
3 = Car
4 = Public transit
HowCommute
Numeric
Nominal
5 = Other
How long does it take you to commute to campus?
(minutes)
CommuteTime
Numeric
Scale
About how many hours of sleep do you get per
night?
SleepTime
Numeric
Scale
StudyTime
About how many hours per week do you study?
Numeric
Scale
Student Sample Dataset Codebook
Transcribed Image Text:Variable Name Description Type (In Data File) Measure (Actual) Value labels ids ID number Numeric Nominal bday Date of birth (mm/dd/yyyy) Date, mm/dd/yyyy Scale enrolldate Date of college enrollment (mm/dd/yyyy) String Scale expgradate Expected date of college graduation (mm/dd/yyyy) String Scale Rank Class rank Numeric Ordinal 1=Freshman 2=Sophomore 3=Junior 4=Senior Major Major String Nominal Gender Gender Numeric Nominal 0=Male 1=Female Is student an athlete? 0 = Non-athlete 1 = Athlete Athlete Numeric Nominal Height Height (inches) Numeric Scale Weight Weight (pounds) Numeric Scale 0 = Nonsmoker 1 = Past smoker 2 = Current smoker Smoking Does student smoke? Numeric Nominal Sprint 35-meter sprint time (seconds) Numeric Scale MileMinDur Mile run time (hh:mm:ss) Datetime Scale English Score on English placement test (out of 100 points) Numeric Scale Reading Score on Reading placement test (out of 100 points) Numeric Scale Math Score on Math placement test (out of 100 points) Numeric Scale Writing Score on Writing placement test (out of 100 points) Numeric Scale State Is student in-state or out-of-state resident? String Nominal Does student live on campus? 0 = Off-campus 1 = On-campus LiveOnCampus Numeric Nominal How does student commute to campus? 1 = Walk 2 = Bike 3 = Car 4 = Public transit HowCommute Numeric Nominal 5 = Other How long does it take you to commute to campus? (minutes) CommuteTime Numeric Scale About how many hours of sleep do you get per night? SleepTime Numeric Scale StudyTime About how many hours per week do you study? Numeric Scale Student Sample Dataset Codebook
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman