Skip to content
ExamSpine

Answer it

P1 case trip cleaning

4 marksYou mark it yourself against the marking points

Practice scenario (written by Spine, not an IB case study):

Larkford is a small city with a community bike-share called LarkBikes. It has 40 docking stations, each with between 10 and 20 docks. Each dock has a sensor that detects whether a bike is locked in it and reads the bike's ID tag. Every station sends its sensor readings to a central server over the mobile phone network every 5 minutes.

Riders register in the LarkBikes app with their name, email address, home postcode and date of birth. When a rider unlocks a bike, a trip starts. The server keeps riders, bikes, stations and trips in a relational database. Each trip record holds the rider, the bike, the start station, the end station, and the start and end times. The database now holds two years of trips.

Every evening, a machine learning model is trained on the trip records together with the hour of the day, the day of the week, whether it is a school holiday, and the weather. For each station, it predicts how many bikes will be taken in each hour of the next day. A van crew uses these predictions to move bikes to stations that are expected to run out.

The 28 stations in the city centre are busy. The 12 stations in the outer districts were added last year and record far fewer trips.

Before training, the LarkBikes team checks the trip records and finds two problems.

Problem 1: when a station loses its mobile connection, it sends its readings again once it reconnects, and some trips from those stations are stored twice. Problem 2: about 3% of trips have no end station, because a dock sensor failed to read the bike's ID tag when the bike was returned.

(a) Explain how problem 1 would affect the predictions if the records were not cleaned. [2]

(b) Suggest a treatment for problem 2, and justify it. [2]

[4]