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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more