Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

MATH2349 Exam Semester 1, 2020 MATH2349 Exam Semester 2, 2020 Example Exam Questions (with Answers) MATH2349 Final Exam Information • Exam Date & Time - TBA. • The final exam will be an “Open-Book”...

1 answer below »
MATH2349 Exam Semester 1, 2020
MATH2349 Exam Semester 2, 2020
Example Exam Questions (with Answers)
MATH2349 Final Exam Information
• Exam Date & Time - TBA.
• The final exam will be an “Open-Book” online exam via Canvas.
• There will be 25 multiple-choice questions (3.6 marks each) and 1 short answer question (10
marks), 100 marks total.
• The exam will cover Modules 1 - 8.
• Weight: 15%
• Duration of exam will be 1 hours.
• Once you open the exam in Canvas the timer starts. The timer will continue to run whether you are
logged into the quiz or not.
• If you lose your internet connection, try to log back in as quickly as possible to resume the quiz.
• Canvas will automatically submit the quiz at the designated end time and the system will terminate
your access to the quiz/exam.
• Any questions that were not answered will be scored as inco
ect.
• During the exam, you are NOT allowed to share the questions/answers with your fellow classmates
using any platform (i.e. Email, Slack, text, XXXXXXXXXXYou will be in
each of exam conditions if such an
action is detected.
1
Exam Questions (Answers are given on Page 8 and 9)
Answer the following multiple choice questions on Canvas. Choose the one, best response from the alternatives
provided.
1. Which one of the following is a task in “Scan” step of Data Preprocessing?
(a) Preprocessing time and characters/strings
(b) Data scaling, centering, standardising and normalising
(c) Identify and handle outliers, missing values
(d) Importing data into R from different data sources
2. Which one of the following is the reason for the e
or given below?
cars <- read_csv("cars.csv")
# E
or in read_csv("cars.csv") : could not find function "read_csv"
(a) The “cars.csv” is not in the working directory
(b) The “cars.csv” file is co
upted
(c) The relevant package is missing
(d) No need to use quotations " "
4. Which one of the following functions stores only a single object?
I. Rdata
II. RDS
III. Rda
(a) I and II
(b) I and III
(c) Only II
(d) I, II and III
2
3. Which one of the following packages is used to export data to Excel?
(a) li
ary(readr)
(b) li
ary(xlsx)
(c) li
ary(readxl)
(d) Base R functions
5. What is the result of the following R code?
x <- 5
y <- is.finite(x > 0)
y
(a) 5
(b) TRUE
(c) FALSE
(d) 1
6. What is the class of z?
z <- c("a", "b", "c", 1, 2, 3)
class(z)
(a) logical
(b) numeric
(c) facto
(d) characte
7. The header and the structure of the city data frame are given in the following output. Which one of
the following will subset X2016.Rank and X2015.Rank from the city data frame?
head(city)
## X X2016.Rank X2015.Rank X2014.Rank City Country Index.2010
## XXXXXXXXXXVienna Austria 108.6
## XXXXXXXXXXZurich Switzerland 108.0
## XXXXXXXXXXAuckland New Zealand 107.4
## XXXXXXXXXXMunich Germany 107.0
## XXXXXXXXXXVancouver Canada 107.4
## XXXXXXXXXXDusseldorf Germany 107.2
str(city)
## 'data.frame': 51 obs. of 7 variables:
## $ X : int XXXXXXXXXX10 ...
## $ X2016.Rank: int XXXXXXXXXX10 ...
## $ X2015.Rank: int XXXXXXXXXX10 ...
## $ X2014.Rank: int XXXXXXXXXX10 ...
## $ City : Factor w/ 51 levels "Adelaide","Amsterdam",..: XXXXXXXXXX XXXXXXXXXX ...
## $ Country : Factor w/ 22 levels "Australia","Austria",..: XXXXXXXXXX5 1 ...
## $ Index.2010: num XXXXXXXXXX ...
(a) city$X2016.Rank
(b) city$X2015.Rank
(c) city[, c(2,3)]
(d) city[c(2,3), ]
3
8. The header and the structure of the city data frame are given in the following output. Which one of
the following will subset German cities from the city data frame?
head(city)
## X X2016.Rank X2015.Rank X2014.Rank City Country Index.2010
## XXXXXXXXXXVienna Austria 108.6
## XXXXXXXXXXZurich Switzerland 108.0
## XXXXXXXXXXAuckland New Zealand 107.4
## XXXXXXXXXXMunich Germany 107.0
## XXXXXXXXXXVancouver Canada 107.4
## XXXXXXXXXXDusseldorf Germany 107.2
str(city)
## 'data.frame': 51 obs. of 7 variables:
## $ X : int XXXXXXXXXX10 ...
## $ X2016.Rank: int XXXXXXXXXX10 ...
## $ X2015.Rank: int XXXXXXXXXX10 ...
## $ X2014.Rank: int XXXXXXXXXX10 ...
## $ City : chr "Vienna" "Zurich" "Auckland" "Munich" ...
## $ Country : chr "Austria" "Switzerland" "New Zealand" "Germany" ...
## $ Index.2010: num XXXXXXXXXX ...
(a) city[city$Country=="Germany",]
(b) city[city$City=="Germany", ]
(c) city[, city$Country=="Germany"]
(d) city[, city$City=="Germany"]
9. Consider the following list. Which command would you use to extract the second row of m2?
ls<-list(v1=c(1,3,5), rep(c(14,2,1,3),2), list(c(TRUE, FALSE, TRUE), m2=matrix(1:9, nrow=3, ncol=3)))
(a) ls$m2
(b) ls$m2[2,]
(c) ls[[3]]
(d) ls[[3]]$m2[2,]
10. There are three inte
elated rules which make a data set tidy. Which one of the following is NOT one
of them?
(a) Each variable must have its own column.
(b) Each observation must have its own row.
(c) Each value must have its own cell.
(d) Each data set must have one factor variable.
11. Which command would you use to convert the following long-formatted data frame (df) into a wide-
format?
df
## # A ti
le: 12 x 4
## country year type count
## ## 1 Afghanistan 1999 cases 745
4
## 2 Afghanistan 1999 population XXXXXXXXXX
## 3 Afghanistan 2000 cases 2666
## 4 Afghanistan 2000 population XXXXXXXXXX
## 5 Brazil 1999 cases 37737
## 6 Brazil 1999 population XXXXXXXXXX
## 7 Brazil 2000 cases 80488
## 8 Brazil 2000 population XXXXXXXXXX
## 9 China 1999 cases 212258
## 10 China 1999 population XXXXXXXXXX
## 11 China 2000 cases 213766
## 12 China 2000 population XXXXXXXXXX
(a) df %>% gather(key = type, value = count)
(b) df %>% unite(key = type, value = count)
(c) df %>% spread(key = type, value = count)
(d) df %>% split(key = type, value = count)
12. Consider the following data frame (df) and its structure:
df
## country XXXXXXXXXX
## 1 Afghanistan XXXXXXXXXX
## 2 Brazil XXXXXXXXXX
## 3 China XXXXXXXXXX
str(df)
## 'data.frame': 3 obs. of 3 variables:
## $ country: chr "Afghanistan" "Brazil" "China"
## $ 1999 : int XXXXXXXXXX
## $ 2000 : int XXXXXXXXXX
Why does the following code fail?
df %>%
gather(1999, 2000, key = "year", value = "cases")
#> E
or in inds_combine(.vars, ind_list): Position must be between 0 and n
(a) Because the relevant package for gather() is missing
(b) Because the relevant package for pipe operator (%>%) is missing
(c) Because the columns 1999 and 2000 have non-syntactic names (they don’t start with a letter) so we
have to su
ound them in backticks.
(d) Because the arguments inside gather() are not in the co
ect order.
13. According to the following code, what will be the result of y?
x <- c(1:3, NA, 5, NA)
y <- is.na(x)
y
(a) FALSE
(b) TRUE
(c) FALSE FALSE FALSE TRUE FALSE TRUE
(d) NA
5
14. According to the following code, what will be the result of x?
df <- data.frame(col1 = c(1:3, NA),
col2 = c("this", NA,"is", "text"),
col3 = c(TRUE, FALSE, TRUE, TRUE),
col4 = c(2.5, 4.2, 3.2, NA))
x <- sum(is.na(df))
x
(a) TRUE
(b) 3
(c) 2
(d) NA
15. According to the following code, what will be the result of y?
x <- c(1:3, NA, 5)
y <- mean(x)
y
(a) NA
(b) 3
(c) 2.75
(d) 5
16. Which one of the following is not a common cause of outliers?
(a) Data processing e
ors
(b) E
ors due to data type conversions
(c) Measurement e
ors
(d) Intentional e
o
17. Which of the following can be used to deal with outliers?
(a) Capping
(b) Transforming
(c) Imputing
(d) All of the above
18. X values and its z scores z_X are given in the following data frame (df):
df
## X z_X
## XXXXXXXXXX
## XXXXXXXXXX
## XXXXXXXXXX
## XXXXXXXXXX
## XXXXXXXXXX
## XXXXXXXXXX
## XXXXXXXXXX
## XXXXXXXXXX
## XXXXXXXXXX
## XXXXXXXXXX
## XXXXXXXXXX
6
According to the given df, what is the result of the following code?
which(abs(df$z_X)>3)
(a) 2
(b) integer(0)
(c) 1243
(d XXXXXXXXXX
19. Which one of the following is NOT a reason for applying data transformation?
(a) To change the scale of a variable for better understanding.
(b) To convert the non-linear relation into a linear one.
(c) To convert non-normal data into a normal distribution.
(d) To filter out unwanted effect of missing values.
20. Which one of the following is a data reduction technique?
(a) Feature filtering
(b) logarithmic transformation
(c) z-score standardisation
(d) Box-Cox transformation
21. Which one of the following codes will convert x into a date format?
x <- c("08/03/2018", "23/03/2016", "30/01/2018")
(a) as.Date(x, format = "%Y-%m-%d")
(b) as.Date(x, format = "%d/%m/%Y")
(c) as.Date(x, format = "%Y/%m/%d")
(d) as.Date(x, format = "%d-%m-%Y")
22. The header of the Flights data frame is given in the following output. Which one of the following can
e used to extract the year information of the Flights$departure_time?
head(Flights)
## # A ti
le: 6 x 1
## departure_time
## ## XXXXXXXXXX:15:00
## XXXXXXXXXX:29:00
## XXXXXXXXXX:40:00
## XXXXXXXXXX:45:00
## XXXXXXXXXX:00:00
## XXXXXXXXXX:58:00
(a) mday(Flights$departure_time)
(b) month(Flights$departure_time)
(c) year(Flights$departure_time)
(d) hour(Flights$departure_time)
23. What is the result of the following R code?
paste0("red", "orange", "yellow", "green", "blue")
7
(a) redorangeyellowgreenblue
(b) orangeyellowgreenbluered
(c) orange yellow green blue red
(d) red orange yellow green blue
24. Have a look at
Answered Same Day Nov 03, 2021 MATH2349

Solution

Naveen answered on Nov 06 2021
142 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here