qm2-all-tutorial-answers-organized-by-week

.pdf

School

University of Melbourne *

*We aren’t endorsed by this school

Course

20003

Subject

Economics

Date

Apr 3, 2024

Type

pdf

Pages

71

Uploaded by MasterJackal4052

StuDocu is not sponsored or endorsed by any college or university QM2 All Tutorial Answers (Organized by Week) Quantitative Methods 2 (University of Melbourne) StuDocu is not sponsored or endorsed by any college or university QM2 All Tutorial Answers (Organized by Week) Quantitative Methods 2 (University of Melbourne) Downloaded by James Hudin (jameshudin@gmail.com) lOMoARcPSD|12574417
L. Kónya, 2020, Semester 2 ECON20003 - Solutions 1 1 ECON20003 – QUANTITATIVE METHODS 2 TUTORIAL 1 Solutions Exercises for Assessment Exercise 2 One of the major measures of the quality of service provided by any organisation is the speed with which the organisation responds to customer complaints. Last year the flooring department of a large family-owned department store received 50 complaints about carpet installation. The following data represent the number of days between the receipt and resolution of these complaints. Days 54 35 29 2 1 11 126 4 35 26 12 165 27 26 74 13 5 29 22 26 33 137 28 123 14 5 110 52 94 20 19 32 152 25 27 4 27 61 36 5 10 31 29 81 13 68 110 30 31 23 a) Is the variable Days qualitative or quantitative? If it is quantitative, is it discrete or continuous? In addition, determine its level of measurement. Explain your answers. The observations are numbers of days resulting from a counting process and the possible values are non-negative integers. Therefore, Days is a quantitative variable, it is discrete (countable infinite). The measurement scale is ratio since there is a unit of measurement (day) and a genuine zero point (0 day). b) Launch RStudio and close the Script tab, if it is open at all. Create a new RStudio project and script, and name both t1e2 . Follow similar steps than in Exercise 1. c) Enter the observations from your keyboard to an RStudio spreadsheet and save them in an RData file. Quit RStudio . When prompted, save only the t1e2.R file. Downloaded by James Hudin (jameshudin@gmail.com) lOMoARcPSD|12574417
L. Kónya, 2020, Semester 2 ECON20003 - Solutions 1 2 Follow similar steps than in Exercise 1. d) Open your working directory. Capture your screen by taking a screenshot ( Alt + Print Screen ) and paste it with your answers for part (a) in a Word document. Downloaded by James Hudin (jameshudin@gmail.com) lOMoARcPSD|12574417
L. Kónya, 2020, Semester 2 ECON20003 – Solutions 2 1 ECON20003 – QUANTITATIVE METHODS 2 TUTORIAL 2 Solutions Exercises for Assessment Exercise 4 In this exercise you are going to work on the data you saved in Exercise 2 last week. a) Launch RStudio and close the Script tab, if it is open. Create a new RStudio project and script, and name both t2e4 . Retrieve the t1e2 data set and save it as t2e4.RData . You can complete these tasks by following similar steps than in Exercise 2 of Tutorial 2. The variable of interest, Days , is a discrete quantitative variable. The data set is cross- sectional and it can be displayed graphically with, for example, a histogram or a boxplot. b) Use RStudio to illustrate the data on Days with a histogram. Customize your plot as you did in Exercise 3. Briefly describe what the graph tells you. A basic histogram is generated by the following command: hist(Days) In return, RStudio displays the first plot on the next page. It is black and white and looks a bit strange because the axes are too short. However, it can be easily improved by adding a few arguments: hist(Days, xlim = c(0,200), ylim = c(0, 25), col = "yellow") The new histogram is second on the next page. These histograms show that the sample data of Day s is heavily skewed to the right and that the second class interval, from 20 to 40, has the highest frequency, 21. Downloaded by James Hudin (jameshudin@gmail.com) lOMoARcPSD|12574417
L. Kónya, 2020, Semester 2 ECON20003 – Solutions 2 2 Downloaded by James Hudin (jameshudin@gmail.com) lOMoARcPSD|12574417
L. Kónya, 2020, Semester 2 ECON20003 – Solutions 2 3 c) Use RStudio to illustrate the data on Days with a boxplot and customize your plot. Briefly describe what the graph tells you. Use the boxplot(Days) command to develop a basic boxplot and then add a main title to it, add the Days label to the vertical axis, and colour the rectangle on the boxplot red. A basic boxplot is generated by the boxplot(Days) command: To add the required customization, execute boxplot(Days, main = "Boxplot for Days", ylab = "Days", col = "red") The new boxplot is on the next page. It shows that in the sample of Days , (i) the median ( Q 2 ) is a bit above 25, (ii) the first quartile ( Q 1 ) is about 30, (iii) the third quartile ( Q 3 ) is a bit above 50, (iv) Q 1 – 1.5 ( Q 3 Q 1 ) is about zero, (v) Q 3 + 1.5 ( Q 3 Q 1 ) is about 110, and (vi) there are a few outliers at the upper end of the range. 1 1 Observations that differ greatly from the majority of the data set in the sense that they are either smaller than Q 1 – 1.5 ( Q 3 Q 1 ) or larger than Q 3 + 1.5 ( Q 3 Q 1 ) are considered to be outliers. Downloaded by James Hudin (jameshudin@gmail.com) lOMoARcPSD|12574417
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help