โ† All Data Science Flashcard Decks

Data Science MCQ Flashcards

7 cards from real Data Science practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Data Science MCQ flashcards as text
  1. Which of the subsequent functions is used to calculate quantiles for numerical values?

    Answer: quantile

    In many statistical programming languages and libraries, such as R or Python's NumPy/Pandas, the `quantile()` function is used to calculate quantiles for numerical values. Quantiles divide a dataset into equal-sized contiguous subgroups, allowing you to determine values below which a certain percentage of data falls, like the median (0.5 quantile) or quartiles.

  2. Which of the subsequent functions is utilized for flat file loading?

    Answer: read.table

    In R, `read.table()` is a versatile and commonly used function for loading data from flat files (plain text files) into a data frame. It can handle various delimiters, specify whether a header is present, and infer data types, making it a primary tool for importing structured data from external text sources.

  3. How does the genetic algorithm create new states?

    Answer: Both Mutation & Cross-over

    Genetic algorithms, inspired by biological evolution, create new candidate solutions (states) primarily through two operators: crossover and mutation. Crossover combines genetic material from two parent solutions to produce offspring, while mutation introduces random changes to individual solutions. These mechanisms ensure diversity in the population and enable exploration of the search space to find optimal solutions.

  4. Indicate which of the following is true.

    Answer: None of the above

    The `head()` and `tail()` functions in data analysis environments (like R or Python's Pandas) are designed to display the beginning or end of data structures such as data frames, vectors, or lists. They are not typically used to operate directly on raw string literals. Therefore, none of the given statements accurately describe their functionality with respect to strings.

  5. The LISP processor performs the following when a top-level function is entered:

    Answer: It prints the result returned by the function

    When a top-level function is entered into a LISP (or Scheme) processor, it typically operates within a Read-Eval-Print Loop (REPL). After the function is read and then evaluated, the final step in this loop is for the processor to print the result returned by that function to the console. This immediate feedback is characteristic of interactive LISP environments.

  6. Indicate which of the following is true.

    Answer: Primary data is the original source of data

    Primary data refers to original, firsthand information collected directly by the researcher for the specific purpose of their study. It is gathered through methods like surveys, experiments, interviews, or direct observation. In contrast, secondary data is information that has already been collected by someone else for a different purpose.

  7. Which of the subsequent functions is utilized for data frame casting?

    Answer: Dcast

    In R, particularly with packages like `reshape2` or `data.table`, the `dcast()` function is specifically utilized for 'casting' or reshaping data frames. It allows for the transformation of data from a 'long' format to a 'wide' format, or vice-versa, based on specified identifier and value variables, which is a common operation in data manipulation and aggregation.