When the z statistic is appropriate to be used in testing a hypothesis?

When the z statistic is appropriate to be used in testing a hypothesis?

Get a 10% discount on an order above $50
Use the following coupon code :DUE