How to calculate the probability of making a type 2 error? Knowing the probability of having a type 1 error equals to $\alpha$ (significance). I think it might be incorrect to tell that if $\alpha = 20 $ the chances of making a type 2 error are equal to 80%. 
Could somebody show how you'd have to calculate the value of $\alpha$ if you would like to e.g. have your probability of making a type 2 error equal 20%?
EDIT:


*

*zero hypothesis = 5 

*alternative hypothesis = 7

 A: Let us take as an example a sample $x_1, x_2, \dots x_n$ from a normal distribution with unknown mean $\mu$ and known (if it is not known the t-distribution comes in) $\sigma$.  Then it is known that the sample average $\bar{x}=\frac{\sum_{i=1}^n x_i}{n}$ is distributed normal with mean $\mu$ and standard deviation $\frac{\sigma}{\sqrt{n}}$. If you want to test the hypothesis $H_0: \mu=5$ versus $H_1: \mu=7$.  
If $H_0$ is true, then you know that $\bar{x}$ has a mean $\mu$, which (because you assume the $H_0$ is true), is (by assumption) equal to $5$. So $\bar{x} \sim N(\mu=5,\frac{\sigma}{\sqrt{n}})$. This is the distribution shown in red in the picture below (forget about the blue-green distribution for the moment). The red dashed vertical lines give you the critical region of a two sided test; the critial region is ''outside'' these two dashed lines, so your critical region is $]-\infty,5-1.96\frac{\sigma}{\sqrt{n}}] \cup  ]5+1.96\frac{\sigma}{\sqrt{n}};+\infty[$. 
If the sample average from the sample that you have drawn is in that region, then you will reject the $H_0$. I assume all this is known to you.  
A type two error is made if you accept $H_0$ while it is false, so if you accept $H_0$ when $H_1$ is true.  
So to compute the type II error probability you have to assume that $H_1$ is true (because a type II error occurs when $H_1$ is true) while your sample average falls outside the above chosen critical region (because then you accept $H_0$).  So you have to compute the probability 


*

*that $\bar{x}$ ''falls'' outside the region $]-\infty,5-1.96\frac{\sigma}{\sqrt{n}}] \cup  ]5+1.96\frac{\sigma}{\sqrt{n}};+\infty[$ (because then you accept $H_0$) which is the same as falling inside the region $]5-1.96\frac{\sigma}{\sqrt{n}};5+1.96\frac{\sigma}{\sqrt{n}}[$

*assuming that $H_1$ is true.  But if $H_1$ is true, then you know that $\bar{x} \sim N(\mu=7,\frac{\sigma}{\sqrt{n}})$ (note that there is a mean of 7 know because $H_1$ is true). This is the blue-green distribution in the picture. 


And if you know that, then it is not difficult to compute the probability that $\bar{x} \in ]5-1.96\frac{\sigma}{\sqrt{n}};5+1.96\frac{\sigma}{\sqrt{n}}[$ knowing that $\bar{x} \sim N(\mu=7,\frac{\sigma}{\sqrt{n}})$ ; this probability can be read from tables and it is the probability that you accept $H_0$ while it is false or the probability of a type II error.  It is the area undet the blue-green curve between the two vertical red lines. 
As you can see it depends on (a) the type I error ,  (b) $H_0$  , (c) the type of critical region you choose (one-sided or two-sided) and (d) also on $H_1$.  
(a),(b) and (c) are needed to draw the vertical red lines and (d) to compute the probability mass between these two lines.

A: Type II error or beta does depend on the type I error rate, or alpha, because given an alternative mean ($\mu_a$) that is deemed significant enough to care, which in your case is $7$, and a variance of the alternative population, $\sigma_a$, the higher we set the cut-off point to reject the null hypothesis, i.e. the more we try to minimize the potential for a type I error, the more we expose ourselves to failing to reject the alternative hypothesis when, in fact, it is true. Diagrammatically,

the red line is our cutoff point, above which we reject the null hypothesis. On both columns we see the alternative mean $\mu_a$ at different theoretical positions (dashed line), and approximating the null mean $\mu_o=0$ from top to bottom. The risk of committing a type II error goes up the closer $\mu_a$ is to $\mu_o$ (area in blue), while the power ($1-\beta$) logically goes down.
So you provide $\alpha$, and $\mu_a$, and wonder if you can calculate $\beta$, and I'm afraid the answer is negative. In fact, what you can do is decide what power you need to have in your test ($1-\beta$), and given the $\mu_a$ that you consider important to detect as different, and your estimation (or knowledge) of the standard deviation, calculate the number of subjects that you will need to avoid, as much as possible, committing a type II error.
