Random sampling via sensor networks: Estimation accuracy vs. energy consumption