Risk and cost of immobility in the presence of an immobile predator