What is the Type II Error Calculator?

The Type II Error Calculator is a tool used to calculate the probability of making a Type II error, which is the probability of rejecting the null hypothesis when it is actually true. It allows users to enter the desired alpha level and power level and will calculate the probability of making a Type II error. This tool is useful in hypothesis testing to determine how likely it is to make a false rejection of the null hypothesis.

@import url(‘https://fonts.googleapis.com/css?family=Droid+Serif|Raleway’);

.axis–y .domain {
display: none;
}

h1 {
text-align: center;
font-size: 50px;
margin-bottom: 0px;
font-family: ‘Raleway’, serif;
}

p {
color: black;
margin-bottom: 15px;
margin-top: 15px;
font-family: ‘Raleway’, sans-serif;
}

#words {
color: black;
font-family: Raleway;
max-width: 550px;
margin: 25px auto;
line-height: 1.75;
padding-left: 100px;
}

#words_calc {
color: black;
font-family: Raleway;
max-width: 550px;
margin: 25px auto;
line-height: 1.75;
padding-left: 100px;
}

#hr_top {
width: 30%;
margin-bottom: 0px;
border: none;
height: 2px;
color: black;
background-color: black;
}

#hr_bottom {
width: 30%;
margin-top: 15px;
border: none;
height: 2px;
color: black;
background-color: black;
}

#words label, input {
display: inline-block;
vertical-align: baseline;
width: 350px;
}

#buttonCalc {
border: 1px solid;
border-radius: 10px;
margin-top: 20px;
padding: 10px 10px;
cursor: pointer;
outline: none;
background-color: white;
color: black;
font-family: ‘Work Sans’, sans-serif;
border: 1px solid grey;
/* Green */
}

#buttonCalc:hover {
background-color: #f6f6f6;
border: 1px solid black;
}

#words_intro {
color: black;
font-family: Raleway;
max-width: 550px;
margin: 25px auto;
line-height: 1.75;
}

A type II error occurs in hypothesis tests when we fail to reject the null hypothesis when it actually is false. The probability of committing this type of error is called the of a test, typically denoted as β.
To calculate the beta level for a given test, simply fill in the information below and then click the “Calculate” button.

Beta Level (β): 0.16099

function calc() {

//get input values
var nullmean = +document.getElementById(‘null’).value;
var truemean = +document.getElementById(‘true’).value;
var s = +document.getElementById(‘s’).value;
var n = +document.getElementById(‘n’).value;
var a = +document.getElementById(‘a’).value;

//calculate z critical value
var z = Math.abs(jStat.normal.inv(a, 0, 1));

//find minimum sample mean
var min_samp = nullmean – z*(s/Math.sqrt(n));

//find beta
var b_hold = (min_samp-truemean) / (s/Math.sqrt(n));
var b = jStat.normal.cdf(10000, 0, 1)-jStat.normal.cdf(b_hold, 0, 1);

//output probabilities
document.getElementById(‘b’).innerHTML = b.toFixed(5);
}

x