Create stat.ino

Statistics functions