Statistics for Design and development of a device to diagnose and treat obstructive sleep apnoea