Unit 2: Data Pre-processing - Practice Quiz

ECAP792 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is the main purpose of data preprocessing?

Introduction to data preprocessing Easy
A. To publish data on a website
B. To create new hardware devices
C. To design a computer network
D. To prepare raw data for analysis

2 At what stage is data preprocessing usually performed?

Introduction to data preprocessing Easy
A. While manufacturing computer hardware
B. After deleting the final results
C. After publishing the final report
D. Before analyzing or modeling data

3 Which statement best describes raw data?

Introduction to data preprocessing Easy
A. Data permanently removed from storage
B. Data converted into a final decision
C. Data already summarized in a report
D. Data collected in its original form

4 Why is high-quality data important in data science?

Introduction to data preprocessing Easy
A. It improves the reliability of results
B. It eliminates the need for computers
C. It replaces every analysis technique
D. It guarantees unlimited storage space

5 Which preprocessing task deals directly with missing values?

Data preprocessing Easy
A. Data cleaning
B. Data publishing
C. Data visualization
D. Data encryption

6 What does normalization commonly do to numerical data?

Data preprocessing Easy
A. Scales values to a common range
B. Converts numbers into paragraphs
C. Deletes every numerical value
D. Sorts values into random order

7 What is a common way to handle a missing numerical value?

Data preprocessing Easy
A. Rename the dataset without checking
B. Duplicate every row in the dataset
C. Convert the column into an image
D. Replace it with the column mean

8 What does removing duplicate records accomplish?

Data preprocessing Easy
A. It creates graphical reports
B. It adds new variables
C. It encrypts sensitive columns
D. It reduces repeated entries

9 What is data wrangling?

Data wrangling Easy
A. Transforming data into a usable form
B. Designing physical storage devices
C. Collecting only handwritten notes
D. Displaying results without checking data

10 Which action is an example of data wrangling?

Data wrangling Easy
A. Replacing a damaged computer screen
B. Writing a final research conclusion
C. Combining two related data tables
D. Drawing a network cable diagram

11 What does filtering a dataset mean?

Data wrangling Easy
A. Selecting rows that meet a condition
B. Deleting the database application
C. Printing every row on paper
D. Changing all values into file names

12 What is the purpose of reshaping data?

Data wrangling Easy
A. To remove the analysis software
B. To protect it with a password
C. To change its table organization
D. To increase the monitor resolution

13 Which value is an example of numerical data?

Data types and forms Easy
A. Twenty-five
B. Excellent
C. Blue
D. 25

14 Which variable is categorical?

Data types and forms Easy
A. Travel distance
B. Student height
C. Product color
D. Room temperature

15 Which is an example of structured data?

Data types and forms Easy
A. Videos uploaded to a media library
B. Photographs stored in an image folder
C. Recordings collected from interviews
D. Values arranged in database tables

16 Which is an example of unstructured data?

Data types and forms Easy
A. A database of product prices
B. A table of employee salaries
C. A spreadsheet of monthly sales
D. A collection of video recordings

17 What is a missing-data error?

Possible data error types Easy
A. A record has a valid identifier
B. A required value is absent
C. A column has a clear label
D. A value is sorted correctly

18 A person's age is entered as . What type of problem is this most likely to be?

Possible data error types Easy
A. A correctly coded category
B. A realistic measurement
C. An out-of-range value
D. A standard missing value

19 What is a duplicate-data error?

Possible data error types Easy
A. A number is stored with a decimal point
B. A column contains unique identification
C. The same record appears more than once
D. The data is arranged in ascending order

20 A date column contains both 10/09/2026 and 2026-09-10. What problem does this show?

Possible data error types Easy
A. Missing numerical values
B. Duplicate column names
C. Inconsistent date formats
D. Incorrect table sorting

21 A retailer wants to build a sales forecasting model from records containing missing prices, duplicate transactions, and inconsistent date formats. What should be done before model training?

Introduction to data preprocessing Medium
A. Remove every variable containing at least one error
B. Clean and transform the records into a consistent dataset
C. Increase the number of forecasting model parameters
D. Train separate models for each original file format

22 Why should a preprocessing pipeline be documented and made reproducible?

Introduction to data preprocessing Medium
A. To apply identical transformations to future datasets
B. To eliminate the need for data quality checks
C. To guarantee that every trained model is unbiased
D. To convert all variables into continuous measurements

