apt_error_model.py

Function for our simulation model
(updated, see video in Lecture 8)