Pātuhitia tēnei: Statistical quality control: a loss minimization approach