23 A dataset is accurate but stores dates as DD-MM-YYYY in some rows and YYYY/MM/DD in others. Which data-quality dimension is primarily affected?

Introduction to data preprocessing Medium
A. Consistency
B. Completeness
C. Timeliness
D. Uniqueness

24 Which result best indicates that preprocessing has improved a customer dataset?

Introduction to data preprocessing Medium
A. The dataset contains more columns than before
B. Every numerical value has become positive
C. Valid records follow consistent formats and constraints
D. All categorical variables have been permanently removed

25 A numerical feature contains values ranging from 20 to 80. Using min-max scaling to , what is the transformed value of 50?

Data preprocessing Medium
A.
B.
C.
D.

26 Income values are strongly right-skewed and contain a few extremely large observations. Which simple method is most robust for filling missing incomes?

Data preprocessing Medium
A. Replace them with the median
B. Replace them with the maximum
C. Replace them with zero
D. Replace them with the mean

27 A data scientist standardizes a feature before evaluating a model with cross-validation. How should data leakage be avoided?

Data preprocessing Medium
A. Fit the scaler after combining all predictions
B. Fit the scaler using only each validation fold
C. Fit the scaler once using the complete dataset
D. Fit the scaler separately within each training fold

28 A nominal variable Color has values Red, Blue, and Green. Which transformation avoids implying an artificial ranking?

Data preprocessing Medium
A. Ordinal encoding
B. Min-max scaling
C. Mean centering
D. One-hot encoding

29 A customer table contains one row per customer, while an orders table contains several rows per customer. Which operation combines every order with its matching customer details?

Data wrangling Medium
A. Aggregate both tables by order date
B. Join the tables using customer ID
C. Pivot customer IDs into separate columns
D. Append the customer rows below the orders

30 A table stores monthly sales in columns Jan, Feb, and Mar. Which wrangling operation creates columns named Month and Sales, with one row per month?

Data wrangling Medium
A. A wide-to-long reshape
B. A grouped aggregation
C. A long-to-wide reshape
D. A key-based deduplication

31 After joining two tables, the row count becomes much larger than expected because the join key is repeated in both tables. What is the most likely cause?

Data wrangling Medium
A. A one-to-one join
B. A missing-value filter
C. A data type cast
D. A many-to-many join

32 A transaction table has multiple rows per customer. You need one row per customer containing total spending. Which operation is appropriate?

Data wrangling Medium
A. Join customers to transactions by date
B. Sort by customer and retain every row
C. Group by customer and sum spending
D. Pivot spending into one column per customer

33 A survey records satisfaction as Poor, Fair, Good, and Excellent. What type of variable is this?

Data types and forms Medium
A. Continuous numerical
B. Nominal categorical
C. Discrete numerical
D. Ordinal categorical

34 A column contains postal codes such as 02138 and 90210. How should the column usually be represented?

Data types and forms Medium
A. As ordinal numerical data
B. As binary indicator data
C. As continuous numerical data
D. As categorical string data

35 Which dataset is in long form?

Data types and forms Medium
A. One row per exam with a column for each student
B. One row per class with separate student score columns
C. One row per student-exam pair with a score column
D. One row per student with a column for each exam

36 A hospital stores patient notes as free-form paragraphs. Which description best fits these notes?

Data types and forms Medium
A. Structured continuous data
B. Unstructured textual data
C. Structured ordinal data
D. Unstructured numerical data

37 A temperature column recorded in Celsius contains the value 451 because one source supplied Fahrenheit without conversion. What type of problem is this?

Possible data error types Medium
A. Duplicate records
B. Inconsistent units
C. Missing attributes
D. Incorrect ordering

38 Two records have the same transaction ID, timestamp, customer ID, and amount. Which error should be investigated first?

Possible data error types Medium
A. A truncated measurement
B. A duplicated transaction
C. A misspelled category
D. A referential mismatch

39 An employee record contains a department ID that does not exist in the department table. Which error type does this represent?

Possible data error types Medium
A. A referential integrity error
B. A formatting inconsistency
C. A range violation
D. A duplicate attribute

40 A person's age is entered as 250 in a demographic dataset. What is the most appropriate initial treatment?

Possible data error types Medium
A. Accept it because ages are numeric
B. Flag it using a validity rule
C. Scale it into the interval
D. Convert it into a nominal category

