Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
You're offline
Unit 2 MCQsData Pre-processing
ECAP792 ·
60 questions. Pick an option to check it.
Question 1 of 60 · Introduction to data preprocessing · Easy
What is the main purpose of data preprocessing?
Not quite. Try another option.
Answer: To prepare raw data for analysis
Data preprocessing cleans and transforms raw data so it is suitable for analysis.
Question 2 of 60 · Introduction to data preprocessing · Easy
At what stage is data preprocessing usually performed?
Not quite. Try another option.
Answer: Before analyzing or modeling data
Data is normally preprocessed before it is analyzed or used to train a model.
Question 3 of 60 · Introduction to data preprocessing · Easy
Which statement best describes raw data?
Not quite. Try another option.
Answer: Data collected in its original form
Raw data is data in its original collected form, before cleaning or transformation.
Question 4 of 60 · Introduction to data preprocessing · Easy
Why is high-quality data important in data science?
Not quite. Try another option.
Answer: It improves the reliability of results
Accurate and consistent data generally produces more trustworthy analysis results.
Question 5 of 60 · Data preprocessing · Easy
Which preprocessing task deals directly with missing values?
Not quite. Try another option.
Answer: Data cleaning
Data cleaning includes identifying and handling missing values.
Question 6 of 60 · Data preprocessing · Easy
What does normalization commonly do to numerical data?
Not quite. Try another option.
Answer: Scales values to a common range
Normalization rescales numerical values, often to a range such as to .
Question 7 of 60 · Data preprocessing · Easy
What is a common way to handle a missing numerical value?
Not quite. Try another option.
Answer: Replace it with the column mean
A missing numerical value can be imputed using a statistic such as the column mean.
Question 8 of 60 · Data preprocessing · Easy
What does removing duplicate records accomplish?
Not quite. Try another option.
Answer: It reduces repeated entries
Duplicate removal prevents the same observation from being counted more than once.
Question 9 of 60 · Data wrangling · Easy
What is data wrangling?
Not quite. Try another option.
Answer: Transforming data into a usable form
Data wrangling organizes, cleans, and transforms data into a form suitable for use.
Question 10 of 60 · Data wrangling · Easy
Which action is an example of data wrangling?
Not quite. Try another option.
Answer: Combining two related data tables
Merging related tables is a common data-wrangling operation.
Question 11 of 60 · Data wrangling · Easy
What does filtering a dataset mean?
Not quite. Try another option.
Answer: Selecting rows that meet a condition
Filtering keeps observations that satisfy a specified condition.
Question 12 of 60 · Data wrangling · Easy
What is the purpose of reshaping data?
Not quite. Try another option.
Answer: To change its table organization
Reshaping changes how data is arranged, such as converting between wide and long forms.
Question 13 of 60 · Data types and forms · Easy
Which value is an example of numerical data?
Not quite. Try another option.
Answer: 25
The value is numerical because it represents a number that can be used in calculations.
Question 14 of 60 · Data types and forms · Easy
Which variable is categorical?
Not quite. Try another option.
Answer: Product color
Product color consists of labels or categories rather than measured quantities.
Question 15 of 60 · Data types and forms · Easy
Which is an example of structured data?
Not quite. Try another option.
Answer: Values arranged in database tables
Structured data follows a defined organization, such as rows and columns in a database table.
Question 16 of 60 · Data types and forms · Easy
Which is an example of unstructured data?
Not quite. Try another option.
Answer: A collection of video recordings
Video recordings do not naturally follow a fixed row-and-column structure.
Question 17 of 60 · Possible data error types · Easy
What is a missing-data error?
Not quite. Try another option.
Answer: A required value is absent
A missing-data error occurs when an expected value has not been recorded.
Question 18 of 60 · Possible data error types · Easy
A person's age is entered as . What type of problem is this most likely to be?
Not quite. Try another option.
Answer: An out-of-range value
An age of is outside the realistic range for a person's age.
Question 19 of 60 · Possible data error types · Easy
What is a duplicate-data error?
Not quite. Try another option.
Answer: The same record appears more than once
Duplicate data occurs when an identical observation or record is stored multiple times.
Question 20 of 60 · Possible data error types · Easy
A date column contains both 10/09/2026 and 2026-09-10. What problem does this show?
Not quite. Try another option.
Answer: Inconsistent date formats
The dates use different formatting conventions, which can cause errors during processing.
Question 21 of 60 · Introduction to data preprocessing · Medium
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?
Not quite. Try another option.
Answer: Clean and transform the records into a consistent dataset
Preprocessing resolves quality and consistency problems so that the model receives reliable, usable input.
Question 22 of 60 · Introduction to data preprocessing · Medium
Why should a preprocessing pipeline be documented and made reproducible?
Not quite. Try another option.
Answer: To apply identical transformations to future datasets
A reproducible pipeline ensures that training, validation, and future production data are processed consistently.
Question 23 of 60 · Introduction to data preprocessing · Medium
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?
Not quite. Try another option.
Answer: Consistency
The values may be correct, but using multiple representations for the same field creates a consistency problem.
Question 24 of 60 · Introduction to data preprocessing · Medium
Which result best indicates that preprocessing has improved a customer dataset?
Not quite. Try another option.
Answer: Valid records follow consistent formats and constraints
Effective preprocessing improves validity and consistency without unnecessarily changing or discarding useful information.
Question 25 of 60 · Data preprocessing · Medium
A numerical feature contains values ranging from 20 to 80. Using min-max scaling to , what is the transformed value of 50?
Not quite. Try another option.
Answer:
Min-max scaling gives .
Question 26 of 60 · Data preprocessing · Medium
Income values are strongly right-skewed and contain a few extremely large observations. Which simple method is most robust for filling missing incomes?
Not quite. Try another option.
Answer: Replace them with the median
The median is less influenced by extreme values than the mean, making it suitable for a skewed distribution.
Question 27 of 60 · Data preprocessing · Medium
A data scientist standardizes a feature before evaluating a model with cross-validation. How should data leakage be avoided?
Not quite. Try another option.
Answer: Fit the scaler separately within each training fold
Each scaler must learn its parameters only from the corresponding training fold, preventing validation information from leaking into training.
Question 28 of 60 · Data preprocessing · Medium
A nominal variable Color has values Red, Blue, and Green. Which transformation avoids implying an artificial ranking?
Not quite. Try another option.
Answer: One-hot encoding
One-hot encoding represents nominal categories separately without suggesting that one category is greater than another.
Question 29 of 60 · Data wrangling · Medium
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?
Not quite. Try another option.
Answer: Join the tables using customer ID
A key-based join attaches customer attributes to each order with the same customer ID.
Question 30 of 60 · Data wrangling · Medium
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?
Not quite. Try another option.
Answer: A wide-to-long reshape
A wide-to-long reshape converts repeated month columns into month-value rows.
Question 31 of 60 · Data wrangling · Medium
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?
Not quite. Try another option.
Answer: A many-to-many join
Repeated keys on both sides create all matching combinations, which can multiply rows.
Question 32 of 60 · Data wrangling · Medium
A transaction table has multiple rows per customer. You need one row per customer containing total spending. Which operation is appropriate?
Not quite. Try another option.
Answer: Group by customer and sum spending
Grouping by customer and summing converts transaction-level data into customer-level totals.
Question 33 of 60 · Data types and forms · Medium
A survey records satisfaction as Poor, Fair, Good, and Excellent. What type of variable is this?
Not quite. Try another option.
Answer: Ordinal categorical
The responses are categories with a meaningful order, but the gaps between categories are not measurable.
Question 34 of 60 · Data types and forms · Medium
A column contains postal codes such as 02138 and 90210. How should the column usually be represented?
Not quite. Try another option.
Answer: As categorical string data
Postal codes identify regions rather than quantities, and string storage preserves leading zeros.
Question 35 of 60 · Data types and forms · Medium
Which dataset is in long form?
Not quite. Try another option.
Answer: One row per student-exam pair with a score column
Long-form data stores each observational unit, here a student-exam pair, in its own row.
Question 36 of 60 · Data types and forms · Medium
A hospital stores patient notes as free-form paragraphs. Which description best fits these notes?
Not quite. Try another option.
Answer: Unstructured textual data
Free-form notes do not follow a fixed tabular schema and are therefore unstructured text.
Question 37 of 60 · Possible data error types · Medium
A temperature column recorded in Celsius contains the value 451 because one source supplied Fahrenheit without conversion. What type of problem is this?
Not quite. Try another option.
Answer: Inconsistent units
The value uses a different measurement unit from the rest of the column, creating a unit inconsistency.
Question 38 of 60 · Possible data error types · Medium
Two records have the same transaction ID, timestamp, customer ID, and amount. Which error should be investigated first?
Not quite. Try another option.
Answer: A duplicated transaction
Matching identifiers and transaction details strongly suggest that the same event was recorded more than once.
Question 39 of 60 · Possible data error types · Medium
An employee record contains a department ID that does not exist in the department table. Which error type does this represent?
Not quite. Try another option.
Answer: A referential integrity error
A foreign-key value without a matching record in the referenced table violates referential integrity.
Question 40 of 60 · Possible data error types · Medium
A person's age is entered as 250 in a demographic dataset. What is the most appropriate initial treatment?
Not quite. Try another option.
Answer: Flag it using a validity rule
An age of 250 violates a plausible domain constraint and should be flagged for verification or correction.
Question 41 of 60 · Introduction to data preprocessing · Hard
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?
Not quite. Try another option.
Answer: Fit every transformation within each fold using only that fold's training partition
All learned preprocessing parameters must be estimated from each training fold. Global fitting can leak distributional or target information into validation data.
Question 42 of 60 · Introduction to data preprocessing · Hard
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?
Not quite. Try another option.
Answer: The sentinel can distort the fitted median and therefore bias the imputed values
Semantic missing-value codes must be converted before statistics are fitted. Otherwise, 999 is treated as a genuine observation and may alter the median.
Question 43 of 60 · Introduction to data preprocessing · Hard
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?
Not quite. Try another option.
Answer: Train-serving skew caused by inconsistent transformation definitions and fitted parameters
Training uses fixed statistics while serving uses changing window statistics, so identical raw values can receive different representations despite no underlying drift.
Question 44 of 60 · Introduction to data preprocessing · Hard
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?
Not quite. Try another option.
Answer: Customer-level aggregation is wrangling; imputation and standardization are preprocessing
Wrangling changes structure or observational grain, whereas imputation and standardization prepare feature values for analysis or modeling.
Question 45 of 60 · Data preprocessing · Hard
A feature has median , interquartile range , and includes the value . Under robust scaling, what value is produced for , and what does this demonstrate?
Not quite. Try another option.
Answer: ; robust scaling reduces parameter sensitivity but does not bound extreme values
Using gives . Robust statistics resist outlier influence, but they do not clip outliers.
Question 46 of 60 · Data preprocessing · Hard
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?
Not quite. Try another option.
Answer: Apply training-fold median imputation and add a missingness indicator within the pipeline
A missingness indicator can capture the clinician-decision signal, while fitting the imputer only on training data prevents validation leakage.
Question 47 of 60 · Data preprocessing · Hard
A categorical feature may contain previously unseen values after deployment. Which encoding strategy handles this case while preserving a fixed feature schema?
Not quite. Try another option.
Answer: Map unseen values to a reserved category and fit the encoder using training data only
A reserved unknown category maintains a stable schema and avoids both target leakage and uncontrolled feature-column changes.
Question 48 of 60 · Data preprocessing · Hard
A forecasting dataset has hourly measurements, with isolated missing values. During backtesting, which interpolation method avoids using information unavailable at prediction time?
Not quite. Try another option.
Answer: A causal estimate using only observations available at or before the forecast origin
Centered, backward, and globally fitted interpolation can use future observations. A causal method respects the information boundary at each forecast origin.
Question 49 of 60 · Data wrangling · Hard
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?
Not quite. Try another option.
Answer: , because each key contributes the product of its two row multiplicities
A many-to-many join produces rows for K1 and rows for K2, totaling .
Question 50 of 60 · Data wrangling · Hard
Store-day records contain visits, purchases, and a computed conversion rate. To obtain the exact regional conversion rate, which aggregation is required?
Not quite. Try another option.
Answer: Divide the sum of purchases by the sum of visits across all store-days
Conversion rates must be recomputed from additive components: . Averaging rates generally gives an incorrect result.
Question 51 of 60 · Data wrangling · Hard
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?
Not quite. Try another option.
Answer: Every (customer_id, month, metric) combination identifies at most one value
The pivot's row keys and new column key must uniquely identify each cell. Duplicate combinations require aggregation or would make the reshape ambiguous.
Question 52 of 60 · Data wrangling · Hard
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?
Not quite. Try another option.
Answer: Select the largest effective time, then the largest ingestion time among tied records
The latest effective event determines the current state, and the latest ingestion timestamp resolves corrected versions of that same event.
Question 53 of 60 · Data types and forms · Hard
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?
Not quite. Try another option.
Answer: As a nominal string category with formatting and leading zeros preserved
Postal codes are identifiers rather than measured quantities. Treating them numerically invents ordering and distance while potentially destroying leading zeros.
Question 54 of 60 · Data types and forms · Hard
Temperatures are recorded in degrees Celsius. Which statement correctly characterizes valid quantitative comparisons on this scale?
Not quite. Try another option.
Answer: Differences are meaningful, but ratios are not because zero Celsius is not an absolute zero
Celsius is an interval scale: equal differences are meaningful, but statements such as C being twice C are not.
Question 55 of 60 · Data types and forms · Hard
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?
Not quite. Try another option.
Answer: The components satisfy a closure constraint; log-ratio coordinates remove the induced dependence
Compositional components are constrained to a constant sum, creating dependence. Log-ratios such as represent relative information appropriately.
Question 56 of 60 · Data types and forms · Hard
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?
Not quite. Try another option.
Answer: Create one row per item carrying the parent order identifier and retain order-level attributes separately
Exploding the array while retaining the parent key preserves item granularity and the relationship needed to regroup items into their orders.
Question 57 of 60 · Possible data error types · Hard
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?
Not quite. Try another option.
Answer: A cross-field consistency error violating a temporal constraint
Each value is syntactically and individually valid, but their relationship violates the domain rule that discharge cannot precede admission.
Question 58 of 60 · Possible data error types · Hard
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?
Not quite. Try another option.
Answer: Missing at random, because missingness depends only on an observed variable
Conditional on the observed severity score, missingness is independent of the unseen result. This matches the missing-at-random assumption.
Question 59 of 60 · Possible data error types · Hard
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?
Not quite. Try another option.
Answer: Units cannot be resolved reliably from magnitude alone; provenance or external rules are required
Overlapping plausible ranges make per-record unit inference ambiguous. Scaling does not repair mixed units; metadata or validated domain rules are needed.
Question 60 of 60 · Possible data error types · Hard
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?
Not quite. Try another option.
Answer: Enforce idempotency or uniqueness using the stable source event identifier
The changing database ID hides logical duplicates. A stable event identifier can enforce idempotent ingestion or support reliable deduplication.
That's unit 2
Answer a few questions and your score shows up here.
Nearly through. Did unit 2 of ECAP792 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 2 of ECAP792 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.