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 design a computer network
C. To create new hardware devices
D. To prepare raw data for analysis

2 At what stage is data preprocessing usually performed?

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

3 Which statement best describes raw data?

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

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

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

5 Which preprocessing task deals directly with missing values?

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

6 What does normalization commonly do to numerical data?

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

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

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

8 What does removing duplicate records accomplish?

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

9 What is data wrangling?

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

10 Which action is an example of data wrangling?

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

11 What does filtering a dataset mean?

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

12 What is the purpose of reshaping data?

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

13 Which value is an example of numerical data?

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

14 Which variable is categorical?

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

15 Which is an example of structured data?

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

16 Which is an example of unstructured data?

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

17 What is a missing-data error?

Possible data error types Easy
A. A required value is absent
B. A column has a clear label
C. A record has a valid identifier
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 realistic measurement
B. A correctly coded category
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 column contains unique identification
B. The data is arranged in ascending order
C. A number is stored with a decimal point
D. The same record appears more than once

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

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

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. Train separate models for each original file format
C. Clean and transform the records into a consistent dataset
D. Increase the number of forecasting model parameters

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

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

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. Timeliness
C. Uniqueness
D. Completeness

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

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

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 maximum
B. Replace them with the mean
C. Replace them with the median
D. Replace them with zero

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 once using the complete dataset
C. Fit the scaler using only each validation fold
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. One-hot encoding
D. Mean centering

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 key-based deduplication
B. A grouped aggregation
C. A long-to-wide reshape
D. A wide-to-long reshape

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 data type cast
B. A one-to-one join
C. A many-to-many join
D. A missing-value filter

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. Sort by customer and retain every row
B. Group by customer and sum spending
C. Join customers to transactions by date
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. Ordinal categorical
B. Nominal categorical
C. Continuous numerical
D. Discrete numerical

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 categorical string data
D. As continuous numerical data

35 Which dataset is in long form?

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

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. Missing attributes
C. Inconsistent units
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 referential mismatch
B. A truncated measurement
C. A misspelled category
D. A duplicated transaction

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 range violation
B. A duplicate attribute
C. A referential integrity error
D. A formatting inconsistency

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. Flag it using a validity rule
B. Accept it because ages are numeric
C. Convert it into a nominal category
D. Scale it into the interval

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 within each fold using only that fold's training partition
C. Fit unsupervised transformations globally but target encoding within each validation partition
D. Fit every transformation once on the first fold and reuse it for the remaining folds

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 becomes a valid extreme observation after median imputation is performed
D. The sentinel is automatically excluded because it lies outside the expected age range

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. Train-serving skew caused by inconsistent transformation definitions and fitted parameters
C. Sampling bias caused by unequal class frequencies in the original training set
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. All three operations are exclusively data cleaning because each changes recorded values
C. Customer-level aggregation is preprocessing; imputation and standardization are wrangling
D. Customer-level aggregation is wrangling; imputation and standardization are preprocessing

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 reduces parameter sensitivity but does not bound extreme values
B. ; robust scaling centers observations but leaves their original scale unchanged
C. ; robust scaling replaces values above the upper quartile with the median
D. ; robust scaling guarantees every transformed value lies inside the IQR

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. Delete incomplete rows before splitting and rebalance the retained observations afterward
B. Apply training-fold median imputation and add a missingness indicator within the pipeline
C. Apply global mean imputation and remove the missingness pattern from the feature matrix
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 the most frequent label after consulting their observed target rates
B. Discard any production row containing a category absent from the original training sample
C. Map unseen values to a reserved category and fit the encoder using training data only
D. Refit the encoder on each production batch and append columns for newly observed values

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. Backward filling from the next observed value within the complete time series
B. Spline interpolation fitted once to the complete series before defining test windows
C. A causal estimate using only observations available at or before the forecast origin
D. Centered linear interpolation using observations immediately before and after each gap

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 the larger multiplicity is retained for each matching key
D. , because each key contributes the product of its two row multiplicities

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. Sum the store-day conversion rates and divide by the number of calendar days
B. Take the median conversion rate and multiply it by the number of stores
C. Average the store-day conversion rates after weighting each store equally
D. Divide the sum of purchases by the sum of visits across all store-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 month contains records for all customers represented in the source table
B. Every customer has the same number of recorded months and metric categories
C. Every metric is numeric and contains no negative or zero-valued observations
D. Every (customer_id, month, metric) combination identifies at most one value

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 ingestion time only, ignoring the effective time for each entity
B. Select the smallest ingestion time, then the largest effective time among tied records
C. Select the largest effective time, then the largest ingestion 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. Both differences and ratios are meaningful because Celsius has equal-sized measurement units
B. Neither differences nor ordering are meaningful because Celsius permits negative observations
C. Ratios are meaningful, but differences are not because Celsius intervals vary by temperature
D. Differences are meaningful, but ratios are not because zero Celsius is not an absolute zero

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 count variables; square-root transformation is needed to stabilize totals
B. The components are ordinal variables; integer encoding preserves their relative allocation ranks
C. The components satisfy a closure constraint; log-ratio coordinates remove the induced dependence
D. The components are independent; min-max scaling is needed to create a common total

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. Average all item attributes into one order row and discard the nested array after aggregation
D. Concatenate item values into an unordered string and remove the original order identifier

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 syntactic error caused by an unparseable timestamp representation
B. A range error caused by a value outside the permitted calendar interval
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. Missing completely at random, because the test result itself was never recorded
C. Structural missingness, because the test variable is undefined for low-severity patients
D. Missing not at random, because every clinical decision creates outcome-dependent absence

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. The smaller mode must be kilograms, so all larger values can be converted automatically
B. Units cannot be resolved reliably from magnitude alone; provenance or external rules are required
C. The larger mode must be pounds, so its values can be divided by without review
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. Sort records by database ID and retain every row with a later timestamp
D. Increase database ID precision so retried records receive more distinct values