41 A model is evaluated using 5-fold cross-validation. Its pipeline performs median imputation, standardization, and target encoding. Which procedure yields the least biased estimate of generalization performance?

Introduction to data preprocessing Hard
A. Fit every transformation on the full dataset before constructing the folds
B. Fit every transformation once on the first fold and reuse it for the remaining folds
C. Fit unsupervised transformations globally but target encoding within each validation partition
D. Fit every transformation within each fold using only that fold's training partition

42 A preprocessing pipeline receives an integer-valued age column in which 999 represents an unknown age. The pipeline currently calculates the median before replacing 999 with a missing value. What is the primary consequence?

Introduction to data preprocessing Hard
A. The sentinel can distort the fitted median and therefore bias the imputed values
B. The sentinel affects scaling but cannot affect the fitted median under any distribution
C. The sentinel is automatically excluded because it lies outside the expected age range
D. The sentinel becomes a valid extreme observation after median imputation is performed

43 A batch-trained model standardizes each feature using fixed training-set statistics. Its production service instead standardizes each request using statistics from the most recent 100 requests. Performance drops even though the raw input distribution is stable. What is the best diagnosis?

Introduction to data preprocessing Hard
A. Concept drift caused by a change in the relationship between predictors and target
B. Sampling bias caused by unequal class frequencies in the original training set
C. Train-serving skew caused by inconsistent transformation definitions and fitted parameters
D. Label leakage caused by the inclusion of recent unlabeled production observations

44 An event table is converted into one row per customer, missing customer attributes are imputed, and numerical features are standardized. Which description correctly separates the operations?

Introduction to data preprocessing Hard
A. Customer-level aggregation and imputation are modeling; standardization is wrangling
B. Customer-level aggregation is preprocessing; imputation and standardization are wrangling
C. Customer-level aggregation is wrangling; imputation and standardization are preprocessing
D. All three operations are exclusively data cleaning because each changes recorded values

45 A feature has median , interquartile range , and includes the value . Under robust scaling, what value is produced for , and what does this demonstrate?

Data preprocessing Hard
A. ; robust scaling guarantees every transformed value lies inside the IQR
B. ; robust scaling reduces parameter sensitivity but does not bound extreme values
C. ; robust scaling replaces values above the upper quartile with the median
D. ; robust scaling centers observations but leaves their original scale unchanged

46 In a prediction problem, a laboratory value is often missing precisely when clinicians decide a test is unnecessary. Which preprocessing design best preserves potentially useful missingness information without leaking validation data?

Data preprocessing Hard
A. Apply global mean imputation and remove the missingness pattern from the feature matrix
B. Delete incomplete rows before splitting and rebalance the retained observations afterward
C. Apply training-fold median imputation and add a missingness indicator within the pipeline
D. Replace missing values with the validation-fold median and omit any missingness indicator

47 A categorical feature may contain previously unseen values after deployment. Which encoding strategy handles this case while preserving a fixed feature schema?

Data preprocessing Hard
A. Map unseen values to a reserved category and fit the encoder using training data only
B. Discard any production row containing a category absent from the original training sample
C. Refit the encoder on each production batch and append columns for newly observed values
D. Map unseen values to the most frequent label after consulting their observed target rates

48 A forecasting dataset has hourly measurements, with isolated missing values. During backtesting, which interpolation method avoids using information unavailable at prediction time?

Data preprocessing Hard
A. Centered linear interpolation using observations immediately before and after each gap
B. Spline interpolation fitted once to the complete series before defining test windows
C. Backward filling from the next observed value within the complete time series
D. A causal estimate using only observations available at or before the forecast origin

49 Table A contains 2 rows with key K1 and 3 rows with key K2. Table B contains 4 rows with K1 and 1 row with K2. Assuming no other keys, how many rows result from an inner join on the key?

Data wrangling Hard
A. , because each source row participates in exactly one matched output row
B. , because the matching row counts are added independently for each key
C. , because each key contributes the product of its two row multiplicities
D. , because the larger multiplicity is retained for each matching key

50 Store-day records contain visits, purchases, and a computed conversion rate. To obtain the exact regional conversion rate, which aggregation is required?

Data wrangling Hard
A. Average the store-day conversion rates after weighting each store equally
B. Divide the sum of purchases by the sum of visits across all store-days
C. Take the median conversion rate and multiply it by the number of stores
D. Sum the store-day conversion rates and divide by the number of calendar days

