A4.2 Data preprocessing questions for IB Computer Science

52 questions on Data preprocessing, written by Augment in the style of IB exam papers. Six of them are below in full, to answer on paper.

  • IB Computer Science
  • Part of A4 Machine learning
  • HL only

Questions by paper and level

PaperQuestions
Paper 152

Counted on

Questions to try

Written by Augment in the style of IB exams, not past papers. Answer them on paper, then check each one against its markscheme with a free account.

Question 1 · CS-00019Paper 1 · 11 marks

A hospital is building a supervised learning model to predict whether a patient will be readmitted within 30 days of discharge. An extract from the training data is shown in Table 1.

PatientID

Age

Admitted

SystolicBP (mmHg)

Smoker

Readmitted

P1041

67

2025-03-14

142

Yes

Yes

P1042

2025-03-14

128

No

No

P1043

54

14/03/2025

1350

No

No

P1041

67

2025-03-14

142

Yes

Yes

P1044

81

2025-03-15

155

N/A

Yes

P1045

39

2025-03-15

118

no

No

Table 1

  1. (a)

    Identify three different data quality problems in Table 1, referring to specific records.

    3 marks

  2. (b)

    Outline how the duplicate record should be handled.

    2 marks

  3. (c)

    Describe how the missing age for patient P1042 could be handled using imputation.

    2 marks

  4. (d)

    Explain why training the model on uncleaned data like Table 1 is likely to reduce the quality of its predictions.

    4 marks

Question 2 · CS-00020Paper 1 · 5 marks

A mountain weather station records the maximum daily temperature. Six readings used to train a forecasting model are shown below.

Day

1

2

3

4

5

6

Temperature (°C)

12

18

25

31

9

22

The readings are normalized using min–max scaling to the range 0 to 1.

  1. (a)

    State the normalized value of the reading on day 5.

    1 mark

  2. (b)

    Calculate the normalized value of the reading on day 3, showing your working.

    2 marks

  3. (c)

    Outline one reason why the temperature feature should be normalized before it is combined with a humidity feature measured in percent.

    2 marks

Question 3 · CS-00021Paper 1 · 5 marks

An online language school standardizes students' placement test scores before using them in a model that predicts which course level suits each student. The scores have a mean of 62 and a standard deviation of 8.

  1. (a)

    Calculate the standardized value (z-score) of a score of 74, showing your working.

    2 marks

  2. (b)

    A student's standardized score is −0.75. Deduce the student's original test score.

    1 mark

  3. (c)

    Outline what a standardized value of 0 indicates about a student's score.

    2 marks

Question 4 · CS-00022Paper 1 · 6 marks

A bank is preparing transaction data to train a fraud-detection model. Two of the features are the transaction amount (from £0.50 to £48 000) and the number of transactions made by the account in the previous 24 hours (from 0 to 30).

  1. (a)

    Distinguish between normalization and standardization as ways of preparing these features.

    4 marks

  2. (b)

    Suggest which technique is more suitable for the transaction amount feature, justifying your answer.

    2 marks

Question 5 · CS-00023Paper 1 · 6 marks

A credit card company trains a model to detect fraudulent payments. While cleaning the data, an analyst finds a small number of payments that are hundreds of times larger than the customer's usual spending.

  1. (a)

    Define the term outlier.

    1 mark

  2. (b)

    Explain why the analyst should not simply delete these payments from the training data.

    3 marks

  3. (c)

    Outline one way the analyst could handle outliers that are found to be data entry errors.

    2 marks

Question 6 · CS-00024Paper 1 · 14 marks

A ride-share company wants a model that predicts the fare of a trip before it starts. Table 2 shows some of the raw trip data exported from its app.

TripID

DistanceKm

DurationMin

Fare

PickupTime

DriverFavSong

8812

5.2

14

£11.40

08:12

Track 7

8813

−3.0

9

£7.10

08:15

Track 2

8814

12.8

31

24.9

8:20 PM

Track 7

8815

7.5

0

£15.80

08:31

Track 4

8816

2.1

6

08:40

Track 1

Table 2

  1. (a)

    Identify two values in Table 2 that are incorrect data.

    2 marks

  2. (b)

    Identify one feature that should be filtered out as irrelevant, and outline why.

    2 marks

  3. (c)

    Describe how the Fare and PickupTime columns could be transformed into a consistent format suitable for training.

    3 marks

  4. (d)

    Trip 8816 has no fare recorded. Compare deletion and predictive modelling as ways of dealing with this missing value.

    3 marks

  5. (e)

    The company has a large amount of trip data. Discuss whether cleaning it is worth the time it takes.

    4 marks

Practice all 52 in Augment

Free with an account. Every question has its markscheme, and Augment keeps the ones you got wrong so you can come back to them.

The notes on A4.2 Data preprocessing

More questions in Machine learning

  1. A4.1Machine learning fundamentals
  2. A4.2Data preprocessingThis page
  3. A4.3Machine learning approaches
  4. A4.4Ethical considerations

Check your answers in Augment

A free account opens all 52 questions on Data preprocessing with their markschemes, and keeps a record of what you have marked.