
x       = -15:0.01:15;
sigma   = 10;


% a)
n       = 20;
alpha   = 0.05;

gamma.a = normcdf(-norminv(1 - alpha/2) - x/sigma*sqrt(n/2)) + 1 - normcdf(norminv(1 - alpha/2) - x/sigma*sqrt(n/2));

plot(x, gamma.a);


% b) 
n       = 20;
alpha   = 0.10;

gamma.b = normcdf(-norminv(1 - alpha/2) - x/sigma*sqrt(n/2)) + 1 - normcdf(norminv(1 - alpha/2) - x/sigma*sqrt(n/2));

plot(x, gamma.b);



% c) 

n       = 40;
alpha   = 0.05;

gamma.c = normcdf(-norminv(1 - alpha/2) - x/sigma*sqrt(n/2)) + 1 - normcdf(norminv(1 - alpha/2) - x/sigma*sqrt(n/2));

plot(x, gamma.c);



% d) 

n        = 40;
alpha    = 0.10;

gamma.d = normcdf(-norminv(1 - alpha/2) - x/sigma*sqrt(n/2)) + 1 - normcdf(norminv(1 - alpha/2) - x/sigma*sqrt(n/2));

plot(x, gamma.d);