51 A long table with columns (customer_id, month, metric, value) is pivoted so that each metric becomes a column. What condition is required for the pivot to be lossless without an aggregation rule?

Data wrangling Hard
A. Every metric is numeric and contains no negative or zero-valued observations
B. Every (customer_id, month, metric) combination identifies at most one value
C. Every month contains records for all customers represented in the source table
D. Every customer has the same number of recorded months and metric categories

52 A change-log table can contain several records for the same entity and effective_time, because corrected versions arrive later. Which ordering rule selects the current business state while retaining the latest correction?

Data wrangling Hard
A. Select the largest effective time, then the largest ingestion time among tied records
B. Select the largest ingestion time only, ignoring the effective time for each entity
C. Select the smallest ingestion time, then the largest effective time among tied records
D. Select the smallest effective time, then the smallest ingestion time for each entity

53 A database stores postal codes as integers, but leading zeros are meaningful and numerical distance between codes has no valid interpretation. How should the field be represented for analysis?

Data types and forms Hard
A. As a continuous ratio variable after restoring any omitted leading zeros
B. As an ordinal integer because larger codes represent geographically later regions
C. As a nominal string category with formatting and leading zeros preserved
D. As an interval variable because subtraction yields differences between delivery zones

54 Temperatures are recorded in degrees Celsius. Which statement correctly characterizes valid quantitative comparisons on this scale?

Data types and forms Hard
A. Ratios are meaningful, but differences are not because Celsius intervals vary by temperature
B. Neither differences nor ordering are meaningful because Celsius permits negative observations
C. Differences are meaningful, but ratios are not because zero Celsius is not an absolute zero
D. Both differences and ratios are meaningful because Celsius has equal-sized measurement units

55 A dataset records proportions of a budget allocated to categories, with every row summing to . Why is applying ordinary regression directly to all proportions problematic, and what transformation is appropriate?

Data types and forms Hard
A. The components are ordinal variables; integer encoding preserves their relative allocation ranks
B. The components are independent; min-max scaling is needed to create a common total
C. The components are count variables; square-root transformation is needed to stabilize totals
D. The components satisfy a closure constraint; log-ratio coordinates remove the induced dependence

56 Nested JSON records contain an order identifier and an array of line items. Which relational transformation preserves item-level detail and allows the original order to be reconstructed?

Data types and forms Hard
A. Assign every item a global row number and omit any reference to its originating order
B. Create one row per item carrying the parent order identifier and retain order-level attributes separately
C. Concatenate item values into an unordered string and remove the original order identifier
D. Average all item attributes into one order row and discard the nested array after aggregation

57 A hospital record has discharge_time earlier than admission_time; both timestamps are individually valid and fall within the database's permitted date range. What type of error is this?

Possible data error types Hard
A. A range error caused by a value outside the permitted calendar interval
B. A syntactic error caused by an unparseable timestamp representation
C. A referential-integrity error involving a missing parent record
D. A cross-field consistency error violating a temporal constraint

58 A diagnostic test is more likely to be omitted when a recorded symptom-severity score is low. After conditioning on that fully observed score, test missingness does not depend on the unobserved test result. Which mechanism applies?

Possible data error types Hard
A. Missing at random, because missingness depends only on an observed variable
B. Structural missingness, because the test variable is undefined for low-severity patients
C. Missing not at random, because every clinical decision creates outcome-dependent absence
D. Missing completely at random, because the test result itself was never recorded

59 A weight column combines kilograms and pounds without a unit field. Its distribution has two overlapping modes, and many records become plausible under either conversion. What is the most defensible conclusion?

Possible data error types Hard
A. Units cannot be resolved reliably from magnitude alone; provenance or external rules are required
B. The larger mode must be pounds, so its values can be divided by without review
C. The smaller mode must be kilograms, so all larger values can be converted automatically
D. Both modes can be standardized with z-scores, which removes the underlying unit inconsistency

60 An ingestion system retries failed requests, creating rows with different database IDs but the same source event identifier and payload. Which control most directly prevents this error?

Possible data error types Hard
A. Standardize payload fields and assign a new source identifier on every retry
B. Enforce idempotency or uniqueness using the stable source event identifier
C. Increase database ID precision so retried records receive more distinct values
D. Sort records by database ID and retain every row with a later timestamp