Average Distance Functions And Their Applications