You are on page 1of 3

VIT AP

Foundations for Data Analytics [CSE1006 - 405]


Marks: 50 Duration: 90 mins.
Section 1
Answer all the questions.
Answer the following questions 15 X 2 = 30 Marks
1) What is the output of following code? (2)
idprod=c("F", "H", "B", " S", "D")
units=c(12,19,44, 26,43)
dfis.factor(df$prod)
None of the
TRUE FALSE Error
options
2) Consider the following code. (2)
n = c(2, 3, 5)
s = c("aa", "bb", "cc", "dd", "ee")
b = c(TRUE, FALSE, TRUE, FALSE,FALSE)
lstWhat is the code to print "dd" from the list "lst"?
lst[[3]][2] lst[2][3] lst[2,3] lst[[2]][4]
3) What is the output of following code? (2)
xx[6] x[x
3 2 2 5 6 11 TRUE TRUE FALSE FALSE FALSE TRUE 4 3 0 1 2 4 11 5 4
4) What is the output of following code? (2)
xx[c(1,3,2)]x[x>0]
TRUE TRUE TRUE TRUE 4 3 3 4 5 4 3 2 5 FALSE FALSE FALSE FALSE
TRUE 7 6 FALSE
5) What is the output of following code? (2)
xx
yy
x+y

Error

6) What is the output of following code? (2)


xxx
1 2 3 TRUE TRUE TRUE FALSE 1 3 2 TRUE TRUE TRUE FALSE TRUE
2 FALSE 2 FALSE
7) idprod=c("F", "H", "B", " S", "D") (2)
units=c(12,19,44, 26,43)
dfWhat is the command to add new column name "dept" for the sales company?
None of the 1) or
df$dept df.dept
options 2)
8) What is the output of following code? (2)
a b a[2,1]b[2,2]a+b

9) What is the output of the following function? (2)


g a x+a+y
}
g(5)
Error 8 42 9
10) What is the output of following code? (2)
list1 list2 xyprint(x+y)
None of the
Error 1 13 15 10 19 11 13 15 17 19
options
11) A study of the effects of smoking on sleep patterns is conducted. The following (2)
dataset represents the time in minutes that it takes to fall asleep.

What is the mean for smokers and nonsmokers group respectively?


34.2, 55.4,
36, 37 43.7 30.58
45.3 29.6
12) What is the standard deviation for smokers and nonsmokers group respectively? (2)
(Above Table)
43.7 16.92, 55.4, 25,
42.4 5.64 29.6 9.5
13) What is the z-score normalize value of 60.2 present in Smokers group? (2)
0.97 0.69 0.43 0.76
14) What is the normalized value of 21.1 present in non-smokers group in the column (2)
using min-max normalization having new minimum value as 11 and new maximum
value is 13?
11 13 12.5 12.8
15) Compare the variability of time to fall asleep for the above groups. Which group (2)
has more variability?
Both 1) and
Smokers Non-smokers None
2)
Section 2
Answer all the questions.
1) The following data represent the final exam grades for a particular course: (10 M) (10)
13,15, 16, 18, 19, 20, 24, 25, 29, 32, 35, 37, 38, 39, 42, 43, 45, ,46, 48, 49.
Apply each of the following technique on the given data.
a) Simple random sampling with replacement (SRSWR) (3 M)
b) Simple random sampling without replacement (SRSWOR) (3 M)
c) Stratified Sampling with three different strata "Poor grade", "Middle grade",
"Higher grade".
(Hint: Poor grade: 13-20, Middle grade: 24-39, Higher grade:42-49) (4 M)
2) E-commerce website/retail store is a set-up which offers wide range of products to (10)
the end-users/customers. There are different types of departments in a retail store.
For example, when a customer enters the store and needs an extension cord, he
goes to the electronics department. Each department manages different types of
product categories designed to help customers find what they want quickly and
easily. For example, the clothing department can be organized into men and
women categories. Each category has different product/items such as in clothing
department and men category, you can find suits, shirts and jackets whereas in
women category you can find sarees, salwar suits. Design a concept hierarchy for
retail store which contains different departments, categories, and items/products
under it. The concept hierarchy should have at least 4 levels.
Hint: Retail store has different types department such as electronics, clothing,
sports.

For example:
Electronics Department-> categories such as product, accessories
Products Category -> Televisions, Home Entertainment Systems, Camera
Accessories Category-> Camera Accessories, TV stand, extension cord
-----End-----

You might also like