Public
Edited
Sep 27, 2023
2 forks
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
mu0 = inputs[0]
Insert cell
muA = inputs[1]
Insert cell
sigma = inputs[2]
Insert cell
n = inputs[3]
Insert cell
alpha = inputs[4]
Insert cell
Insert cell
zcrit_right = mu0 + jstat.normal.inv(1-alpha/2, 0, 1)*(sigma/Math.sqrt(n))
Insert cell
zcrit_left = mu0 - jstat.normal.inv(1-alpha/2, 0, 1)*(sigma/Math.sqrt(n))
Insert cell
beta = jstat.normal.cdf(zcrit_right, muA, sigma/Math.sqrt(n)) - jstat.normal.cdf(zcrit_left, muA, sigma/Math.sqrt(n));
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more