1.
Which variable could be a numeric variable
a.
Age in years
b.
Gender
c.
Type of degree a student earns
d.
Color of the cars
2. An example of the cross-sectional data is
a.
A data set collected at one time from many individuals
b.
A data set collected weekly from one individual
c.
A data set collected yearly from many individuals
d.
A data set collected yearly from one individual
3. Software R can be used as
a.
Statistical purposes
b.
Programming language
c.
All are correct
d.
Writing mathematical models and functions
4. If I want to clear my console window, I have to use the following command
a.
Alt + C
b.
Alt + L
c.
Ctrl + C
d.
Ctrl + L
5. A package in RStudio is installed to unpack the various function, what is the
correct way of unpacking/installing the package “dplyr”
a.
install the package (“dplyr”) and library (dplyr)
b.
[Link] (dplyr) and load (dplyr)
c.
[Link] (“dplyr”) and require (dplyr)
d.
package (“dplyr”) and require (dplyr)
6. Let suppose you have a data in csv file with the name of abc and it is saved in
your working directory, you want import the data and name it mydf, you should
use the following command, (Note: I have already set my working directory)
a.
mydf <- [Link] (abc)
b.
mydf <- [Link] ([Link])
c.
mydf <- [Link] (“[Link]”)
d.
All are incorrect
7. Let’s suppose my data (with 100 observations and 8 variables) is open with the
name of mydf the command head(mydf, 8) will show me
a.
First 8 rows and 8 columns
b.
First 6 rows and 8 columns
c.
First 6 rows and 6 columns
d.
First 6 rows and all columns
8. I have data “abc” and “mydf” in my environment window, I want to get rid of
them, I should use the command
a.
remove (abc, mydf)
b.
rm (“abc”, “mydf”)
c.
rm (mydf, abc)
d.
All are correct
9. Install a package titanic and load the titanic_train data, how many
observations and variables can you see
a.
891 observations and 12 variables
b.
705 observations and 12 variables
c.
891 observations and 14 variables
d.
705 observations and 15 variables
10. Use titanic_train data, without any modification, what is the mean age?
a.
29.7
b.
30.8
c.
31.2
d.
32.6
11. Use titanic_train data (without any modification), and run a simple linear
regression where you should take Fare as the dependent variable and the
number of siblings as an independent variable. Which of the following
interpretation of your results is true?
a.
If 1 sibling increases the fare will be increased by one dollar
b.
If 1 sibling increases the fare will be increased by 28.4 dollars
c.
If 1 sibling increases the fare will be increased by 7.2 dollars
d.
If 1 sibling increases the fare will be increased by 35.9 dollars
12. If you take Survived ( 1 = Survived, 0= Died) as your dependent variable, the
best suitable model for you could be the Binary logit model, can you take Age
and Gender as your independent variables only and run the model, what did you
find the relationship between age and survived? [ignore the significance, don’t
fill the missing values]
a.
1-year age increases the odds of being survived decreases?
b.
1-year age increases the odds of being survived increases?
c.
1-year age increases the odds of being survived remain constant?
d.
All are incorrect
13. The results of the binary logit model (that you run in the previous question)
also tell you that
a.
The odds for Male being survived are 0.08 times as compared to Female
b.
The odds for Male being survived are 0.80 times as compared to Female
c.
The odds for Male being survived are 0.90 times as compared to Female
d.
The odds for Male being survived are 0.25 times as compared to Female
14. The results of the binary logit model (that you run in the previous question)
also tell you that
a.
The odds for Female being survived are 12.2 times higher as compared to Male
b.
The odds for Female being survived are 2.5 times higher as compared to Male
c.
The odds for Female being survived are 25 times higher as compared to Male
d.
The odds for Female being survived are 12.2 times lower as compared to Male
15. You might have noticed that variable Age in titanic_train data has some
missing values, fill that missing values with a number 30, and find the mean age
of male and female, the answer is
a.
Male = 29.2, Female = 28.5
b.
Male = 30.6, Female = 28.3
c.
Male = 25.3, Female = 29.6
d.
Male = 28.3, Female = 31.2
16. Using titanic_train data, can you find how many (total) females survived and
how many died in the incident?
a.
Survived = 60, Died = 465
b.
Survived = 109, Died = 375
c.
Survived = 233, Died = 81
d.
Survived = 248, Died = 76
17. If you want to save your titanic_train data in RDS extension with the name of
“New_Data” you need to use the following command. [Working directory is
already set]`
a.
save_rdata(titanic_train into New_Data)
b.
saveRDS (titanic_train into New_Data.rds)
c.
saveRDS (titanic_train, “New_Data.rds”)
d.
save_data (titanic_train, “New_Data.rds”)
18. load mtcars data, what is the standard deviation of rear axle ratio
a.
0.4
b.
0.5
c.
0.6
d.
0.7
19. Using mtcars data, find how many automatic cars have 3 forward gears
a.
5
b.
10
c.
15
d.
20
20. Using mtcars data, find the maximum number of carburetors in all cars
a.
2
b.
4
c.
6
d.
8
21. Using mtcars data run multiple linear regression where you should take
Weight as your dependent variable and gross horse power and car’s transmission
as your independent variables. What is the coefficient of auto cars
a.
1.1
b.
1.6
c.
2.6
d.
-1.1
22. The multiple linear regression that you have run in the previous question also
tells you that
a.
If the gross horse power increases it will increase the weight of the cars as well
b.
If the gross horse power decreases it will increase the weight of the cars as well
c.
If the gross horse power increases it will not affect the weight of the cars
d.
If the gross horse power increases it will decrease the weight of the cars as well
23. If the p-value of a particular variable is less than 0.05 it means
a.
That variable is important
b.
We should accept the alternate hypothesis
c.
We should reject the null hypothesis
d.
All are correct
24. Use mtcars data and find what percentage of the cars have straight engine
a.
40%
b.
44%
c.
50%
d.
56%
25. Install a package gapminder and load the data gapminder, how many
observations do you see
a.
6
b.
1705
c.
1706
d.
1704
26. How many continents can you see in the gapminder data
a.
3
b.
4
c.
5
d.
6
27. Use gapminder data and find the average life expectancy in Europe
a.
60.1
b.
71.9
c.
64.7
d.
48.4
28. What could be the best command to see either the variable life expectancy is
normally distributed or not in gapminder data
a.
hist
b.
plot
c.
plot_ts
d.
Scatter
29. Run a simple linear regression where you should take life expectancy as your
dependent variable and GDP per capita as your independent variable, what do
you conclude by looking at your results
a.
GDP per capita is affecting life expectancy
b.
GDP per capita is an important variable
c.
If GDP per capita increases it will increase the life expectancy as well
d.
All are correct
30. Suppose you want to write “my data analysis test is done” in the console
window what command you should write in the script window?
a.
Print (my data analysis test is done)
b.
Print (“my data analysis test is done”)
c.
print (“my data analysis test is done”)
d.
print please (my data analysis test is done)