1. What is Data Science?
A) An interdisciplinary field that extracts knowledge from data
B) A programming language for databases
C) A type of computer hardware
D) A statistical software package
Show Explanation
2. Which of the following is NOT a typical step in the Data Science process?
A) Data Collection
B) Data Cleaning
C) Hardware Installation
D) Model Validation
Show Explanation
3. What type of Data Science question asks 'What happened?'
A) Predictive
B) Descriptive
C) Prescriptive
D) Causal
Show Explanation
4. What is the primary purpose of experimental design in Data Science?
A) To collect more data
B) To clean existing data
C) To visualize data patterns
D) To test hypotheses systematically
Show Explanation
5. What is R primarily used for?
A) Statistical computing and graphics
B) Web development
C) Mobile app development
D) System administration
Show Explanation
6. What is a vector in R?
A) A two-dimensional data structure
B) A function for mathematical operations
C) A one-dimensional array of elements
D) A type of loop structure
Show Explanation
7. Which function is used to create a vector in R?
A) vector()
B) c()
C) create()
D) make()
Show Explanation
8. What is a matrix in R?
A) A two-dimensional array of the same data type
B) A one-dimensional list
C) A collection of different data types
D) A function for data manipulation
Show Explanation
9. What makes lists different from vectors in R?
A) Lists are faster to process
B) Lists use less memory
C) Lists are only for numeric data
D) Lists can contain different data types
Show Explanation
10. What are factors used for in R?
A) Mathematical calculations
B) Creating loops
C) Representing categorical data
D) File input/output operations
Show Explanation
11. What is a data frame in R?
A) A single column of data
B) A table-like structure with rows and columns
C) A mathematical function
D) A type of plot
Show Explanation
12. Which operator is used for equality comparison in R?
A) ==
B) =
C) !=
D) <>
Show Explanation
13. What does the & operator do in R logical statements?
A) Logical OR
B) Logical NOT
C) Logical AND
D) Assignment
Show Explanation
14. What is the correct syntax for an if-else statement in R?
A) if condition then action1 else action2
B) if (condition) { action1 } else { action2 }
C) if [condition] action1 else action2
D) if condition: action1 else: action2
Show Explanation
15. How do you define a function in R?
A) function_name <- function(parameters) { body }
B) def function_name(parameters): body
C) function function_name(parameters) { body }
D) create function_name(parameters) { body }
Show Explanation
16. What is the syntax for a for loop in R?
A) for variable = 1 to n { body }
B) for (variable = 1; variable <= n; variable++) { body }
C) for (variable in sequence) { body }
D) for variable in range(n): body
Show Explanation
17. When does a while loop stop executing in R?
A) After a fixed number of iterations
B) When the condition becomes FALSE
C) When an error occurs
D) When the user interrupts
Show Explanation
18. What type of Data Science question involves making inferences about a population from a sample?
A) Descriptive
B) Exploratory
C) Predictive
D) Inferential
Show Explanation
19. What characterizes structured data?
A) Organized in rows and columns
B) Has no predefined format
C) Contains only text data
D) Is always numerical
Show Explanation
20. Which of the following is an example of unstructured data?
A) Excel spreadsheet
B) SQL database table
C) Social media posts
D) CSV file
Show Explanation
21. Which operator is commonly used for assignment in R?
A) =
B) <-
C) :=
D) ==
Show Explanation
22. What does the length() function return in R?
A) Number of elements in a vector
B) Size of memory used
C) Number of characters in a string
D) Number of rows in a matrix
Show Explanation
23. What does the str() function do in R?
A) Converts to string
B) Calculates string length
C) Shows the structure of an object
D) Sorts elements
Show Explanation
24. How do you access the first element of a vector named 'x' in R?
A) x(1)
B) x{1}
C) x.1
D) x[1]
Show Explanation
25. What function tells you the data type of an object in R?
A) type()
B) class()
C) typeof()
D) mode()
Show Explanation
26. What is the goal of predictive Data Science questions?
A) To forecast future events
B) To describe current state
C) To find correlations
D) To clean data
Show Explanation
27. What is the purpose of a control group in experimental design?
A) To increase sample size
B) To reduce costs
C) To provide a baseline for comparison
D) To speed up the experiment
Show Explanation
28. What does the names() function do in R?
A) Creates new variables
B) Gets or sets names of object elements
C) Counts the number of names
D) Sorts names alphabetically
Show Explanation
29. Which function returns the dimensions of a matrix in R?
A) size()
B) length()
C) nrow()
D) dim()
Show Explanation
30. What does the is.na() function check for in R?
A) Missing values
B) Numeric values
C) Character values
D) Logical values
Show Explanation
31. What does the rep() function do in R?
A) Removes elements
B) Replaces elements
C) Replicates elements
D) Reverses elements
Show Explanation
32. Which function creates a sequence of numbers in R?
A) range()
B) seq()
C) series()
D) num()
Show Explanation
33. What does the paste() function do in R?
A) Copies objects
B) Pastes from clipboard
C) Creates new variables
D) Concatenates strings
Show Explanation
34. Which function sorts elements in R?
A) sort()
B) order()
C) arrange()
D) rank()
Show Explanation
35. What does the unique() function return in R?
A) All elements
B) Duplicate elements
C) Unique elements only
D) First element
Show Explanation
36. What does the which() function do in R?
A) Counts TRUE values
B) Returns indices of TRUE elements
C) Converts to logical
D) Finds maximum value
Show Explanation
37. What is the purpose of the apply() function in R?
A) To create applications
B) To install packages
C) To apply formatting
D) To apply functions to arrays
Show Explanation
38. Which function provides a summary of an R object?
A) summary()
B) describe()
C) info()
D) details()
Show Explanation
39. What does the head() function show in R?
A) Column headers only
B) Last few rows
C) First few rows
D) Random rows
Show Explanation
40. What does the tail() function display in R?
A) First few rows
B) Last few rows
C) Middle rows
D) All rows
Show Explanation
41. Which function calculates the average in R?
A) avg()
B) average()
C) median()
D) mean()
Show Explanation
42. What does the median() function calculate in R?
A) Middle value of sorted data
B) Most frequent value
C) Average value
D) Range of values
Show Explanation
43. Which function calculates variance in R?
A) variance()
B) spread()
C) var()
D) sd()
Show Explanation
44. What does the sd() function calculate in R?
A) Sum of deviations
B) Standard deviation
C) Standard error
D) Sum of squares
Show Explanation
45. What does the range() function return in R?
A) Difference between max and min
B) All values in order
C) Middle values
D) Minimum and maximum values
Show Explanation
46. Which function finds the maximum value in R?
A) max()
B) maximum()
C) largest()
D) top()
Show Explanation
47. What does the min() function return in R?
A) Minimum index
B) Smallest value
C) First value
D) Negative values
Show Explanation
48. Which function calculates the total sum in R?
A) total()
B) add()
C) sum()
D) plus()
Show Explanation
49. What does the quantile() function calculate in R?
A) Quality measures
B) Quantity of data
C) Qualitative analysis
D) Percentiles of data
Show Explanation
50. What does the table() function create in R?
A) Frequency tables
B) Data tables
C) HTML tables
D) Pivot tables
Show Explanation