slidingPLOT[σ_,μ0_,μ1_,μ2_,conf_,a_]:=Module[{},



Column[{

Show[
Plot[Evaluate@Table[PDF[NormalDistribution[μ,σ],x],{μ,{μ0}}],{x,-a*σ+μ0,a*σ+μ0},AxesOrigin->{μ0,0},Ticks->{{μ2,{conf,conf,{0.6,0},Directive[Red,Dashed]},μ1,μ0,{μ0-conf+μ0,μ0-conf+μ0,{0.6,0},Directive[Red,Dashed]}},None},
Filling->Axis,PlotStyle->LightGray, Axes->{True,False},ImageSize->400,PlotRange->Full,TicksStyle->Directive[Orange,12],PlotLegends->Column@{"(Subscript[H, 0]):μ="<>ToString[μ0],"(Subscript[H, 1]):μ≠"<>ToString[μ0]}],

Plot[Evaluate@Table[PDF[NormalDistribution[μ,σ],x],{μ,{μ0}}],{x,μ0-conf+μ0,a*σ+μ0},AxesOrigin->{μ0,0},Filling->Axis,PlotStyle->Red, Axes->False,ImageSize->400,PlotRange->Full],

Plot[Evaluate@Table[PDF[NormalDistribution[μ,σ],x],{μ,{μ0}}],{x,-a*σ+μ0,conf},AxesOrigin->{μ0,0},Filling->Axis,PlotStyle->Red, Axes->False,ImageSize->400,PlotRange->Full],

Graphics[{Dashed,Line[{{μ0,0}, {μ0,PDF[NormalDistribution[μ0,σ],μ0]}}],Black,Text["(α/2)",{μ0-conf+μ0+4, PDF[NormalDistribution[μ0,σ],μ0]/9}],Text["(α/2)",{conf-2, PDF[NormalDistribution[μ0,σ],μ0]/9}]}] ],

Show[

Plot[Evaluate@Table[PDF[NormalDistribution[μ,σ],x],{μ,{μ0}}],{x,-a*σ+μ0,a*σ+μ0},AxesOrigin->{μ0,0},Ticks->{{μ2,{conf,conf,{0.6,0},Directive[Red,Dashed]},μ1,μ0,{μ0-conf+μ0,μ0-conf+μ0,{0.6,0},Directive[Red,Dashed]}},None},
Filling->Axis,PlotStyle->LightGray, Axes->{True,False},ImageSize->400,PlotRange->Full,TicksStyle->Directive[Orange,12],PlotLegends->Row@{"μ=",ToString[μ2]}],

Plot[Evaluate@Table[PDF[NormalDistribution[μ,σ],x],{μ,{μ0}}],{x,μ0-conf+μ0,a*σ+μ0},AxesOrigin->{μ0,0},Filling->Axis,PlotStyle->Red, Axes->False,ImageSize->400,PlotRange->Full],

Plot[Evaluate@Table[PDF[NormalDistribution[μ,σ],x],{μ,{μ0}}],{x,-a*σ+μ0,conf},AxesOrigin->{μ0,0},Filling->Axis,PlotStyle->Red, Axes->False,ImageSize->400,PlotRange->Full],

Plot[Evaluate@Table[PDF[NormalDistribution[μ,σ],x],{μ,{μ2}}],{x,-a*σ+μ0,a*σ+μ0},AxesOrigin->{μ0,0},Filling->Axis,PlotStyle->Orange, Axes->False,ImageSize->400,PlotRange->Full],


Plot[Evaluate@Table[PDF[NormalDistribution[μ,σ],x],{μ,{μ2}}],{x,conf,μ0-conf+μ0},AxesOrigin->{μ0,0},Filling->Axis,PlotStyle->Green, Axes->False,ImageSize->400,PlotRange->Full],

Graphics[{Dashed,Line[{{μ2,0}, {μ2,PDF[NormalDistribution[μ2,σ],μ2]}}],Text["β",{conf+4, PDF[NormalDistribution[μ0,σ],μ0]/9}] }]
],


Show[

Plot[Evaluate@Table[PDF[NormalDistribution[μ,σ],x],{μ,{μ0}}],{x,-a*σ+μ0,a*σ+μ0},AxesOrigin->{μ0,0},Ticks->{{μ2,{conf,conf,{0.6,0},Directive[Red,Dashed]},μ1,μ0,{μ0-conf+μ0,μ0-conf+μ0,{0.6,0},Directive[Red,Dashed]}},None},
Filling->Axis,PlotStyle->LightGray, Axes->{True,False},ImageSize->400,PlotRange->Full,TicksStyle->Directive[Orange,12],
PlotLegends->Row@{"μ=",ToString[μ1]}],

Plot[Evaluate@Table[PDF[NormalDistribution[μ,σ],x],{μ,{μ0}}],{x,μ0-conf+μ0,a*σ+μ0},AxesOrigin->{μ0,0},Filling->Axis,PlotStyle->Red, Axes->False,ImageSize->400,PlotRange->Full],

Plot[Evaluate@Table[PDF[NormalDistribution[μ,σ],x],{μ,{μ0}}],{x,-a*σ+μ0,conf},AxesOrigin->{μ0,0},Filling->Axis,PlotStyle->Red, Axes->False,ImageSize->400,PlotRange->Full],

Plot[Evaluate@Table[PDF[NormalDistribution[μ,σ],x],{μ,{μ1}}],{x,-a*σ+μ0,a*σ+μ0},AxesOrigin->{μ0,0},Filling->Axis,PlotStyle->Orange, Axes->False,ImageSize->400,PlotRange->Full],


Plot[Evaluate@Table[PDF[NormalDistribution[μ,σ],x],{μ,{μ1}}],{x,conf,μ0-conf+μ0},AxesOrigin->{μ0,0},Filling->Axis,PlotStyle->Green, Axes->False,ImageSize->400,PlotRange->Full],

Graphics[{Dashed,Line[{{μ1,0}, {μ1,PDF[NormalDistribution[μ1,σ],μ1]}}],Text["β",{conf+4, PDF[NormalDistribution[μ0,σ],μ0]/9}]}]
]


}
]

]

σ=13;
μ0=RandomInteger[{100,103}]; (*these numbers have to be far apart, or might disappear due to too much tighness*)
μ1=RandomInteger[{90,95}];
μ2=RandomInteger[{68,70}];
a=5.4;
conf=RandomInteger[{80,83}];

slidingPLOT[σ,μ0,μ1,μ2,conf,a]