Statistics for An optical Chemical Sensor Based on polymer Swelling for pH and Metal Ions Determination