In this paper, we utilize clustering to organize wireless sensors into an energy-efficient hierarchy. We propose a Medium-contention based Energy-efficient DIstributed Clustering (MEDIC) scheme, through which sensors self-organize themselves into energy-efficient clusters by bidding for cluster headship. This scheme is based on a new criterion that can be used by each sensor node to make a distributed decision on whether electing to be a cluster head or a non-head member, which is a fully distributed approach. Although MEDIC uses only local information, it achieves better performance in terms of effective lifetime and its Data/Energy Ratio is 25% higher than native LEACH (Low-Energy Adaptive Clustering Hierarchy), which relies on other routing algorithms to access global information. A complementary exponential data correlation model is also introduced to simulate different data aggregation effect.