Statistics for Optimizing Water Management: An IoT-Driven Approach to Smart Irrigation