Statistical model for piezoresistance in thin films