wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Day 6: Missing Values - Theory and Impact

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Which example best illustrates a sentinel value that can distort averages when treated as numeric?

a)

Blank entries in a survey column

b)

Random NaN sprinkled across rows

c)

String 'not reported' labels

d)

Numeric code -999 for missing

2.

A dataset uses 'N/A' for income and 0 for pregnancy weeks. What is the most appropriate first step before choosing an imputation strategy?

a)

Drop all rows with any missing

b)

Replace all missing with column means

c)

Determine the meaning of each missing pattern

d)

Train a tree model directly

3.

You find domain strings like 'N/A', 'unknown', and '?' in a column. What is the most appropriate first step to ensure these are counted in missingness summaries?

a)

Fill these strings with the column median value

b)

Drop rows containing these strings immediately

c)

Convert the column to integers to coerce errors

d)

Replace these strings with np.nan using token normalization

e)

Map these strings to a new category called 'missing_text'

4.

A function computes total = df.isna().sum() and pct = (df.isna().mean() * 100).round(1). What does this summary primarily help you decide?

a)

Which features require scaling or normalization

b)

Which columns have outliers beyond three sigma

c)

Which rows violate uniqueness constraints

d)

Which columns to drop or need imputation

e)

Which joins require foreign key repair

5.

In pandas, what does df.dropna() do by default when no axis is specified?

a)

Drops rows containing any missing values

b)

Flags missing values with indicator columns

c)

Drops columns with any missing values

d)

Replaces missing values with column means

6.

Which basic imputation choice is most robust for skewed numeric distributions such as income?

a)

Mode imputation for continuous variables

b)

Random sampling from observed values

c)

Median imputation for skewed distributions

d)

Mean imputation for all numeric features

7.

A dataset’s income feature is right-skewed with rare very high earners. Which imputation choice best represents a typical user’s missing income?

a)

Mean value of the income

b)

Mode of the income

c)

A constant highest observed income

d)

Median value of the income

8.

You need to deduplicate rows by user_id and event_time only, keeping the first occurrence. Which Pandas approach aligns with subset-based detection?

a)

df.drop_duplicates(subset=["user_id","event_time"], keep="first")

b)

df.unique(["user_id","event_time"], keep="first")

c)

df.duplicated(keep=False).any(axis=1)

d)

df.dropna(subset=["user_id","event_time"], inplace=True)

9.

In a dataset with a highly skewed age distribution, which imputation method is least likely to misrepresent the typical age of users?

a)

Random sampling from the dataset

b)

Mode imputation

c)

Mean imputation

d)

Median imputation

10.

When analyzing a dataset, which method is most effective for identifying and handling outliers before applying imputation?

a)

Applying mean imputation directly

b)

Dropping all rows with any missing values

c)

Using z-scores to flag outliers

d)

Using a random forest model to predict missing values