Boundary crossing problems for sample means