I came across this example of calculating a type 2 error.
I understand it up to the following point:
Therefore, so long as the sample mean is between 14.541 and 16.259 in a hypothesis test, the null hypothesis will not be rejected.
I understand this. When I perform a normal test with hypothesis if a sample mean is equal to a hypothetical mean, I set my alpha and this leads to a CI for the mean. One lower and one upper. If the estimated $\bar{x}$ lies within this then I cannot reject.
Now I do not understand how I can calculate a beta error if I know for sure that the true population mean is 15.1? It just says:
Since we assume that the actual population mean is 15.1, we can compute the lower tail probabilities of both end points.
and calculation as follows:
mu = 15.1 # assumed actual mean
<p>p = pt((q - mu)/SE, df=n-1); p<br> 0.097445 0.995168</p>
I tried to draw this:
But I do not understand how the beta error results? How can one show these calculations in a graph to understand it ("p = pt((q - mu)/SE, df=n-1);")? I can't get the idea of how to calculate the beta error in this case?


