#nbi:hide_in
@interact(mu1=(0.,6.,0.25), significance=(0.01,0.5,0.01))
def plot_test(mu1=4.0, significance=0.05):
alpha = significance
critical_value = norm.ppf(1-alpha)
rejectreg_right = np.arange(critical_value, MAXX, dt)
Nmu1 = norm.pdf(x,mu1,1) # H_1
power = 1 - norm.cdf(critical_value, mu1)
plt.plot(x, N01, label="$H_0: N(0,1)$")
plt.plot(x, Nmu1, label="$H_1: N(\mu_1,1)$")
plt.fill_between(rejectreg_right, norm.pdf(rejectreg_right), color='blue', alpha=0.3,
label="significance = {:0.2f}".format(alpha))
plt.fill_between(rejectreg_right, norm.pdf(rejectreg_right,mu1,1),
color='orange', alpha=0.3, label="power = {:0.3f}".format(power))
plt.legend()
plt.yticks([])
plt.xticks([critical_value])